WanAPIs · Schema

ChatCompletionResponse

OpenAI-compatible chat completion response returned by WanAPIs.

LLM GatewayAI API GatewayOpenAI CompatibleModel MarketplaceLLMGPTClaudeGeminiDeepSeekImage GenerationVideo GenerationAudioMultimodalRoutingFailover

Properties

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

JSON Schema

wanapis-chatcompletionresponse-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://wanapis.com/schemas/ChatCompletionResponse.json",
  "title": "ChatCompletionResponse",
  "description": "OpenAI-compatible chat completion response returned by WanAPIs.",
  "type": "object",
  "properties": {
    "id": { "type": "string" },
    "object": { "type": "string", "const": "chat.completion" },
    "created": { "type": "integer", "description": "Unix epoch seconds." },
    "model": { "type": "string" },
    "choices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": { "type": "integer" },
          "message": { "$ref": "wanapis-chatmessage-schema.json" },
          "finish_reason": { "type": "string" }
        }
      }
    },
    "usage": {
      "type": "object",
      "properties": {
        "prompt_tokens": { "type": "integer" },
        "completion_tokens": { "type": "integer" },
        "total_tokens": { "type": "integer" }
      }
    }
  }
}