Elastix · Schema

ChatCompletion

Company

Properties

Name Type Description
id string
object string
created integer Unix timestamp (seconds).
model string
choices array
usage object
View JSON Schema on GitHub

JSON Schema

elastix-chat-completion-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastix/json-schema/elastix-chat-completion-schema.json",
  "title": "ChatCompletion",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elastix-openapi.json#/components/schemas/ChatCompletion",
  "type": "object",
  "required": [
    "id",
    "object",
    "created",
    "model",
    "choices"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "type": "string",
      "const": "chat.completion"
    },
    "created": {
      "type": "integer",
      "description": "Unix timestamp (seconds)."
    },
    "model": {
      "type": "string"
    },
    "choices": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "index",
          "message",
          "finish_reason"
        ],
        "properties": {
          "index": {
            "type": "integer"
          },
          "message": {
            "$ref": "#/$defs/ChatMessage"
          },
          "finish_reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "stop",
              "length",
              "tool_calls",
              null
            ],
            "description": "Why generation stopped. `tool_calls` means the model wants to call one or more tools (see `message.tool_calls`)."
          }
        }
      }
    },
    "usage": {
      "$ref": "#/$defs/Usage"
    }
  },
  "$defs": {
    "ChatMessage": {
      "type": "object",
      "required": [
        "role",
        "content"
      ],
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "system",
            "developer",
            "user",
            "assistant",
            "tool"
          ],
          "description": "The author of the message. `\"developer\"` is an alias for `\"system\"` and is treated identically. A system/developer message is optional, but if present it must be the first message in the array. Use `\"tool\"` to return the result of a tool call back to the model."
        },
        "content": {
          "type": [
            "string",
            "null"
          ],
          "description": "The message text. Text only — image (vision) and audio content are not supported yet (both planned). May be `null` on an assistant message that only requests tool calls (see `tool_calls`)."
        },
        "tool_calls": {
          "type": "array",
          "description": "Tool calls the model wants to make. Present only on an assistant message; when set, `content` is typically `null`.",
          "items": {
            "$ref": "#/$defs/ToolCall"
          }
        },
        "tool_call_id": {
          "type": "string",
          "description": "Required on a `\"tool\"` message: the `id` of the tool call this message provides the result for."
        }
      }
    },
    "ToolCall": {
      "type": "object",
      "required": [
        "id",
        "type",
        "function"
      ],
      "description": "A tool call requested by the model.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier for this call. Echo it back as `tool_call_id` on the `\"tool\"` message that carries the result."
        },
        "type": {
          "type": "string",
          "const": "function"
        },
        "function": {
          "type": "object",
          "required": [
            "name",
            "arguments"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "arguments": {
              "type": "string",
              "description": "The call arguments as a JSON-encoded string (not a JSON object). Parse it before use; the model may occasionally emit invalid JSON."
            }
          }
        }
      }
    },
    "Usage": {
      "type": "object",
      "properties": {
        "prompt_tokens": {
          "type": "integer"
        },
        "completion_tokens": {
          "type": "integer"
        },
        "total_tokens": {
          "type": "integer"
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/elastix-chat-completion"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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