AI Hub GenAI API — HTTP reference¶
Generated from FastAPI OpenAPI and versioned with the source code. Edit routes, Pydantic schemas and their examples, then run python -m scripts.update_http_reference to update this page.
AI Hub GenAI API on this instance: Swagger · ReDoc · Live OpenAPI JSON
Paths below include the application mount. Add your deployment prefix when calling them. Live Swagger/ReDoc includes deployment-specific defaults; this static snapshot uses source defaults and never reads tenant databases.
3 HTTP operations. WebSocket and MCP transports are documented separately. Metrics and framework routes excluded from OpenAPI are not HTTP contract entries.
Use the Live OpenAPI JSON link above for the complete schema served by this application.
Operations¶
| Method | Mounted path | Summary |
|---|---|---|
| GET | /genai/api/v1/catalogue |
List shared providers and models without authentication |
| POST | /genai/api/v1/chat/completions |
Create a chat completion with a configured AIHub model |
| GET | /genai/api/v1/models |
List configured providers, models and supported generation controls |
GET /genai/api/v1/catalogue¶
List shared providers and models without authentication
Database compatibility: MongoDB + PostgreSQL.
Public, read-only deployment catalogue from MongoDB or PostgreSQL. No API key, Client-ID or tenant configuration is used. Returns generation model IDs, aliases, capabilities, shared profiles and independent code fallbacks; never credentials or connection settings. This does not probe provider availability. Generation and tenant-aware GET /models remain authenticated.
Path parameters and metadata¶
Authentication¶
Parameters¶
Request body¶
Responses¶
{
"200": {
"content": {
"application/json": {
"example": {
"data": [
{
"aliases": [
"claude_sonnet_5_5"
],
"capabilities": {
"forced_tool_choice": false,
"json_output": true,
"reasoning": true,
"reasoning_efforts": [
"none",
"low",
"medium",
"high",
"xhigh",
"max"
],
"response_formats": [
"text",
"json_schema"
],
"streaming": false,
"supported_parameters": [
"max_tokens",
"max_completion_tokens",
"reasoning_effort",
"response_format",
"tools",
"tool_choice"
],
"tools": true
},
"created": 0,
"id": "claude-sonnet-5-5",
"object": "model",
"owned_by": "anthropic",
"profiles": [
"large"
],
"provider": "anthropic"
}
],
"default_provider": "anthropic",
"object": "list",
"providers": [
{
"configured": true,
"is_default": true,
"profiles": [
{
"available_in_genai": true,
"fallback": {
"model": "claude-sonnet-5-5"
},
"model": "claude-sonnet-5-5",
"name": "large",
"source": "provider"
}
],
"provider": "anthropic"
}
]
},
"schema": {
"$ref": "#/components/schemas/ModelList"
}
}
},
"description": "Successful Response"
},
"502": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenAIError"
}
}
},
"description": "The shared catalogue could not be loaded."
}
}
Referenced definitions: components/schemas/GenAIError, components/schemas/ModelList.
Operation metadata¶
{
"operationId": "public_catalogue_api_v1_catalogue_get",
"tags": [
"GenAI"
],
"x-database-compatibility": "MongoDB + PostgreSQL"
}
POST /genai/api/v1/chat/completions¶
Create a chat completion with a configured AIHub model
Database compatibility: MongoDB + PostgreSQL.
Generate one completion or relay provider chunks as SSE.
Path parameters and metadata¶
Authentication¶
Parameters¶
Request body¶
{
"content": {
"application/json": {
"examples": {
"configured_defaults": {
"description": "Omit provider, model and profile to use the authenticated configuration's default provider and internal default profile.",
"summary": "Minimal request using configured defaults",
"value": {
"messages": [
{
"content": "Explain skills matching in one sentence.",
"role": "user"
}
]
}
},
"function_tools": {
"description": "The caller executes returned function calls. For GPT-5.4, GPT-5.5, GPT-5.6 and GPT-6 Luna, Chat Completions tools require reasoning_effort=none. The model must be configured.",
"summary": "Function tools and explicit tool choice",
"value": {
"max_completion_tokens": 1000,
"messages": [
{
"content": "Find mentoring opportunities for a software engineer.",
"role": "user"
}
],
"model": "gpt-6-luna",
"parallel_tool_calls": false,
"provider": "openai",
"reasoning_effort": "none",
"stream": false,
"tool_choice": {
"function": {
"name": "find_mentoring_opportunities"
},
"type": "function"
},
"tools": [
{
"function": {
"description": "Find mentoring opportunities for the requested job title.",
"name": "find_mentoring_opportunities",
"parameters": {
"additionalProperties": false,
"properties": {
"job_title": {
"type": "string"
}
},
"required": [
"job_title"
],
"type": "object"
}
},
"type": "function"
}
]
}
},
"profile_json": {
"description": "Omit model to use the provider's configured mini profile. This example requires an Azure profile supporting JSON; check GET /models.",
"summary": "Provider and profile with JSON output",
"value": {
"max_completion_tokens": 1000,
"messages": [
{
"content": "Return a JSON object with a summary field explaining mentoring.",
"role": "user"
}
],
"profile": "mini",
"provider": "azure",
"response_format": {
"type": "json_object"
},
"stream": false
}
},
"sampling": {
"description": "Sampling parameters are model-dependent and are not accepted for every reasoning model. Select a configured model supporting these fields from GET /models.",
"summary": "Text output and sampling controls",
"value": {
"frequency_penalty": 0,
"max_completion_tokens": 500,
"messages": [
{
"content": "Suggest three practical mentoring activities.",
"role": "user"
}
],
"model": "gpt-4o",
"presence_penalty": 0,
"provider": "openai",
"response_format": {
"type": "text"
},
"seed": 42,
"stop": [
"END"
],
"stream": false,
"temperature": 0.4,
"top_p": 0.9
}
},
"streaming_json": {
"description": "Requires a configured OpenAI/Azure streaming model. Concatenate content deltas before parsing JSON; stream_options is valid only when stream=true.",
"summary": "SSE streaming with JSON output and final usage",
"value": {
"max_completion_tokens": 1000,
"messages": [
{
"content": "Return a JSON object with a summary field explaining skills matching.",
"role": "user"
}
],
"model": "gpt-6-luna",
"provider": "openai",
"reasoning_effort": "low",
"response_format": {
"type": "json_object"
},
"stream": true,
"stream_options": {
"include_usage": true
}
}
},
"structured_reasoning_cache": {
"description": "Detailed example. The explicit model takes priority over profile. Use GET /models to select a configured model and verify its supported controls. These illustrative values are not runtime defaults.",
"summary": "Model, profile, reasoning, JSON Schema and prompt cache",
"value": {
"max_completion_tokens": 1000,
"messages": [
{
"content": "Explain skills matching clearly and return JSON matching the supplied schema.",
"role": "developer"
},
{
"content": "Summarize the benefits of skills matching for an employee.",
"role": "user"
}
],
"model": "gpt-6-luna",
"profile": "mini",
"prompt_cache_key": "skills-matching-v1",
"prompt_cache_options": {
"mode": "implicit",
"ttl": "30m"
},
"provider": "openai",
"reasoning_effort": "low",
"response_format": {
"json_schema": {
"name": "skills_matching_summary",
"schema": {
"additionalProperties": false,
"properties": {
"summary": {
"type": "string"
}
},
"required": [
"summary"
],
"type": "object"
},
"strict": true
},
"type": "json_schema"
},
"stream": false
}
}
},
"schema": {
"$ref": "#/components/schemas/ChatCompletionRequest"
}
}
},
"required": true
}
Referenced definitions: components/schemas/ChatCompletionRequest.
Responses¶
{
"200": {
"content": {
"application/json": {
"example": {
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "A concise summary.",
"role": "assistant"
}
}
],
"created": 1760000000,
"id": "chatcmpl-example",
"model": "configured-mini-model",
"object": "chat.completion"
},
"schema": {
"$ref": "#/components/schemas/ChatCompletion"
}
}
},
"description": "Chat completion JSON, or OpenAI-style SSE when stream is true."
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenAIError"
}
}
},
"description": "The provider rejected an invalid request."
},
"422": {
"content": {
"application/json": {
"examples": {
"invalid_anthropic_history": {
"summary": "Direct document in native assistant content",
"value": {
"error": {
"code": "invalid_request",
"message": "The request contains invalid or incompatible parameters.",
"type": "invalid_request_error"
},
"request_id": "example-request-id"
}
},
"unsupported_capability": {
"summary": "Unsupported generation control",
"value": {
"error": {
"code": "unsupported_capability",
"message": "The selected model does not support the requested option. See GET /models.",
"param": "reasoning_effort",
"type": "invalid_request_error"
},
"request_id": "example-request-id"
}
}
},
"schema": {
"$ref": "#/components/schemas/GenAIError"
}
}
},
"description": "Invalid input or unsupported model capability."
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenAIError"
}
}
},
"description": "Provider rate limit."
},
"502": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenAIError"
}
}
},
"description": "Provider unavailable."
}
}
Referenced definitions: components/schemas/ChatCompletion, components/schemas/GenAIError.
Operation metadata¶
{
"operationId": "chat_completions_api_v1_chat_completions_post",
"tags": [
"GenAI"
],
"x-database-compatibility": "MongoDB + PostgreSQL"
}
GET /genai/api/v1/models¶
List configured providers, models and supported generation controls
Database compatibility: MongoDB + PostgreSQL.
Returns catalogue entries available to this deployment and the active tenant profile mappings. This does not probe provider credentials, quotas or live availability. Use each entry's provider and id in POST /chat/completions.
Path parameters and metadata¶
Authentication¶
Parameters¶
[
{
"description": "Filter the configured catalogue by provider.",
"in": "query",
"name": "provider",
"required": false,
"schema": {
"anyOf": [
{
"enum": [
"openai",
"azure",
"anthropic",
"ovh"
],
"type": "string"
},
{
"type": "null"
}
],
"description": "Filter the configured catalogue by provider.",
"examples": [
"azure"
],
"title": "Provider"
}
}
]
Request body¶
Responses¶
{
"200": {
"content": {
"application/json": {
"example": {
"data": [
{
"aliases": [
"gpt_4o"
],
"capabilities": {
"forced_tool_choice": true,
"json_output": true,
"prompt_cache_parameters": [
"prompt_cache_key"
],
"prompt_cache_retentions": [],
"reasoning": false,
"reasoning_efforts": [],
"response_formats": [
"text",
"json_object",
"json_schema"
],
"streaming": true,
"supported_parameters": [
"frequency_penalty",
"max_completion_tokens",
"max_tokens",
"parallel_tool_calls",
"presence_penalty",
"prompt_cache_key",
"response_format",
"seed",
"stop",
"stream",
"stream_options",
"temperature",
"tool_choice",
"tools",
"top_p"
],
"tools": true
},
"created": 0,
"id": "gpt-4o",
"object": "model",
"owned_by": "azure",
"profiles": [
"default",
"tiny",
"mini"
],
"provider": "azure"
}
],
"default_provider": "azure",
"object": "list",
"providers": [
{
"configured": true,
"is_default": true,
"profiles": [
{
"available_in_genai": true,
"fallback": {
"model": "gpt-5.4-mini",
"reasoning_effort": "low"
},
"model": "gpt-4o",
"name": "mini",
"source": "provider"
}
],
"provider": "azure"
}
]
},
"schema": {
"$ref": "#/components/schemas/ModelList"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenAIError"
}
}
},
"description": "Unprocessable Content"
},
"502": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenAIError"
}
}
},
"description": "Bad Gateway"
}
}
Referenced definitions: components/schemas/GenAIError, components/schemas/ModelList.
Operation metadata¶
{
"operationId": "models_api_v1_models_get",
"tags": [
"GenAI"
],
"x-database-compatibility": "MongoDB + PostgreSQL"
}
Shared definitions¶
Annotation (schemas)¶
{
"additionalProperties": true,
"description": "A URL citation when using web search.",
"properties": {
"type": {
"const": "url_citation",
"title": "Type",
"type": "string"
},
"url_citation": {
"$ref": "#/components/schemas/AnnotationURLCitation"
}
},
"required": [
"type",
"url_citation"
],
"title": "Annotation",
"type": "object"
}
Referenced definitions: components/schemas/AnnotationURLCitation.
AnnotationURLCitation (schemas)¶
{
"additionalProperties": true,
"description": "A URL citation when using web search.",
"properties": {
"end_index": {
"title": "End Index",
"type": "integer"
},
"start_index": {
"title": "Start Index",
"type": "integer"
},
"title": {
"title": "Title",
"type": "string"
},
"url": {
"title": "Url",
"type": "string"
}
},
"required": [
"end_index",
"start_index",
"title",
"url"
],
"title": "AnnotationURLCitation",
"type": "object"
}
AvailableModel (schemas)¶
{
"additionalProperties": false,
"description": "One configured model; no credentials or internal connection data.",
"properties": {
"aliases": {
"items": {
"type": "string"
},
"title": "Aliases",
"type": "array"
},
"capabilities": {
"$ref": "#/components/schemas/ModelCapabilities"
},
"created": {
"default": 0,
"title": "Created",
"type": "integer"
},
"id": {
"title": "Id",
"type": "string"
},
"object": {
"const": "model",
"default": "model",
"title": "Object",
"type": "string"
},
"owned_by": {
"enum": [
"openai",
"azure",
"anthropic",
"ovh"
],
"title": "Owned By",
"type": "string"
},
"profiles": {
"items": {
"type": "string"
},
"title": "Profiles",
"type": "array"
},
"provider": {
"enum": [
"openai",
"azure",
"anthropic",
"ovh"
],
"title": "Provider",
"type": "string"
}
},
"required": [
"id",
"owned_by",
"provider",
"aliases",
"profiles",
"capabilities"
],
"title": "AvailableModel",
"type": "object"
}
Referenced definitions: components/schemas/ModelCapabilities.
ChatCompletion (schemas)¶
{
"additionalProperties": true,
"description": "Represents a chat completion response returned by model, based on the provided input.",
"properties": {
"choices": {
"items": {
"$ref": "#/components/schemas/Choice"
},
"title": "Choices",
"type": "array"
},
"created": {
"title": "Created",
"type": "integer"
},
"id": {
"title": "Id",
"type": "string"
},
"metadata": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"title": "Metadata"
},
"model": {
"title": "Model",
"type": "string"
},
"moderation": {
"anyOf": [
{
"$ref": "#/components/schemas/Moderation"
},
{
"type": "null"
}
]
},
"object": {
"const": "chat.completion",
"title": "Object",
"type": "string"
},
"service_tier": {
"anyOf": [
{
"enum": [
"auto",
"default",
"flex",
"scale",
"priority",
"fast"
],
"type": "string"
},
{
"type": "null"
}
],
"title": "Service Tier"
},
"system_fingerprint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "System Fingerprint"
},
"usage": {
"anyOf": [
{
"$ref": "#/components/schemas/CompletionUsage"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"choices",
"created",
"model",
"object"
],
"title": "ChatCompletion",
"type": "object"
}
Referenced definitions: components/schemas/Choice, components/schemas/CompletionUsage, components/schemas/Moderation.
ChatCompletionAudio (schemas)¶
{
"additionalProperties": true,
"description": "If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](https://developers.openai.com/api/docs/guides/audio).",
"properties": {
"data": {
"title": "Data",
"type": "string"
},
"expires_at": {
"title": "Expires At",
"type": "integer"
},
"id": {
"title": "Id",
"type": "string"
},
"transcript": {
"title": "Transcript",
"type": "string"
}
},
"required": [
"id",
"data",
"expires_at",
"transcript"
],
"title": "ChatCompletionAudio",
"type": "object"
}
ChatCompletionMessage (schemas)¶
{
"additionalProperties": true,
"description": "A chat completion message generated by the model.",
"properties": {
"annotations": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/Annotation"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Annotations"
},
"audio": {
"anyOf": [
{
"$ref": "#/components/schemas/ChatCompletionAudio"
},
{
"type": "null"
}
]
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Content"
},
"function_call": {
"anyOf": [
{
"$ref": "#/components/schemas/FunctionCall"
},
{
"type": "null"
}
]
},
"refusal": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Refusal"
},
"role": {
"const": "assistant",
"title": "Role",
"type": "string"
},
"tool_calls": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/ChatCompletionMessageFunctionToolCall"
},
{
"$ref": "#/components/schemas/ChatCompletionMessageCustomToolCall"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Tool Calls"
}
},
"required": [
"role"
],
"title": "ChatCompletionMessage",
"type": "object"
}
Referenced definitions: components/schemas/Annotation, components/schemas/ChatCompletionAudio, components/schemas/ChatCompletionMessageCustomToolCall, components/schemas/ChatCompletionMessageFunctionToolCall, components/schemas/FunctionCall.
ChatCompletionMessageCustomToolCall (schemas)¶
{
"additionalProperties": true,
"description": "A call to a custom tool created by the model.",
"properties": {
"custom": {
"$ref": "#/components/schemas/Custom"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "custom",
"title": "Type",
"type": "string"
}
},
"required": [
"id",
"custom",
"type"
],
"title": "ChatCompletionMessageCustomToolCall",
"type": "object"
}
Referenced definitions: components/schemas/Custom.
ChatCompletionMessageFunctionToolCall (schemas)¶
{
"additionalProperties": true,
"description": "A call to a function tool created by the model.",
"properties": {
"function": {
"$ref": "#/components/schemas/Function"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "function",
"title": "Type",
"type": "string"
}
},
"required": [
"id",
"function",
"type"
],
"title": "ChatCompletionMessageFunctionToolCall",
"type": "object"
}
Referenced definitions: components/schemas/Function.
ChatCompletionRequest (schemas)¶
{
"additionalProperties": false,
"description": "Select a configured model and pass supported Chat Completions controls.",
"examples": [
{
"max_completion_tokens": 1000,
"messages": [
{
"content": "Explain skills matching clearly and return JSON matching the supplied schema.",
"role": "developer"
},
{
"content": "Summarize the benefits of skills matching for an employee.",
"role": "user"
}
],
"model": "gpt-6-luna",
"profile": "mini",
"prompt_cache_key": "skills-matching-v1",
"prompt_cache_options": {
"mode": "implicit",
"ttl": "30m"
},
"provider": "openai",
"reasoning_effort": "low",
"response_format": {
"json_schema": {
"name": "skills_matching_summary",
"schema": {
"additionalProperties": false,
"properties": {
"summary": {
"type": "string"
}
},
"required": [
"summary"
],
"type": "object"
},
"strict": true
},
"type": "json_schema"
},
"stream": false
},
{
"max_completion_tokens": 1000,
"messages": [
{
"content": "Return a JSON object with a summary field explaining mentoring.",
"role": "user"
}
],
"profile": "mini",
"provider": "azure",
"response_format": {
"type": "json_object"
},
"stream": false
},
{
"frequency_penalty": 0,
"max_completion_tokens": 500,
"messages": [
{
"content": "Suggest three practical mentoring activities.",
"role": "user"
}
],
"model": "gpt-4o",
"presence_penalty": 0,
"provider": "openai",
"response_format": {
"type": "text"
},
"seed": 42,
"stop": [
"END"
],
"stream": false,
"temperature": 0.4,
"top_p": 0.9
},
{
"max_completion_tokens": 1000,
"messages": [
{
"content": "Find mentoring opportunities for a software engineer.",
"role": "user"
}
],
"model": "gpt-6-luna",
"parallel_tool_calls": false,
"provider": "openai",
"reasoning_effort": "none",
"stream": false,
"tool_choice": {
"function": {
"name": "find_mentoring_opportunities"
},
"type": "function"
},
"tools": [
{
"function": {
"description": "Find mentoring opportunities for the requested job title.",
"name": "find_mentoring_opportunities",
"parameters": {
"additionalProperties": false,
"properties": {
"job_title": {
"type": "string"
}
},
"required": [
"job_title"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"max_completion_tokens": 1000,
"messages": [
{
"content": "Return a JSON object with a summary field explaining skills matching.",
"role": "user"
}
],
"model": "gpt-6-luna",
"provider": "openai",
"reasoning_effort": "low",
"response_format": {
"type": "json_object"
},
"stream": true,
"stream_options": {
"include_usage": true
}
},
{
"messages": [
{
"content": "Explain skills matching in one sentence.",
"role": "user"
}
]
}
],
"properties": {
"frequency_penalty": {
"anyOf": [
{
"maximum": 2.0,
"minimum": -2.0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Frequency Penalty"
},
"max_completion_tokens": {
"anyOf": [
{
"maximum": 16000.0,
"minimum": 1.0,
"type": "integer"
},
{
"type": "null"
}
],
"description": "Output budget including reasoning tokens.",
"examples": [
1000
],
"title": "Max Completion Tokens"
},
"max_tokens": {
"anyOf": [
{
"maximum": 16000.0,
"minimum": 1.0,
"type": "integer"
},
{
"type": "null"
}
],
"description": "Legacy token limit; cannot be combined with max_completion_tokens.",
"title": "Max Tokens"
},
"messages": {
"description": "Conversation messages. Replay assistant anthropic_content unchanged; direct document blocks in that extension are rejected with HTTP 422. Supply new documents as user file parts. Documents nested in native tool results remain accepted.",
"examples": [
[
{
"content": "Explain this sample role.",
"role": "user"
}
]
],
"items": {
"additionalProperties": true,
"type": "object"
},
"maxItems": 100,
"minItems": 1,
"title": "Messages",
"type": "array"
},
"model": {
"anyOf": [
{
"maxLength": 150,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"description": "Catalogue model ID or alias. Takes priority over profile.",
"examples": [
"gpt-6-luna"
],
"title": "Model"
},
"parallel_tool_calls": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Parallel Tool Calls"
},
"presence_penalty": {
"anyOf": [
{
"maximum": 2.0,
"minimum": -2.0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Presence Penalty"
},
"profile": {
"anyOf": [
{
"enum": [
"tiny",
"mini",
"large",
"reasoning"
],
"type": "string"
},
{
"type": "null"
}
],
"description": "Used only when model is absent. Omitted/null selects the internal default profile.",
"examples": [
"mini"
],
"title": "Profile"
},
"prompt_cache_key": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"examples": [
"role-summary-v1"
],
"title": "Prompt Cache Key"
},
"prompt_cache_options": {
"anyOf": [
{
"$ref": "#/components/schemas/PromptCacheOptions"
},
{
"type": "null"
}
]
},
"prompt_cache_retention": {
"anyOf": [
{
"enum": [
"in_memory",
"24h"
],
"type": "string"
},
{
"type": "null"
}
],
"description": "Legacy cache lifetime for supported models before GPT-5.6. For GPT-5.6 and GPT-6, use prompt_cache_options.ttl instead.",
"examples": [
"24h"
],
"title": "Prompt Cache Retention"
},
"provider": {
"anyOf": [
{
"enum": [
"openai",
"azure",
"anthropic",
"ovh"
],
"type": "string"
},
{
"type": "null"
}
],
"description": "Provider to use; omitted/null uses the authenticated configuration.",
"examples": [
"openai",
"anthropic"
],
"title": "Provider"
},
"reasoning_effort": {
"anyOf": [
{
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh",
"max"
],
"type": "string"
},
{
"type": "null"
}
],
"description": "Overrides the selected profile's effort. Check /models for supported values.",
"examples": [
"low"
],
"title": "Reasoning Effort"
},
"response_format": {
"anyOf": [
{
"discriminator": {
"mapping": {
"json_object": "#/components/schemas/JSONObjectFormat",
"json_schema": "#/components/schemas/JSONSchemaFormat",
"text": "#/components/schemas/TextFormat"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/components/schemas/TextFormat"
},
{
"$ref": "#/components/schemas/JSONObjectFormat"
},
{
"$ref": "#/components/schemas/JSONSchemaFormat"
}
]
},
{
"type": "null"
}
],
"description": "Controls the generated content; the response keeps its Chat Completions envelope.",
"examples": [
{
"type": "json_object"
}
],
"title": "Response Format"
},
"seed": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Seed"
},
"stop": {
"anyOf": [
{
"maxLength": 1024,
"minLength": 1,
"type": "string"
},
{
"items": {
"maxLength": 1024,
"minLength": 1,
"type": "string"
},
"maxItems": 4,
"minItems": 1,
"type": "array"
},
{
"type": "null"
}
],
"title": "Stop"
},
"stream": {
"default": false,
"title": "Stream",
"type": "boolean"
},
"stream_options": {
"anyOf": [
{
"$ref": "#/components/schemas/StreamOptions"
},
{
"type": "null"
}
]
},
"temperature": {
"anyOf": [
{
"maximum": 2.0,
"minimum": 0.0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Temperature"
},
"tool_choice": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Tool Choice"
},
"tools": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"maxItems": 20,
"type": "array"
},
{
"type": "null"
}
],
"title": "Tools"
},
"top_p": {
"anyOf": [
{
"maximum": 1.0,
"minimum": 0.0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Top P"
}
},
"required": [
"messages"
],
"title": "ChatCompletionRequest",
"type": "object"
}
Referenced definitions: components/schemas/JSONObjectFormat, components/schemas/JSONSchemaFormat, components/schemas/PromptCacheOptions, components/schemas/StreamOptions, components/schemas/TextFormat.
ChatCompletionTokenLogprob (schemas)¶
{
"additionalProperties": true,
"properties": {
"bytes": {
"anyOf": [
{
"items": {
"type": "integer"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Bytes"
},
"logprob": {
"title": "Logprob",
"type": "number"
},
"token": {
"title": "Token",
"type": "string"
},
"top_logprobs": {
"items": {
"$ref": "#/components/schemas/TopLogprob"
},
"title": "Top Logprobs",
"type": "array"
}
},
"required": [
"token",
"logprob",
"top_logprobs"
],
"title": "ChatCompletionTokenLogprob",
"type": "object"
}
Referenced definitions: components/schemas/TopLogprob.
Choice (schemas)¶
{
"additionalProperties": true,
"properties": {
"finish_reason": {
"enum": [
"stop",
"length",
"tool_calls",
"content_filter",
"function_call"
],
"title": "Finish Reason",
"type": "string"
},
"index": {
"title": "Index",
"type": "integer"
},
"logprobs": {
"anyOf": [
{
"$ref": "#/components/schemas/ChoiceLogprobs"
},
{
"type": "null"
}
]
},
"message": {
"$ref": "#/components/schemas/ChatCompletionMessage"
}
},
"required": [
"finish_reason",
"index",
"message"
],
"title": "Choice",
"type": "object"
}
Referenced definitions: components/schemas/ChatCompletionMessage, components/schemas/ChoiceLogprobs.
ChoiceLogprobs (schemas)¶
{
"additionalProperties": true,
"description": "Log probability information for the choice.",
"properties": {
"content": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/ChatCompletionTokenLogprob"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Content"
},
"refusal": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/ChatCompletionTokenLogprob"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Refusal"
}
},
"title": "ChoiceLogprobs",
"type": "object"
}
Referenced definitions: components/schemas/ChatCompletionTokenLogprob.
CompletionTokensDetails (schemas)¶
{
"additionalProperties": true,
"description": "Breakdown of tokens used in a completion.",
"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"
},
"text_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Text Tokens"
}
},
"title": "CompletionTokensDetails",
"type": "object"
}
CompletionUsage (schemas)¶
{
"additionalProperties": true,
"description": "Usage statistics for the completion request.",
"properties": {
"completion_tokens": {
"title": "Completion Tokens",
"type": "integer"
},
"completion_tokens_details": {
"anyOf": [
{
"$ref": "#/components/schemas/CompletionTokensDetails"
},
{
"type": "null"
}
]
},
"prompt_tokens": {
"title": "Prompt Tokens",
"type": "integer"
},
"prompt_tokens_details": {
"anyOf": [
{
"$ref": "#/components/schemas/PromptTokensDetails"
},
{
"type": "null"
}
]
},
"total_tokens": {
"title": "Total Tokens",
"type": "integer"
}
},
"required": [
"completion_tokens",
"prompt_tokens",
"total_tokens"
],
"title": "CompletionUsage",
"type": "object"
}
Referenced definitions: components/schemas/CompletionTokensDetails, components/schemas/PromptTokensDetails.
Custom (schemas)¶
{
"additionalProperties": true,
"description": "The custom tool that the model called.",
"properties": {
"input": {
"title": "Input",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"input",
"name"
],
"title": "Custom",
"type": "object"
}
DiscoveredProfile (schemas)¶
{
"additionalProperties": false,
"description": "Effective runtime profile, provenance and independently reported fallback.",
"properties": {
"available_in_genai": {
"title": "Available In Genai",
"type": "boolean"
},
"fallback": {
"$ref": "#/components/schemas/ProfileModel"
},
"inherited_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Inherited From"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Model"
},
"name": {
"title": "Name",
"type": "string"
},
"reasoning_effort": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reasoning Effort"
},
"source": {
"enum": [
"tenant",
"provider",
"code_fallback",
"unresolved"
],
"title": "Source",
"type": "string"
}
},
"required": [
"name",
"source",
"available_in_genai",
"fallback"
],
"title": "DiscoveredProfile",
"type": "object"
}
Referenced definitions: components/schemas/ProfileModel.
ErrorDetail (schemas)¶
{
"additionalProperties": false,
"description": "A sanitized OpenAI-shaped API error.",
"properties": {
"code": {
"title": "Code",
"type": "string"
},
"message": {
"title": "Message",
"type": "string"
},
"param": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Param"
},
"type": {
"enum": [
"invalid_request_error",
"api_error",
"rate_limit_error"
],
"title": "Type",
"type": "string"
}
},
"required": [
"message",
"type",
"code"
],
"title": "ErrorDetail",
"type": "object"
}
Function (schemas)¶
{
"additionalProperties": true,
"description": "The function that the model called.",
"properties": {
"arguments": {
"title": "Arguments",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"arguments",
"name"
],
"title": "Function",
"type": "object"
}
FunctionCall (schemas)¶
{
"additionalProperties": true,
"description": "Deprecated and replaced by `tool_calls`.\n\nThe name and arguments of a function that should be called, as generated by the model.",
"properties": {
"arguments": {
"title": "Arguments",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"arguments",
"name"
],
"title": "FunctionCall",
"type": "object"
}
GenAIError (schemas)¶
{
"additionalProperties": false,
"description": "Expose a stable failure code and correlation identifier.",
"properties": {
"error": {
"$ref": "#/components/schemas/ErrorDetail"
},
"request_id": {
"title": "Request Id",
"type": "string"
}
},
"required": [
"error",
"request_id"
],
"title": "GenAIError",
"type": "object"
}
Referenced definitions: components/schemas/ErrorDetail.
JSONObjectFormat (schemas)¶
{
"additionalProperties": false,
"description": "Request a JSON object; messages must instruct the model to produce JSON.",
"properties": {
"type": {
"const": "json_object",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "JSONObjectFormat",
"type": "object"
}
JSONSchemaDefinition (schemas)¶
{
"additionalProperties": false,
"description": "Use the OpenAI JSON Schema envelope without renaming its schema field.",
"properties": {
"description": {
"anyOf": [
{
"maxLength": 4096,
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"name": {
"maxLength": 64,
"minLength": 1,
"pattern": "^[A-Za-z0-9_-]+$",
"title": "Name",
"type": "string"
},
"schema": {
"additionalProperties": true,
"title": "Schema",
"type": "object"
},
"strict": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Strict"
}
},
"required": [
"name",
"schema"
],
"title": "JSONSchemaDefinition",
"type": "object"
}
JSONSchemaFormat (schemas)¶
{
"additionalProperties": false,
"description": "Request output matching the supplied JSON Schema.",
"properties": {
"json_schema": {
"$ref": "#/components/schemas/JSONSchemaDefinition"
},
"type": {
"const": "json_schema",
"title": "Type",
"type": "string"
}
},
"required": [
"type",
"json_schema"
],
"title": "JSONSchemaFormat",
"type": "object"
}
Referenced definitions: components/schemas/JSONSchemaDefinition.
ModelCapabilities (schemas)¶
{
"additionalProperties": false,
"description": "Capabilities actually exposed by the GenAI adapter for this model.",
"properties": {
"forced_tool_choice": {
"default": true,
"description": "Whether required and named function choices are supported.",
"examples": [
false
],
"title": "Forced Tool Choice",
"type": "boolean"
},
"json_output": {
"default": false,
"title": "Json Output",
"type": "boolean"
},
"prompt_cache_parameters": {
"items": {
"type": "string"
},
"title": "Prompt Cache Parameters",
"type": "array"
},
"prompt_cache_retentions": {
"items": {
"type": "string"
},
"title": "Prompt Cache Retentions",
"type": "array"
},
"reasoning": {
"default": false,
"title": "Reasoning",
"type": "boolean"
},
"reasoning_efforts": {
"items": {
"type": "string"
},
"title": "Reasoning Efforts",
"type": "array"
},
"response_formats": {
"items": {
"type": "string"
},
"title": "Response Formats",
"type": "array"
},
"streaming": {
"default": false,
"title": "Streaming",
"type": "boolean"
},
"supported_parameters": {
"items": {
"type": "string"
},
"title": "Supported Parameters",
"type": "array"
},
"tool_reasoning_efforts": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Tool Reasoning Efforts"
},
"tools": {
"default": true,
"title": "Tools",
"type": "boolean"
}
},
"title": "ModelCapabilities",
"type": "object"
}
ModelList (schemas)¶
{
"additionalProperties": false,
"description": "OpenAI list envelope with configured provider and model metadata.",
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/AvailableModel"
},
"title": "Data",
"type": "array"
},
"default_provider": {
"anyOf": [
{
"enum": [
"openai",
"azure",
"anthropic",
"ovh"
],
"type": "string"
},
{
"type": "null"
}
],
"title": "Default Provider"
},
"object": {
"const": "list",
"default": "list",
"title": "Object",
"type": "string"
},
"providers": {
"items": {
"$ref": "#/components/schemas/ProviderProfiles"
},
"title": "Providers",
"type": "array"
}
},
"required": [
"data"
],
"title": "ModelList",
"type": "object"
}
Referenced definitions: components/schemas/AvailableModel, components/schemas/ProviderProfiles.
Moderation (schemas)¶
{
"additionalProperties": true,
"description": "Moderation results for the request input and generated output, if moderated\ncompletions were requested.",
"properties": {
"input": {
"anyOf": [
{
"$ref": "#/components/schemas/ModerationInputModerationResults"
},
{
"$ref": "#/components/schemas/ModerationInputError"
}
],
"title": "Input"
},
"output": {
"anyOf": [
{
"$ref": "#/components/schemas/ModerationOutputModerationResults"
},
{
"$ref": "#/components/schemas/ModerationOutputError"
}
],
"title": "Output"
}
},
"required": [
"input",
"output"
],
"title": "Moderation",
"type": "object"
}
Referenced definitions: components/schemas/ModerationInputError, components/schemas/ModerationInputModerationResults, components/schemas/ModerationOutputError, components/schemas/ModerationOutputModerationResults.
ModerationInputError (schemas)¶
{
"additionalProperties": true,
"description": "An error produced while attempting moderation.",
"properties": {
"code": {
"title": "Code",
"type": "string"
},
"message": {
"title": "Message",
"type": "string"
},
"type": {
"const": "error",
"title": "Type",
"type": "string"
}
},
"required": [
"code",
"message",
"type"
],
"title": "ModerationInputError",
"type": "object"
}
ModerationInputModerationResults (schemas)¶
{
"additionalProperties": true,
"description": "Successful moderation results for the request input or generated output.",
"properties": {
"model": {
"title": "Model",
"type": "string"
},
"results": {
"items": {
"$ref": "#/components/schemas/ModerationInputModerationResultsResult"
},
"title": "Results",
"type": "array"
},
"type": {
"const": "moderation_results",
"title": "Type",
"type": "string"
}
},
"required": [
"model",
"results",
"type"
],
"title": "ModerationInputModerationResults",
"type": "object"
}
Referenced definitions: components/schemas/ModerationInputModerationResultsResult.
ModerationInputModerationResultsResult (schemas)¶
{
"additionalProperties": true,
"description": "A moderation result produced for the response input or output.",
"properties": {
"categories": {
"additionalProperties": {
"type": "boolean"
},
"title": "Categories",
"type": "object"
},
"category_applied_input_types": {
"additionalProperties": {
"items": {
"enum": [
"text",
"image"
],
"type": "string"
},
"type": "array"
},
"title": "Category Applied Input Types",
"type": "object"
},
"category_scores": {
"additionalProperties": {
"type": "number"
},
"title": "Category Scores",
"type": "object"
},
"flagged": {
"title": "Flagged",
"type": "boolean"
},
"model": {
"title": "Model",
"type": "string"
},
"type": {
"const": "moderation_result",
"title": "Type",
"type": "string"
}
},
"required": [
"categories",
"category_applied_input_types",
"category_scores",
"flagged",
"model",
"type"
],
"title": "ModerationInputModerationResultsResult",
"type": "object"
}
ModerationOutputError (schemas)¶
{
"additionalProperties": true,
"description": "An error produced while attempting moderation.",
"properties": {
"code": {
"title": "Code",
"type": "string"
},
"message": {
"title": "Message",
"type": "string"
},
"type": {
"const": "error",
"title": "Type",
"type": "string"
}
},
"required": [
"code",
"message",
"type"
],
"title": "ModerationOutputError",
"type": "object"
}
ModerationOutputModerationResults (schemas)¶
{
"additionalProperties": true,
"description": "Successful moderation results for the request input or generated output.",
"properties": {
"model": {
"title": "Model",
"type": "string"
},
"results": {
"items": {
"$ref": "#/components/schemas/ModerationOutputModerationResultsResult"
},
"title": "Results",
"type": "array"
},
"type": {
"const": "moderation_results",
"title": "Type",
"type": "string"
}
},
"required": [
"model",
"results",
"type"
],
"title": "ModerationOutputModerationResults",
"type": "object"
}
Referenced definitions: components/schemas/ModerationOutputModerationResultsResult.
ModerationOutputModerationResultsResult (schemas)¶
{
"additionalProperties": true,
"description": "A moderation result produced for the response input or output.",
"properties": {
"categories": {
"additionalProperties": {
"type": "boolean"
},
"title": "Categories",
"type": "object"
},
"category_applied_input_types": {
"additionalProperties": {
"items": {
"enum": [
"text",
"image"
],
"type": "string"
},
"type": "array"
},
"title": "Category Applied Input Types",
"type": "object"
},
"category_scores": {
"additionalProperties": {
"type": "number"
},
"title": "Category Scores",
"type": "object"
},
"flagged": {
"title": "Flagged",
"type": "boolean"
},
"model": {
"title": "Model",
"type": "string"
},
"type": {
"const": "moderation_result",
"title": "Type",
"type": "string"
}
},
"required": [
"categories",
"category_applied_input_types",
"category_scores",
"flagged",
"model",
"type"
],
"title": "ModerationOutputModerationResultsResult",
"type": "object"
}
ProfileModel (schemas)¶
{
"additionalProperties": false,
"description": "Safe projection of a resolved profile, before per-call reasoning policy.",
"properties": {
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Model"
},
"reasoning_effort": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reasoning Effort"
}
},
"title": "ProfileModel",
"type": "object"
}
PromptCacheOptions (schemas)¶
{
"additionalProperties": false,
"description": "Expose the pinned OpenAI SDK's explicit/implicit cache controls.",
"properties": {
"mode": {
"anyOf": [
{
"enum": [
"implicit",
"explicit"
],
"type": "string"
},
{
"type": "null"
}
],
"title": "Mode"
},
"ttl": {
"anyOf": [
{
"const": "30m",
"type": "string"
},
{
"type": "null"
}
],
"title": "Ttl"
}
},
"title": "PromptCacheOptions",
"type": "object"
}
PromptTokensDetails (schemas)¶
{
"additionalProperties": true,
"description": "Breakdown of tokens used in the prompt.",
"properties": {
"audio_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Audio Tokens"
},
"cache_write_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Cache Write Tokens"
},
"cached_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Cached Tokens"
},
"image_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Image Tokens"
},
"text_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Text Tokens"
}
},
"title": "PromptTokensDetails",
"type": "object"
}
ProviderProfiles (schemas)¶
{
"additionalProperties": false,
"description": "Configured provider and effective shared-connector profiles.",
"properties": {
"configured": {
"title": "Configured",
"type": "boolean"
},
"is_default": {
"title": "Is Default",
"type": "boolean"
},
"profiles": {
"items": {
"$ref": "#/components/schemas/DiscoveredProfile"
},
"title": "Profiles",
"type": "array"
},
"provider": {
"enum": [
"openai",
"azure",
"anthropic",
"ovh"
],
"title": "Provider",
"type": "string"
}
},
"required": [
"provider",
"configured",
"is_default",
"profiles"
],
"title": "ProviderProfiles",
"type": "object"
}
Referenced definitions: components/schemas/DiscoveredProfile.
StreamOptions (schemas)¶
{
"additionalProperties": false,
"description": "Request a final usage chunk before the stream terminator.",
"properties": {
"include_usage": {
"default": false,
"title": "Include Usage",
"type": "boolean"
}
},
"title": "StreamOptions",
"type": "object"
}
TextFormat (schemas)¶
{
"additionalProperties": false,
"description": "Request plain text output.",
"properties": {
"type": {
"const": "text",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "TextFormat",
"type": "object"
}
TopLogprob (schemas)¶
{
"additionalProperties": true,
"properties": {
"bytes": {
"anyOf": [
{
"items": {
"type": "integer"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Bytes"
},
"logprob": {
"title": "Logprob",
"type": "number"
},
"token": {
"title": "Token",
"type": "string"
}
},
"required": [
"token",
"logprob"
],
"title": "TopLogprob",
"type": "object"
}
APIKeyHeader (securitySchemes)¶
Client-ID (securitySchemes)¶
{
"description": "Optional client identifier.",
"in": "header",
"name": "Client-ID",
"type": "apiKey"
}