Trajectory · Schema

ChatCompletionChunk

CompanyArtificial IntelligenceContinual LearningEnterprisePlatform

Properties

Name Type Description
id string
object string
created integer
model string
choices array
usage object
service_tier object
system_fingerprint object
View JSON Schema on GitHub

JSON Schema

trajectory-chat-completion-chunk-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trajectory/json-schema/trajectory-chat-completion-chunk-schema.json",
  "title": "ChatCompletionChunk",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trajectory-inference-api-openapi.yml#/components/schemas/ChatCompletionChunk",
  "additionalProperties": true,
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "object": {
      "title": "Object",
      "type": "string"
    },
    "created": {
      "title": "Created",
      "type": "integer"
    },
    "model": {
      "title": "Model",
      "type": "string"
    },
    "choices": {
      "items": {
        "$ref": "#/$defs/ChatCompletionChunkChoice"
      },
      "title": "Choices",
      "type": "array"
    },
    "usage": {
      "anyOf": [
        {
          "$ref": "#/$defs/Usage"
        },
        {
          "type": "null"
        }
      ]
    },
    "service_tier": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Service Tier"
    },
    "system_fingerprint": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "System Fingerprint"
    }
  },
  "required": [
    "id",
    "object",
    "created",
    "model",
    "choices"
  ],
  "type": "object",
  "$defs": {
    "ChatCompletionChoiceLogprobs": {
      "properties": {
        "content": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ChatCompletionTokenLogprob"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content"
        },
        "refusal": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ChatCompletionTokenLogprob"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Refusal"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "ChatCompletionChoiceLogprobs"
    },
    "ChatCompletionChunkChoice": {
      "additionalProperties": true,
      "properties": {
        "index": {
          "title": "Index",
          "type": "integer"
        },
        "delta": {
          "$ref": "#/$defs/ChatCompletionChunkDelta"
        },
        "finish_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Finish Reason"
        },
        "logprobs": {
          "anyOf": [
            {
              "$ref": "#/$defs/ChatCompletionChoiceLogprobs"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "index",
        "delta"
      ],
      "title": "ChatCompletionChunkChoice",
      "type": "object"
    },
    "ChatCompletionChunkDelta": {
      "additionalProperties": true,
      "properties": {
        "role": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Role"
        },
        "content": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content"
        },
        "refusal": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Refusal"
        },
        "function_call": {
          "anyOf": [
            {
              "$ref": "#/$defs/ChatCompletionChunkFunction"
            },
            {
              "type": "null"
            }
          ]
        },
        "tool_calls": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ChatCompletionChunkToolCall"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tool Calls"
        }
      },
      "title": "ChatCompletionChunkDelta",
      "type": "object"
    },
    "ChatCompletionChunkFunction": {
      "additionalProperties": true,
      "properties": {
        "arguments": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Arguments"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        }
      },
      "title": "ChatCompletionChunkFunction",
      "type": "object"
    },
    "ChatCompletionChunkToolCall": {
      "additionalProperties": true,
      "properties": {
        "index": {
          "title": "Index",
          "type": "integer"
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id"
        },
        "function": {
          "anyOf": [
            {
              "$ref": "#/$defs/ChatCompletionChunkFunction"
            },
            {
              "type": "null"
            }
          ]
        },
        "type": {
          "anyOf": [
            {
              "const": "function",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Type"
        }
      },
      "required": [
        "index"
      ],
      "title": "ChatCompletionChunkToolCall",
      "type": "object"
    },
    "ChatCompletionTokenLogprob": {
      "properties": {
        "token": {
          "type": "string",
          "title": "Token"
        },
        "logprob": {
          "type": "number",
          "title": "Logprob"
        },
        "bytes": {
          "anyOf": [
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bytes"
        },
        "top_logprobs": {
          "items": {
            "$ref": "#/$defs/ChatCompletionTokenTopLogprob"
          },
          "type": "array",
          "title": "Top Logprobs"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "required": [
        "token",
        "logprob",
        "top_logprobs"
      ],
      "title": "ChatCompletionTokenLogprob"
    },
    "ChatCompletionTokenTopLogprob": {
      "properties": {
        "token": {
          "type": "string",
          "title": "Token"
        },
        "logprob": {
          "type": "number",
          "title": "Logprob"
        },
        "bytes": {
          "anyOf": [
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bytes"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "required": [
        "token",
        "logprob"
      ],
      "title": "ChatCompletionTokenTopLogprob"
    },
    "CompletionTokensDetails": {
      "properties": {
        "accepted_prediction_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Accepted Prediction Tokens"
        },
        "audio_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Audio Tokens"
        },
        "reasoning_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reasoning Tokens"
        },
        "rejected_prediction_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rejected Prediction Tokens"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "CompletionTokensDetails"
    },
    "PromptTokensDetails": {
      "properties": {
        "audio_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Audio Tokens"
        },
        "cached_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cached Tokens"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "PromptTokensDetails"
    },
    "Usage": {
      "properties": {
        "prompt_tokens": {
          "type": "integer",
          "title": "Prompt Tokens"
        },
        "completion_tokens": {
          "type": "integer",
          "title": "Completion Tokens"
        },
        "total_tokens": {
          "type": "integer",
          "title": "Total Tokens"
        },
        "completion_tokens_details": {
          "anyOf": [
            {
              "$ref": "#/$defs/CompletionTokensDetails"
            },
            {
              "type": "null"
            }
          ]
        },
        "prompt_tokens_details": {
          "anyOf": [
            {
              "$ref": "#/$defs/PromptTokensDetails"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": true,
      "type": "object",
      "required": [
        "prompt_tokens",
        "completion_tokens",
        "total_tokens"
      ],
      "title": "Usage"
    }
  }
}

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/trajectory-chat-completion-chunk"
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. See our Privacy Policy and Terms.

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