Inworld AI Chat Completions API

OpenAI-compatible chat completions through the LLM Router.

Operations 2

POST /v1/chat/completions Create Chat Completion #
GET /v1/models List Models #

Documentation

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/inworld-ai-chat-completions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

inworld-ai-chat-completions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Inworld LLM Router Chat Completions API
  description: 'OpenAI- and Anthropic-compatible chat completions plus named-router lifecycle management. Routes prompts across hundreds of third-party LLMs (OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, Groq, etc.) behind one API and one billing relationship. Includes conditional routing, A/B traffic splitting, provider routing, prompt caching, prompt compression, integrated web search, and a Claude-Code-compatible mode.

    '
  version: v1
  contact:
    name: Inworld Support
    url: https://docs.inworld.ai/tts/resources/support
  license:
    name: Inworld Terms of Service
    url: https://inworld.ai/legal/terms-of-service
servers:
- url: https://api.inworld.ai
  description: Inworld Production API
security:
- BasicAuth: []
tags:
- name: Chat Completions
  description: OpenAI-compatible chat completions through the LLM Router.
paths:
  /v1/chat/completions:
    post:
      summary: Create Chat Completion
      description: 'OpenAI-compatible chat completions. The `model` field accepts a specific model id, a `provider/model` id (e.g. `openai/gpt-4o`), `auto` for the router''s default selection, or `inworld/<router-name>` to invoke a named router. Anthropic-compatible request shapes are supported via the Anthropic-compat header set documented at `/router/anthropic-compatibility`.

        '
      operationId: createChatCompletion
      tags:
      - Chat Completions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
      responses:
        '200':
          description: Chat completion returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ChatCompletionStreamEvent'
        4XX:
          $ref: '#/components/responses/ErrorResponse'
  /v1/models:
    get:
      summary: List Models
      description: List models available via the Router and first-party Inworld services.
      operationId: listRouterModels
      tags:
      - Chat Completions
      responses:
        '200':
          description: Models returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListModelsResponse'
        4XX:
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    ChatCompletionStreamEvent:
      type: object
      description: 'Server-sent event stream — `data: <json>` chunks; final `data: [DONE]`.'
    Error:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    ChatMessage:
      type: object
      required:
      - role
      - content
      properties:
        role:
          type: string
          enum:
          - system
          - user
          - assistant
          - tool
          - developer
        content:
          oneOf:
          - type: string
          - type: array
            items:
              type: object
        name:
          type: string
        tool_calls:
          type: array
          items:
            type: object
        tool_call_id:
          type: string
    ChatCompletionRequest:
      type: object
      required:
      - model
      - messages
      properties:
        model:
          type: string
          description: Model id, provider/model, `auto`, or `inworld/<router-name>`.
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ChatMessage'
        stream:
          type: boolean
        temperature:
          type: number
        top_p:
          type: number
        max_tokens:
          type: integer
        max_completion_tokens:
          type: integer
        presence_penalty:
          type: number
        frequency_penalty:
          type: number
        seed:
          type: integer
        stop:
          oneOf:
          - type: string
          - type: array
            items:
              type: string
        logit_bias:
          type: object
          additionalProperties:
            type: number
        reasoning_effort:
          type: string
        user:
          type: string
        web_search:
          type: boolean
        web_search_options:
          type: object
        modalities:
          type: array
          items:
            type: string
        image_config:
          type: object
        extra_body:
          type: object
    ListModelsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              object:
                type: string
                enum:
                - model
              provider:
                type: string
              capabilities:
                type: array
                items:
                  type: string
              pricing:
                type: object
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
          - chat.completion
        created:
          type: integer
        model:
          type: string
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
              message:
                $ref: '#/components/schemas/ChatMessage'
              finish_reason:
                type: string
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
            completion_tokens:
              type: integer
            total_tokens:
              type: integer
        metadata:
          type: object
          description: Router metadata — attempts, providers tried, reasoning.
  responses:
    ErrorResponse:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic