Skip to main content
GET
/
router
/
v1
/
routers
cURL
curl --location 'https://api.inworld.ai/router/v1/routers?page_size=10' \
--header 'Authorization: Basic <your-api-key>'
{
  "routers": [
    {
      "name": "<string>",
      "displayName": "<string>",
      "routes": [
        {
          "route": {
            "route_id": "<string>",
            "variants": [
              {
                "variant": {
                  "variant_id": "<string>",
                  "model_id": "<string>",
                  "model_selection": {
                    "models": [
                      "<string>"
                    ],
                    "sort": [
                      {
                        "metric": "SORT_METRIC_UNSPECIFIED",
                        "direction": "SORT_DIRECTION_UNSPECIFIED"
                      }
                    ],
                    "ignore": [
                      "<string>"
                    ],
                    "provider": {
                      "order": [
                        "<string>"
                      ],
                      "allow_fallbacks": true
                    }
                  },
                  "text_generation_config": {
                    "max_tokens": 123,
                    "top_p": 123,
                    "temperature": 123,
                    "repetition_penalty": 123,
                    "frequency_penalty": 123,
                    "presence_penalty": 123,
                    "stop_sequences": [
                      "<string>"
                    ],
                    "seed": 123,
                    "logit_bias": [
                      {
                        "token_id": "<string>",
                        "bias_value": 123
                      }
                    ],
                    "reasoning": {
                      "effort": "unspecified",
                      "max_tokens": 123,
                      "exclude": true
                    }
                  },
                  "message_templates": [
                    {
                      "role": "<string>",
                      "content": "<string>",
                      "content_items": [
                        {
                          "text": "<string>"
                        }
                      ],
                      "tool_calls": [
                        {
                          "id": "<string>",
                          "name": "<string>",
                          "args": "<string>"
                        }
                      ],
                      "tool_call_id": "<string>"
                    }
                  ]
                },
                "weight": 123
              }
            ]
          },
          "condition": {
            "cel_expression": "<string>"
          }
        }
      ],
      "defaultRoute": {
        "route_id": "<string>",
        "variants": [
          {
            "variant": {
              "variant_id": "<string>",
              "model_id": "<string>",
              "model_selection": {
                "models": [
                  "<string>"
                ],
                "sort": [
                  {
                    "metric": "SORT_METRIC_UNSPECIFIED",
                    "direction": "SORT_DIRECTION_UNSPECIFIED"
                  }
                ],
                "ignore": [
                  "<string>"
                ],
                "provider": {
                  "order": [
                    "<string>"
                  ],
                  "allow_fallbacks": true
                }
              },
              "text_generation_config": {
                "max_tokens": 123,
                "top_p": 123,
                "temperature": 123,
                "repetition_penalty": 123,
                "frequency_penalty": 123,
                "presence_penalty": 123,
                "stop_sequences": [
                  "<string>"
                ],
                "seed": 123,
                "logit_bias": [
                  {
                    "token_id": "<string>",
                    "bias_value": 123
                  }
                ],
                "reasoning": {
                  "effort": "unspecified",
                  "max_tokens": 123,
                  "exclude": true
                }
              },
              "message_templates": [
                {
                  "role": "<string>",
                  "content": "<string>",
                  "content_items": [
                    {
                      "text": "<string>"
                    }
                  ],
                  "tool_calls": [
                    {
                      "id": "<string>",
                      "name": "<string>",
                      "args": "<string>"
                    }
                  ],
                  "tool_call_id": "<string>"
                }
              ]
            },
            "weight": 123
          }
        ]
      },
      "defaults": {
        "message_templates": [
          {
            "role": "<string>",
            "content": "<string>",
            "content_items": [
              {
                "text": "<string>"
              }
            ],
            "tool_calls": [
              {
                "id": "<string>",
                "name": "<string>",
                "args": "<string>"
              }
            ],
            "tool_call_id": "<string>"
          }
        ],
        "text_generation_config": {
          "max_tokens": 123,
          "top_p": 123,
          "temperature": 123,
          "repetition_penalty": 123,
          "frequency_penalty": 123,
          "presence_penalty": 123,
          "stop_sequences": [
            "<string>"
          ],
          "seed": 123,
          "logit_bias": [
            {
              "token_id": "<string>",
              "bias_value": 123
            }
          ],
          "reasoning": {
            "effort": "unspecified",
            "max_tokens": 123,
            "exclude": true
          }
        }
      }
    }
  ],
  "next_page_token": "<string>"
}

Authorizations

Authorization
string
header
required

Your authentication credentials. For Basic authentication, please populate Basic $INWORLD_API_KEY.

Please make sure your API Key has write permissions for the Router API in order to create, update, and delete routers.

Query Parameters

page_size
integer<int32>

The maximum number of routers to return.

Required range: x >= 0
page_token
string

A page token, received from a previous ListRouters call.

Response

A successful response.

routers
object[]

The list of routers.

next_page_token
string

A token to retrieve the next page of results.