TrueFoundry · JSON Structure

Truefoundry Chat Completion Structure

TrueFoundry AI Gateway chat completion request and response

Type: Properties: 0
AI PlatformEnterprise AIKubernetesLLM GatewayMLOps

ChatCompletion is a JSON Structure definition published by TrueFoundry.

Meta-schema:

JSON Structure

Raw ↑
{
  "name": "ChatCompletion",
  "description": "TrueFoundry AI Gateway chat completion request and response",
  "request": {
    "fields": [
      { "name": "model", "type": "string", "description": "Model identifier", "required": true },
      { "name": "messages", "type": "array[Message]", "description": "Conversation history", "required": true },
      { "name": "temperature", "type": "number(0-2)", "description": "Sampling randomness", "required": false },
      { "name": "max_tokens", "type": "integer", "description": "Max output tokens", "required": false },
      { "name": "stream", "type": "boolean", "description": "Enable SSE streaming", "required": false },
      { "name": "tools", "type": "array[Tool]", "description": "Function calling tools", "required": false },
      { "name": "top_p", "type": "number", "required": false },
      { "name": "top_k", "type": "integer", "required": false },
      { "name": "user", "type": "string", "description": "End-user ID for monitoring", "required": false }
    ]
  },
  "response": {
    "fields": [
      { "name": "id", "type": "string", "description": "Completion ID", "required": true },
      { "name": "object", "type": "enum[chat.completion]", "required": true },
      { "name": "created", "type": "integer", "description": "Unix timestamp", "required": true },
      { "name": "model", "type": "string", "description": "Model used", "required": true },
      { "name": "choices", "type": "array[Choice]", "required": true },
      { "name": "usage", "type": "Usage", "required": true }
    ]
  },
  "nested": {
    "Message": {
      "fields": [
        { "name": "role", "type": "enum[system,user,assistant,tool]", "required": true },
        { "name": "content", "type": "string|array", "required": true },
        { "name": "tool_calls", "type": "array", "required": false }
      ]
    },
    "Choice": {
      "fields": [
        { "name": "index", "type": "integer", "required": true },
        { "name": "message", "type": "Message", "required": true },
        { "name": "finish_reason", "type": "enum[stop,length,tool_calls,content_filter]", "required": true }
      ]
    },
    "Usage": {
      "fields": [
        { "name": "prompt_tokens", "type": "integer", "required": true },
        { "name": "completion_tokens", "type": "integer", "required": true },
        { "name": "total_tokens", "type": "integer", "required": true }
      ]
    }
  }
}

Work with this as data

Every JSON Structure 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 json structure

4 MCP tools reach this
  • find_json_structuresBrowse and filter every JSON Structure 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 Structure
curl "https://apis.io/api/v1/json-structures/truefoundry-chat-completion-structure"
All json structure
curl "https://apis.io/api/v1/json-structures?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.