Step 1 — Create Router
curl --location 'https://api.inworld.ai/router/v1/routers' \
--header 'Authorization: Basic <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "compare-frontier-models",
"defaultRoute": {
"route_id": "default",
"variants": [
{
"variant": {
"variant_id": "deepinfra/zai-org/GLM-5-a",
"model_id": "deepinfra/zai-org/GLM-5"
},
"weight": 33
},
{
"variant": {
"variant_id": "fireworks/accounts/fireworks/models/glm-5p1-b",
"model_id": "fireworks/accounts/fireworks/models/glm-5p1"
},
"weight": 33
},
{
"variant": {
"variant_id": "deepinfra/zai-org/GLM-4.7-c",
"model_id": "deepinfra/zai-org/GLM-4.7"
},
"weight": 34
}
]
}
}'Step 2 — Chat Completion
curl --location 'https://api.inworld.ai/v1/chat/completions' \
--header 'Authorization: Basic <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"model": "inworld/compare-frontier-models",
"messages": [{"role": "user", "content": "Hello!"}]
}'| Capabilities | Input modalities | Output modalities | |||||
|---|---|---|---|---|---|---|---|
| — | — | $0.60 | $2.08 | — |
| Capabilities | Input modalities | Output modalities | Inference provider | |||||
|---|---|---|---|---|---|---|---|---|
| Accounts/fireworks/models/glm 5p1 | 202.8K | 202.8K | $1.40 | $4.40 | ||||
| Zai Org/GLM 4.7 | — | — | $0.40 | $1.75 | — | |||
| Zai Org/GLM 4.7 Flash | — | — | $0.06 | $0.40 | — |
