Berget AI · Schema

ChatCompletionResponse

CompanyArtificial IntelligenceInferenceLLMEmbeddingsSpeech-to-TextOCRSwedenData Sovereignty

Properties

Name Type Description
id string Unique identifier for the chat completion
object string Object type, always "chat.completion"
created number Unix timestamp when the completion was created
model string ID of the model used
system_fingerprint stringnull System fingerprint for reproducibility
service_tier stringnull Service tier used
choices array Array of completion choices
usage object Token usage information. Optional because some vLLM/SGLang backends return HTTP 200 with a valid completion but no `usage` object; the pipeline skips token-derived side effects (metrics, CO₂, billing)
View JSON Schema on GitHub

JSON Schema

berget-ai-chat-completion-response-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/berget-ai/json-schema/berget-ai-chat-completion-response-schema.json",
  "title": "ChatCompletionResponse",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/berget-ai-openapi.yml#/components/schemas/ChatCompletionResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the chat completion"
    },
    "object": {
      "type": "string",
      "enum": [
        "chat.completion"
      ],
      "description": "Object type, always \"chat.completion\""
    },
    "created": {
      "type": "number",
      "description": "Unix timestamp when the completion was created"
    },
    "model": {
      "type": "string",
      "description": "ID of the model used"
    },
    "system_fingerprint": {
      "description": "System fingerprint for reproducibility",
      "type": [
        "string",
        "null"
      ]
    },
    "service_tier": {
      "description": "Service tier used",
      "type": [
        "string",
        "null"
      ]
    },
    "choices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": {
            "type": "number"
          },
          "message": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "content": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reasoning_content": {
                "description": "Reasoning trace from the provider reasoning parser",
                "type": [
                  "string",
                  "null"
                ]
              },
              "reasoning": {
                "description": "Reasoning trace (alternate key used by some parsers)",
                "type": [
                  "string",
                  "null"
                ]
              },
              "tool_calls": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique identifier for the tool call"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ],
                      "description": "Tool call type, always \"function\""
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Name of the function"
                        },
                        "arguments": {
                          "type": "string",
                          "description": "JSON-encoded arguments for the function"
                        }
                      },
                      "required": [
                        "name",
                        "arguments"
                      ],
                      "additionalProperties": false,
                      "description": "Function call details"
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "function"
                  ],
                  "additionalProperties": {}
                }
              },
              "function_call": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "arguments": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "arguments"
                ],
                "additionalProperties": false
              },
              "refusal": {
                "description": "Reason for refusal",
                "type": [
                  "string",
                  "null"
                ]
              },
              "annotations": {
                "description": "Annotations (e.g. web-search URL citations)",
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "url_citation"
                      ],
                      "description": "Annotation type, always \"url_citation\""
                    },
                    "url_citation": {
                      "type": "object",
                      "properties": {
                        "end_index": {
                          "type": "number",
                          "description": "Index of the last character of the citation"
                        },
                        "start_index": {
                          "type": "number",
                          "description": "Index of the first character of the citation"
                        },
                        "url": {
                          "type": "string",
                          "description": "URL of the cited web resource"
                        },
                        "title": {
                          "type": "string",
                          "description": "Title of the cited web resource"
                        }
                      },
                      "required": [
                        "end_index",
                        "start_index",
                        "url",
                        "title"
                      ],
                      "additionalProperties": false,
                      "description": "URL citation details"
                    }
                  },
                  "required": [
                    "type",
                    "url_citation"
                  ],
                  "additionalProperties": {}
                }
              },
              "audio": {
                "description": "Audio output",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Audio ID"
                  },
                  "data": {
                    "description": "Base64-encoded audio data",
                    "type": "string"
                  },
                  "expires_at": {
                    "description": "Unix timestamp when the audio expires",
                    "type": "number"
                  },
                  "transcript": {
                    "description": "Transcript of the audio",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "role",
              "content"
            ],
            "additionalProperties": {},
            "description": "Message object"
          },
          "finish_reason": {
            "description": "Reason the completion finished",
            "type": [
              "string",
              "null"
            ]
          },
          "logprobs": {
            "description": "Log probabilities",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "content": {
                "description": "Content log probabilities",
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string"
                    },
                    "bytes": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "number"
                      }
                    },
                    "logprob": {
                      "type": "number"
                    },
                    "top_logprobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "token": {
                            "type": "string"
                          },
                          "bytes": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "number"
                            }
                          },
                          "logprob": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "token",
                          "bytes",
                          "logprob"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "token",
                    "bytes",
                    "logprob",
                    "top_logprobs"
                  ],
                  "additionalProperties": false
                }
              },
              "refusal": {
                "description": "Refusal log probabilities",
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string"
                    },
                    "bytes": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "number"
                      }
                    },
                    "logprob": {
                      "type": "number"
                    },
                    "top_logprobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "token": {
                            "type": "string"
                          },
                          "bytes": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "number"
                            }
                          },
                          "logprob": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "token",
                          "bytes",
                          "logprob"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "token",
                    "bytes",
                    "logprob",
                    "top_logprobs"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "index",
          "message",
          "finish_reason"
        ],
        "additionalProperties": {},
        "description": "Completion choice"
      },
      "description": "Array of completion choices"
    },
    "usage": {
      "description": "Token usage information. Optional because some vLLM/SGLang backends return HTTP 200 with a valid completion but no `usage` object; the pipeline skips token-derived side effects (metrics, CO₂, billing) when absent and forwards the response untouched.",
      "type": "object",
      "properties": {
        "prompt_tokens": {
          "type": "number",
          "description": "Number of prompt tokens"
        },
        "completion_tokens": {
          "type": "number",
          "description": "Number of completion tokens"
        },
        "total_tokens": {
          "type": "number",
          "description": "Total number of tokens"
        },
        "prompt_tokens_details": {
          "description": "Prompt token details",
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "audio_tokens": {
              "description": "Number of audio tokens",
              "type": "number"
            },
            "cached_tokens": {
              "description": "Number of cached tokens",
              "type": "number"
            },
            "cache_write_tokens": {
              "description": "Number of tokens written to the prompt cache",
              "type": "number"
            }
          },
          "additionalProperties": {}
        },
        "completion_tokens_details": {
          "description": "Completion token details",
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "audio_tokens": {
              "description": "Number of audio tokens",
              "type": "number"
            },
            "reasoning_tokens": {
              "description": "Number of reasoning tokens",
              "type": "number"
            },
            "accepted_prediction_tokens": {
              "description": "Number of accepted prediction tokens",
              "type": "number"
            },
            "rejected_prediction_tokens": {
              "description": "Number of rejected prediction tokens",
              "type": "number"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "prompt_tokens",
        "completion_tokens",
        "total_tokens"
      ],
      "additionalProperties": {}
    }
  },
  "required": [
    "id",
    "object",
    "created",
    "model",
    "choices"
  ],
  "additionalProperties": {}
}

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/berget-ai-chat-completion-response"
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.