{ "components": { "schemas": { "AudioSpeechRequest": { "description": "OpenAI-compatible audio speech (TTS) request.\n\nThe speech fields are derived from any-llm's ``AudioSpeechParams`` (see\n``_schema_derive``) so the schema cannot silently drop a param any-llm\nforwards. ``user`` is gateway-only (billing / auth scoping); it is not an\nany-llm param and is stripped before the request is forwarded.", "properties": { "input": { "title": "Input", "type": "string" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "model": { "title": "Model", "type": "string" }, "response_format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Response Format" }, "speed": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Speed" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" }, "voice": { "title": "Voice", "type": "string" } }, "required": [ "model", "input", "voice" ], "title": "AudioSpeechRequest", "type": "object" }, "BatchRequestItem": { "properties": { "body": { "additionalProperties": true, "title": "Body", "type": "object" }, "custom_id": { "title": "Custom Id", "type": "string" } }, "required": [ "custom_id", "body" ], "title": "BatchRequestItem", "type": "object" }, "Body_create_file_v1_files_post": { "properties": { "file": { "contentMediaType": "application/octet-stream", "title": "File", "type": "string" }, "purpose": { "default": "user_data", "title": "Purpose", "type": "string" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, "required": [ "file" ], "title": "Body_create_file_v1_files_post", "type": "object" }, "Body_create_transcription_v1_audio_transcriptions_post": { "properties": { "file": { "contentMediaType": "application/octet-stream", "title": "File", "type": "string" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language" }, "model": { "title": "Model", "type": "string" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt" }, "response_format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Response Format" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, "required": [ "file", "model" ], "title": "Body_create_transcription_v1_audio_transcriptions_post", "type": "object" }, "BudgetResponse": { "description": "Response model for budget information.", "properties": { "budget_duration_sec": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Budget Duration Sec" }, "budget_id": { "title": "Budget Id", "type": "string" }, "created_at": { "title": "Created At", "type": "string" }, "max_budget": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Max Budget" }, "updated_at": { "title": "Updated At", "type": "string" } }, "required": [ "budget_id", "max_budget", "budget_duration_sec", "created_at", "updated_at" ], "title": "BudgetResponse", "type": "object" }, "ChatCompletionRequest": { "description": "OpenAI-compatible chat completion request.\n\nThe completion-param fields are derived from any-llm's ``CompletionParams``\n(see ``_schema_derive``) so the schema cannot silently drop a param any-llm\nforwards. Fields below either tighten a derived field (``messages``,\n``response_format``) or add gateway-internal behavior (``mcp_servers``,\n``mcp_server_ids``, ``guardrails``, ``tools_header``, ``max_tool_iterations``)\nthat is stripped before the request is forwarded upstream.", "properties": { "frequency_penalty": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Frequency Penalty" }, "guardrails": { "anyOf": [ { "items": { "$ref": "#/components/schemas/GuardrailConfig" }, "maxItems": 8, "type": "array" }, { "type": "null" } ], "title": "Guardrails" }, "logit_bias": { "anyOf": [ { "additionalProperties": { "type": "number" }, "type": "object" }, { "type": "null" } ], "title": "Logit Bias" }, "logprobs": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Logprobs" }, "max_completion_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Completion Tokens" }, "max_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Tokens" }, "max_tool_iterations": { "anyOf": [ { "maximum": 25.0, "minimum": 1.0, "type": "integer" }, { "type": "null" } ], "title": "Max Tool Iterations" }, "mcp_server_ids": { "anyOf": [ { "items": { "format": "uuid", "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Mcp Server Ids" }, "mcp_servers": { "anyOf": [ { "items": { "$ref": "#/components/schemas/McpServerConfig" }, "type": "array" }, { "type": "null" } ], "title": "Mcp Servers" }, "messages": { "items": { "additionalProperties": true, "type": "object" }, "minItems": 1, "title": "Messages", "type": "array" }, "model": { "title": "Model", "type": "string" }, "n": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "N" }, "parallel_tool_calls": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Parallel Tool Calls" }, "presence_penalty": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Presence Penalty" }, "reasoning_effort": { "anyOf": [ { "enum": [ "none", "minimal", "low", "medium", "high", "xhigh", "max", "auto" ], "type": "string" }, { "type": "null" } ], "default": "auto", "title": "Reasoning Effort" }, "response_format": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Response Format" }, "seed": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seed" }, "session_label": { "anyOf": [ { "maxLength": 255, "type": "string" }, { "type": "null" } ], "description": "Optional caller-supplied label for cost attribution (per run, experiment, or conversation). In hybrid mode it is forwarded onto the platform usage report so spend can be sliced by session without standing up OpenTelemetry. Stripped before the request is forwarded upstream to the provider. Has no effect in standalone mode, where there is no platform to report it to.", "title": "Session Label" }, "stop": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Stop" }, "stream": { "default": false, "title": "Stream", "type": "boolean" }, "stream_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Stream Options" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "tool_choice": { "anyOf": [ { "type": "string" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Tool Choice" }, "tools": { "anyOf": [ { "items": { "anyOf": [ { "additionalProperties": true, "type": "object" }, {} ] }, "type": "array" }, { "type": "null" } ], "title": "Tools" }, "tools_header": { "anyOf": [ { "maxLength": 4000, "type": "string" }, { "type": "null" } ], "description": "Optional override for the lead-in that the gateway prepends before the per-tool hint block in the system message. Useful for expressing global tool-selection policy (e.g. 'prefer MCP tools over code_execution'). Falls back to OTARI_TOOLS_HEADER env, then to the built-in default.", "title": "Tools Header" }, "top_logprobs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Top Logprobs" }, "top_p": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Top P" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, "required": [ "model", "messages" ], "title": "ChatCompletionRequest", "type": "object" }, "CountTokensRequest": { "description": "Anthropic ``/v1/messages/count_tokens`` request.\n\nA subset of :class:`MessagesRequest`: the input fields that affect the token\ncount, minus ``max_tokens`` and the streaming/sampling controls, since the\nendpoint only counts input tokens. Clients such as Claude Code call this on\nevery turn to keep their prompt within the model's context window.", "properties": { "cache_control": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Cache Control" }, "messages": { "items": { "additionalProperties": true, "type": "object" }, "minItems": 1, "title": "Messages", "type": "array" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "model": { "title": "Model", "type": "string" }, "system": { "anyOf": [ { "type": "string" }, { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "System" }, "thinking": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Thinking" }, "tool_choice": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Tool Choice" }, "tools": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Tools" } }, "required": [ "model", "messages" ], "title": "CountTokensRequest", "type": "object" }, "CountTokensResponse": { "description": "Anthropic ``/v1/messages/count_tokens`` response.", "properties": { "input_tokens": { "title": "Input Tokens", "type": "integer" } }, "required": [ "input_tokens" ], "title": "CountTokensResponse", "type": "object" }, "CreateBatchRequest": { "properties": { "completion_window": { "default": "24h", "title": "Completion Window", "type": "string" }, "metadata": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "model": { "title": "Model", "type": "string" }, "requests": { "items": { "$ref": "#/components/schemas/BatchRequestItem" }, "maxItems": 10000, "minItems": 1, "title": "Requests", "type": "array" } }, "required": [ "model", "requests" ], "title": "CreateBatchRequest", "type": "object" }, "CreateBudgetRequest": { "description": "Request model for creating a new budget.", "properties": { "budget_duration_sec": { "anyOf": [ { "exclusiveMinimum": 0.0, "type": "integer" }, { "type": "null" } ], "description": "Budget duration in seconds (e.g., 86400 for daily, 604800 for weekly)", "title": "Budget Duration Sec" }, "max_budget": { "anyOf": [ { "minimum": 0.0, "type": "number" }, { "type": "null" } ], "description": "Maximum spending limit", "title": "Max Budget" } }, "title": "CreateBudgetRequest", "type": "object" }, "CreateKeyRequest": { "description": "Request model for creating a new API key.", "properties": { "expires_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "Optional expiration timestamp", "title": "Expires At" }, "key_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional name for the key", "title": "Key Name" }, "metadata": { "additionalProperties": true, "description": "Optional metadata", "title": "Metadata", "type": "object" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional user ID to associate with this key", "title": "User Id" } }, "title": "CreateKeyRequest", "type": "object" }, "CreateKeyResponse": { "description": "Response model for creating a new API key.", "properties": { "created_at": { "title": "Created At", "type": "string" }, "expires_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Expires At" }, "id": { "title": "Id", "type": "string" }, "is_active": { "title": "Is Active", "type": "boolean" }, "key": { "title": "Key", "type": "string" }, "key_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Key Name" }, "metadata": { "additionalProperties": true, "title": "Metadata", "type": "object" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" } }, "required": [ "id", "key", "key_name", "user_id", "created_at", "expires_at", "is_active", "metadata" ], "title": "CreateKeyResponse", "type": "object" }, "CreateUserRequest": { "description": "Request model for creating a new user.", "properties": { "alias": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional admin-facing alias", "title": "Alias" }, "blocked": { "default": false, "description": "Whether user is blocked", "title": "Blocked", "type": "boolean" }, "budget_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional budget ID", "title": "Budget Id" }, "metadata": { "additionalProperties": true, "description": "Optional metadata", "title": "Metadata", "type": "object" }, "user_id": { "description": "Unique user identifier", "title": "User Id", "type": "string" } }, "required": [ "user_id" ], "title": "CreateUserRequest", "type": "object" }, "EmbeddingRequest": { "description": "OpenAI-compatible embedding request.", "properties": { "dimensions": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Dimensions" }, "encoding_format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Encoding Format" }, "input": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "description": "Input text to embed", "title": "Input" }, "model": { "title": "Model", "type": "string" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, "required": [ "model", "input" ], "title": "EmbeddingRequest", "type": "object" }, "GuardrailConfig": { "description": "A single guardrail check the caller wants the gateway to enforce.\n\nURL safety: when ``url`` is supplied it is validated by\n:func:`gateway.services.guardrails.run_input_guardrails` (not here at parse\ntime \u2014 the check does a DNS lookup that must be awaited) with the same\nSSRF guard used for MCP server URLs (loopback allowed by default for\nsame-host sidecars; gated by ``OTARI_MCP_ALLOW_LOOPBACK`` /\n``OTARI_MCP_ALLOW_PRIVATE_HOSTS``). Most deployments omit ``url`` and rely\non the operator-set ``OTARI_GUARDRAILS_URL`` instead.", "properties": { "mode": { "default": "monitor", "enum": [ "block", "monitor" ], "title": "Mode", "type": "string" }, "on": { "items": { "enum": [ "input", "output" ], "type": "string" }, "title": "On", "type": "array" }, "profile": { "maxLength": 128, "minLength": 1, "title": "Profile", "type": "string" }, "url": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "title": "Url" }, "validate_kwargs": { "additionalProperties": true, "title": "Validate Kwargs", "type": "object" } }, "required": [ "profile" ], "title": "GuardrailConfig", "type": "object" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "title": "Detail", "type": "array" } }, "title": "HTTPValidationError", "type": "object" }, "ImageGenerationRequest": { "description": "OpenAI-compatible image generation request.\n\nFields are derived from any-llm's ``ImageGenerationParams`` (see\n``_schema_derive``) so the schema cannot silently drop a param any-llm\nforwards.", "properties": { "model": { "title": "Model", "type": "string" }, "n": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "N" }, "prompt": { "title": "Prompt", "type": "string" }, "quality": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Quality" }, "response_format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Response Format" }, "size": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Size" }, "style": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Style" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, "required": [ "model", "prompt" ], "title": "ImageGenerationRequest", "type": "object" }, "KeyInfo": { "description": "Response model for key information.", "properties": { "created_at": { "title": "Created At", "type": "string" }, "expires_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Expires At" }, "id": { "title": "Id", "type": "string" }, "is_active": { "title": "Is Active", "type": "boolean" }, "key_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Key Name" }, "last_used_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Used At" }, "metadata": { "additionalProperties": true, "title": "Metadata", "type": "object" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" } }, "required": [ "id", "key_name", "user_id", "created_at", "last_used_at", "expires_at", "is_active", "metadata" ], "title": "KeyInfo", "type": "object" }, "McpServerConfig": { "description": "Inline MCP server configuration accepted on the chat completions request.\n\nStreamable HTTP transport. The `url` must be reachable from the gateway process.\n\nURL safety (SSRF guard against private/link-local/reserved IP ranges, plus\nrejecting plain ``http://`` when ``authorization_token`` is set) is\nenforced by :func:`gateway.services.url_safety.validate_mcp_url`, called\nfrom the async request pipeline (``prepare_gateway_tools``) rather than\nhere at parse time: the safety check does a DNS lookup, which must be\nawaited so it can't block the event loop, and Pydantic validators run\nsynchronously during request-body parsing.", "properties": { "allowed_tools": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Allowed Tools" }, "authorization_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization Token" }, "name": { "maxLength": 128, "minLength": 1, "title": "Name", "type": "string" }, "purpose_hint": { "anyOf": [ { "maxLength": 2000, "type": "string" }, { "type": "null" } ], "title": "Purpose Hint" }, "url": { "minLength": 1, "title": "Url", "type": "string" } }, "required": [ "name", "url" ], "title": "McpServerConfig", "type": "object" }, "MessagesRequest": { "description": "Anthropic Messages API-compatible request.\n\nThe wire fields are derived from any-llm's ``MessagesParams`` (see\n``_schema_derive``) so the schema cannot silently drop a param any-llm\nforwards. Gateway-internal fields (``mcp_servers``, ``mcp_server_ids``,\n``guardrails``, ``tools_header``, ``max_tool_iterations``) opt the request\ninto gateway-managed MCP / sandbox / web_search / guardrails without\nchanging the upstream wire shape. They're stripped before the request is\nforwarded.", "properties": { "cache_control": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Cache Control" }, "guardrails": { "anyOf": [ { "items": { "$ref": "#/components/schemas/GuardrailConfig" }, "maxItems": 8, "type": "array" }, { "type": "null" } ], "title": "Guardrails" }, "max_tokens": { "title": "Max Tokens", "type": "integer" }, "max_tool_iterations": { "anyOf": [ { "maximum": 25.0, "minimum": 1.0, "type": "integer" }, { "type": "null" } ], "title": "Max Tool Iterations" }, "mcp_server_ids": { "anyOf": [ { "items": { "format": "uuid", "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Mcp Server Ids" }, "mcp_servers": { "anyOf": [ { "items": { "$ref": "#/components/schemas/McpServerConfig" }, "type": "array" }, { "type": "null" } ], "title": "Mcp Servers" }, "messages": { "items": { "additionalProperties": true, "type": "object" }, "minItems": 1, "title": "Messages", "type": "array" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "model": { "title": "Model", "type": "string" }, "session_label": { "anyOf": [ { "maxLength": 255, "type": "string" }, { "type": "null" } ], "description": "Optional caller-supplied label for cost attribution (per run, experiment, or conversation). In hybrid mode it is forwarded onto the platform usage report so spend can be sliced by session without standing up OpenTelemetry. Stripped before the request is forwarded upstream to the provider. Has no effect in standalone mode, where there is no platform to report it to.", "title": "Session Label" }, "stop_sequences": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Stop Sequences" }, "stream": { "default": false, "title": "Stream", "type": "boolean" }, "system": { "anyOf": [ { "type": "string" }, { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "System" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "thinking": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Thinking" }, "tool_choice": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Tool Choice" }, "tools": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Tools" }, "tools_header": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tools Header" }, "top_k": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Top K" }, "top_p": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Top P" } }, "required": [ "model", "messages", "max_tokens" ], "title": "MessagesRequest", "type": "object" }, "ModelListResponse": { "description": "OpenAI-compatible model list response.", "properties": { "data": { "items": { "$ref": "#/components/schemas/ModelObject" }, "title": "Data", "type": "array" }, "object": { "default": "list", "title": "Object", "type": "string" } }, "required": [ "data" ], "title": "ModelListResponse", "type": "object" }, "ModelObject": { "description": "OpenAI-compatible model object.", "properties": { "created": { "title": "Created", "type": "integer" }, "id": { "title": "Id", "type": "string" }, "object": { "default": "model", "title": "Object", "type": "string" }, "owned_by": { "title": "Owned By", "type": "string" }, "pricing": { "anyOf": [ { "$ref": "#/components/schemas/ModelPricingInfo" }, { "type": "null" } ] } }, "required": [ "id", "created", "owned_by" ], "title": "ModelObject", "type": "object" }, "ModelPricingInfo": { "description": "Pricing information for a model.", "properties": { "input_price_per_million": { "title": "Input Price Per Million", "type": "number" }, "output_price_per_million": { "title": "Output Price Per Million", "type": "number" } }, "required": [ "input_price_per_million", "output_price_per_million" ], "title": "ModelPricingInfo", "type": "object" }, "ModerationRequest": { "description": "OpenAI-compatible moderation request.", "properties": { "input": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "additionalProperties": true, "type": "object" }, "type": "array" } ], "description": "Text, list of texts, or list of content-part dicts to moderate", "title": "Input" }, "model": { "title": "Model", "type": "string" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, "required": [ "model", "input" ], "title": "ModerationRequest", "type": "object" }, "ModerationResponse": { "description": "Normalized moderation response across providers.", "properties": { "id": { "title": "Id", "type": "string" }, "model": { "title": "Model", "type": "string" }, "results": { "items": { "$ref": "#/components/schemas/ModerationResult" }, "title": "Results", "type": "array" } }, "required": [ "id", "model", "results" ], "title": "ModerationResponse", "type": "object" }, "ModerationResult": { "description": "A single moderation decision, typically one per input item.", "properties": { "categories": { "additionalProperties": { "type": "boolean" }, "title": "Categories", "type": "object" }, "category_applied_input_types": { "anyOf": [ { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "type": "object" }, { "type": "null" } ], "title": "Category Applied Input Types" }, "category_scores": { "additionalProperties": { "type": "number" }, "title": "Category Scores", "type": "object" }, "flagged": { "title": "Flagged", "type": "boolean" }, "provider_raw": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Provider Raw" } }, "required": [ "flagged" ], "title": "ModerationResult", "type": "object" }, "PricingResponse": { "description": "Response model for model pricing.", "properties": { "created_at": { "title": "Created At", "type": "string" }, "effective_at": { "title": "Effective At", "type": "string" }, "input_price_per_million": { "title": "Input Price Per Million", "type": "number" }, "model_key": { "title": "Model Key", "type": "string" }, "output_price_per_million": { "title": "Output Price Per Million", "type": "number" }, "updated_at": { "title": "Updated At", "type": "string" } }, "required": [ "model_key", "effective_at", "input_price_per_million", "output_price_per_million", "created_at", "updated_at" ], "title": "PricingResponse", "type": "object" }, "RerankRequest": { "description": "Rerank request.", "properties": { "documents": { "description": "List of document strings to rerank", "items": { "type": "string" }, "minItems": 1, "title": "Documents", "type": "array" }, "max_tokens_per_doc": { "anyOf": [ { "exclusiveMinimum": 0.0, "type": "integer" }, { "type": "null" } ], "description": "Per-document truncation limit", "title": "Max Tokens Per Doc" }, "model": { "description": "Provider-prefixed model ID, e.g. 'cohere:rerank-v3.5'", "title": "Model", "type": "string" }, "query": { "description": "The search query to rerank documents against", "title": "Query", "type": "string" }, "top_n": { "anyOf": [ { "exclusiveMinimum": 0.0, "type": "integer" }, { "type": "null" } ], "description": "Maximum number of results to return", "title": "Top N" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "User ID for usage attribution", "title": "User" } }, "required": [ "model", "query", "documents" ], "title": "RerankRequest", "type": "object" }, "ResponsesRequest": { "additionalProperties": true, "description": "OpenAI Responses API-compatible request.\n\nThe wire fields are derived from any-llm's ``ResponsesParams`` (see\n``_schema_derive``) so the schema cannot silently drop a param any-llm\nforwards. Gateway-internal fields (``mcp_servers``, ``mcp_server_ids``,\n``guardrails``, ``tools_header``, ``max_tool_iterations``) opt the request\ninto gateway-managed MCP / sandbox / web_search / guardrails without\nchanging the upstream wire shape. They're stripped before the request is\nforwarded.", "properties": { "background": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Background" }, "conversation": { "anyOf": [ { "type": "string" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Conversation" }, "frequency_penalty": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Frequency Penalty" }, "guardrails": { "anyOf": [ { "items": { "$ref": "#/components/schemas/GuardrailConfig" }, "maxItems": 8, "type": "array" }, { "type": "null" } ], "title": "Guardrails" }, "include": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Include" }, "input": { "title": "Input" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "max_output_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Output Tokens" }, "max_tool_calls": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Tool Calls" }, "max_tool_iterations": { "anyOf": [ { "maximum": 25.0, "minimum": 1.0, "type": "integer" }, { "type": "null" } ], "title": "Max Tool Iterations" }, "mcp_server_ids": { "anyOf": [ { "items": { "format": "uuid", "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Mcp Server Ids" }, "mcp_servers": { "anyOf": [ { "items": { "$ref": "#/components/schemas/McpServerConfig" }, "type": "array" }, { "type": "null" } ], "title": "Mcp Servers" }, "metadata": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "model": { "title": "Model", "type": "string" }, "parallel_tool_calls": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Parallel Tool Calls" }, "presence_penalty": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Presence Penalty" }, "previous_response_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Previous Response Id" }, "prompt_cache_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt Cache Key" }, "prompt_cache_retention": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt Cache Retention" }, "reasoning": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Reasoning" }, "response_format": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Response Format" }, "safety_identifier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Safety Identifier" }, "service_tier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Service Tier" }, "session_label": { "anyOf": [ { "maxLength": 255, "type": "string" }, { "type": "null" } ], "description": "Optional caller-supplied label for cost attribution (per run, experiment, or conversation). In hybrid mode it is forwarded onto the platform usage report so spend can be sliced by session without standing up OpenTelemetry. Stripped before the request is forwarded upstream to the provider. Has no effect in standalone mode, where there is no platform to report it to.", "title": "Session Label" }, "store": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Store" }, "stream": { "default": false, "title": "Stream", "type": "boolean" }, "stream_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Stream Options" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "text": { "anyOf": [ {}, { "type": "null" } ], "title": "Text" }, "tool_choice": { "anyOf": [ { "type": "string" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Tool Choice" }, "tools": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Tools" }, "tools_header": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tools Header" }, "top_logprobs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Top Logprobs" }, "top_p": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Top P" }, "truncation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Truncation" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, "required": [ "model", "input" ], "title": "ResponsesRequest", "type": "object" }, "SetPricingRequest": { "description": "Request model for setting model pricing.", "properties": { "effective_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "ISO 8601 datetime from which this price applies. Defaults to now if omitted.", "title": "Effective At" }, "input_price_per_million": { "description": "Price per 1M input tokens", "minimum": 0.0, "title": "Input Price Per Million", "type": "number" }, "model_key": { "description": "Model identifier in format 'provider:model'", "title": "Model Key", "type": "string" }, "output_price_per_million": { "description": "Price per 1M output tokens", "minimum": 0.0, "title": "Output Price Per Million", "type": "number" } }, "required": [ "model_key", "input_price_per_million", "output_price_per_million" ], "title": "SetPricingRequest", "type": "object" }, "UpdateBudgetRequest": { "description": "Request model for updating a budget.", "properties": { "budget_duration_sec": { "anyOf": [ { "exclusiveMinimum": 0.0, "type": "integer" }, { "type": "null" } ], "title": "Budget Duration Sec" }, "max_budget": { "anyOf": [ { "minimum": 0.0, "type": "number" }, { "type": "null" } ], "title": "Max Budget" } }, "title": "UpdateBudgetRequest", "type": "object" }, "UpdateKeyRequest": { "description": "Request model for updating a key.", "properties": { "expires_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Expires At" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" }, "key_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Key Name" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "title": "UpdateKeyRequest", "type": "object" }, "UpdateUserRequest": { "description": "Request model for updating a user.", "properties": { "alias": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Alias" }, "blocked": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Blocked" }, "budget_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Budget Id" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "title": "UpdateUserRequest", "type": "object" }, "UsageEntry": { "description": "A single usage log entry.", "properties": { "api_key_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key Id" }, "cache_read_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Cache Read Tokens" }, "cache_write_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Cache Write Tokens" }, "completion_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completion Tokens" }, "cost": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Cost" }, "endpoint": { "title": "Endpoint", "type": "string" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "id": { "title": "Id", "type": "string" }, "model": { "title": "Model", "type": "string" }, "prompt_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Prompt Tokens" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "status": { "title": "Status", "type": "string" }, "timestamp": { "title": "Timestamp", "type": "string" }, "total_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Tokens" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" } }, "required": [ "id", "user_id", "api_key_id", "timestamp", "model", "provider", "endpoint", "prompt_tokens", "completion_tokens", "total_tokens", "cache_read_tokens", "cache_write_tokens", "cost", "status", "error_message" ], "title": "UsageEntry", "type": "object" }, "UsageLogResponse": { "description": "Response model for usage log.", "properties": { "api_key_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key Id" }, "completion_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completion Tokens" }, "cost": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Cost" }, "endpoint": { "title": "Endpoint", "type": "string" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "id": { "title": "Id", "type": "string" }, "model": { "title": "Model", "type": "string" }, "prompt_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Prompt Tokens" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "status": { "title": "Status", "type": "string" }, "timestamp": { "title": "Timestamp", "type": "string" }, "total_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Tokens" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" } }, "required": [ "id", "user_id", "api_key_id", "timestamp", "model", "provider", "endpoint", "prompt_tokens", "completion_tokens", "total_tokens", "cost", "status", "error_message" ], "title": "UsageLogResponse", "type": "object" }, "UserResponse": { "description": "Response model for user information.", "properties": { "alias": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Alias" }, "blocked": { "title": "Blocked", "type": "boolean" }, "budget_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Budget Id" }, "budget_started_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Budget Started At" }, "created_at": { "title": "Created At", "type": "string" }, "metadata": { "additionalProperties": true, "title": "Metadata", "type": "object" }, "next_budget_reset_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Budget Reset At" }, "reserved": { "title": "Reserved", "type": "number" }, "spend": { "title": "Spend", "type": "number" }, "updated_at": { "title": "Updated At", "type": "string" }, "user_id": { "title": "User Id", "type": "string" } }, "required": [ "user_id", "alias", "spend", "reserved", "budget_id", "budget_started_at", "next_budget_reset_at", "blocked", "created_at", "updated_at", "metadata" ], "title": "UserResponse", "type": "object" }, "ValidationError": { "properties": { "ctx": { "title": "Context", "type": "object" }, "input": { "title": "Input" }, "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "title": "Location", "type": "array" }, "msg": { "title": "Message", "type": "string" }, "type": { "title": "Error Type", "type": "string" } }, "required": [ "loc", "msg", "type" ], "title": "ValidationError", "type": "object" } }, "securitySchemes": { "ApiKeyAuth": { "description": "Enter your API key here (sent as Otari-Key header).", "in": "header", "name": "Otari-Key", "type": "apiKey" } } }, "info": { "description": "Otari, an OpenAI-compatible LLM gateway with API key management", "title": "otari", "version": "0.0.0-dev" }, "openapi": "3.1.0", "paths": { "/health": { "get": { "description": "General health check endpoint.\n\nReturns basic health status. For infrastructure monitoring,\nuse /health/readiness or /health/liveness instead.", "operationId": "health_check_health_get", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "title": "Response Health Check Health Get", "type": "object" } } }, "description": "Successful Response" } }, "summary": "Health Check", "tags": [ "health" ] } }, "/health/liveness": { "get": { "description": "Liveness probe endpoint.\n\nSimple check to verify the process is alive and responding.\nUsed by Kubernetes/container orchestrators for liveness probes.\n\nReturns:\n Plain text \"I'm alive!\" message", "operationId": "health_liveness_health_liveness_get", "responses": { "200": { "content": { "application/json": { "schema": { "title": "Response Health Liveness Health Liveness Get", "type": "string" } } }, "description": "Successful Response" } }, "summary": "Health Liveness", "tags": [ "health" ] } }, "/health/readiness": { "get": { "description": "Readiness probe endpoint.\n\nChecks if the gateway is ready to serve requests by validating:\n- Database connectivity\n- Service availability\n\nUsed by Kubernetes/container orchestrators for readiness probes.\nReturns HTTP 503 if any dependency is unavailable.\n\nReturns:\n dict: Status object with health details\n\nRaises:\n HTTPException: 503 if service is not ready", "operationId": "health_readiness_health_readiness_get", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "title": "Response Health Readiness Health Readiness Get", "type": "object" } } }, "description": "Successful Response" } }, "summary": "Health Readiness", "tags": [ "health" ] } }, "/v1/audio/speech": { "post": { "description": "OpenAI-compatible audio speech (TTS) endpoint.\n\nAuthentication modes:\n- Master key + user field: Use specified user (must exist)\n- API key + user field: Use specified user (must exist)\n- API key without user field: Use virtual user created with API key", "operationId": "create_speech_v1_audio_speech_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AudioSpeechRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} }, "audio/L16": { "schema": { "format": "binary", "type": "string" } }, "audio/aac": { "schema": { "format": "binary", "type": "string" } }, "audio/flac": { "schema": { "format": "binary", "type": "string" } }, "audio/mpeg": { "schema": { "format": "binary", "type": "string" } }, "audio/opus": { "schema": { "format": "binary", "type": "string" } }, "audio/wav": { "schema": { "format": "binary", "type": "string" } } }, "description": "Audio bytes in the requested format" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Speech", "tags": [ "audio" ] } }, "/v1/audio/transcriptions": { "post": { "description": "OpenAI-compatible audio transcription endpoint.\n\nAuthentication modes:\n- Master key + user field: Use specified user (must exist)\n- API key + user field: Use specified user (must exist)\n- API key without user field: Use virtual user created with API key", "operationId": "create_transcription_v1_audio_transcriptions_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_create_transcription_v1_audio_transcriptions_post" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Transcription", "tags": [ "audio" ] } }, "/v1/batches": { "get": { "description": "List batches for a provider.", "operationId": "list_batches_v1_batches_get", "parameters": [ { "in": "query", "name": "provider", "required": true, "schema": { "title": "Provider", "type": "string" } }, { "in": "query", "name": "after", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "After" } }, { "in": "query", "name": "limit", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Limit" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "List Batches", "tags": [ "batches" ] }, "post": { "description": "Create a batch of LLM requests for asynchronous processing.", "operationId": "create_batch_v1_batches_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBatchRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Batch", "tags": [ "batches" ] } }, "/v1/batches/{batch_id}": { "get": { "description": "Retrieve the status of a batch.", "operationId": "retrieve_batch_v1_batches__batch_id__get", "parameters": [ { "in": "path", "name": "batch_id", "required": true, "schema": { "title": "Batch Id", "type": "string" } }, { "in": "query", "name": "provider", "required": true, "schema": { "title": "Provider", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Retrieve Batch", "tags": [ "batches" ] } }, "/v1/batches/{batch_id}/cancel": { "post": { "description": "Cancel a batch.", "operationId": "cancel_batch_v1_batches__batch_id__cancel_post", "parameters": [ { "in": "path", "name": "batch_id", "required": true, "schema": { "title": "Batch Id", "type": "string" } }, { "in": "query", "name": "provider", "required": true, "schema": { "title": "Provider", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Cancel Batch", "tags": [ "batches" ] } }, "/v1/batches/{batch_id}/results": { "get": { "description": "Retrieve the results of a completed batch.", "operationId": "retrieve_batch_results_v1_batches__batch_id__results_get", "parameters": [ { "in": "path", "name": "batch_id", "required": true, "schema": { "title": "Batch Id", "type": "string" } }, { "in": "query", "name": "provider", "required": true, "schema": { "title": "Provider", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "409": { "description": "Batch is not yet complete" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" }, "502": { "description": "LLM provider error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Retrieve Batch Results", "tags": [ "batches" ] } }, "/v1/budgets": { "get": { "description": "List all budgets with pagination.", "operationId": "list_budgets_v1_budgets_get", "parameters": [ { "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "minimum": 0, "title": "Skip", "type": "integer" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "maximum": 1000, "minimum": 1, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/BudgetResponse" }, "title": "Response List Budgets V1 Budgets Get", "type": "array" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "List Budgets", "tags": [ "budgets" ] }, "post": { "description": "Create a new budget.", "operationId": "create_budget_v1_budgets_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBudgetRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BudgetResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Budget", "tags": [ "budgets" ] } }, "/v1/budgets/{budget_id}": { "delete": { "description": "Delete a budget.", "operationId": "delete_budget_v1_budgets__budget_id__delete", "parameters": [ { "in": "path", "name": "budget_id", "required": true, "schema": { "title": "Budget Id", "type": "string" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Delete Budget", "tags": [ "budgets" ] }, "get": { "description": "Get details of a specific budget.", "operationId": "get_budget_v1_budgets__budget_id__get", "parameters": [ { "in": "path", "name": "budget_id", "required": true, "schema": { "title": "Budget Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BudgetResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Get Budget", "tags": [ "budgets" ] }, "patch": { "description": "Update a budget.", "operationId": "update_budget_v1_budgets__budget_id__patch", "parameters": [ { "in": "path", "name": "budget_id", "required": true, "schema": { "title": "Budget Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBudgetRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BudgetResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Update Budget", "tags": [ "budgets" ] } }, "/v1/chat/completions": { "post": { "description": "OpenAI-compatible chat completions endpoint.\n\nSupports both streaming and non-streaming responses.\nHandles reasoning content from otari providers.\n\nAuthentication modes:\n- Master key + user field: Use specified user (must exist)\n- API key + user field: Use specified user (must exist)\n- API key without user field: Use virtual user created with API key", "operationId": "chat_completions_v1_chat_completions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatCompletionRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Chat Completions", "tags": [ "chat" ] } }, "/v1/embeddings": { "post": { "description": "OpenAI-compatible embeddings endpoint.\n\nAuthentication modes:\n- Master key + user field: Use specified user (must exist)\n- API key + user field: Use specified user (must exist)\n- API key without user field: Use virtual user created with API key", "operationId": "create_embedding_v1_embeddings_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmbeddingRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Embedding", "tags": [ "embeddings" ] } }, "/v1/files": { "get": { "description": "List the authenticated user's uploaded files.", "operationId": "list_files_v1_files_get", "parameters": [ { "in": "query", "name": "user", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, { "in": "query", "name": "purpose", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Purpose" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "title": "Response List Files V1 Files Get", "type": "object" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "List Files", "tags": [ "files" ] }, "post": { "description": "OpenAI-compatible file upload endpoint.", "operationId": "create_file_v1_files_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_create_file_v1_files_post" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "title": "Response Create File V1 Files Post", "type": "object" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create File", "tags": [ "files" ] } }, "/v1/files/{file_id}": { "delete": { "description": "Soft-delete a file's metadata and remove its bytes from the backend.", "operationId": "delete_file_v1_files__file_id__delete", "parameters": [ { "in": "path", "name": "file_id", "required": true, "schema": { "title": "File Id", "type": "string" } }, { "in": "query", "name": "user", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "title": "Response Delete File V1 Files File Id Delete", "type": "object" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Delete File", "tags": [ "files" ] }, "get": { "description": "Retrieve metadata for a single file.", "operationId": "get_file_v1_files__file_id__get", "parameters": [ { "in": "path", "name": "file_id", "required": true, "schema": { "title": "File Id", "type": "string" } }, { "in": "query", "name": "user", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "title": "Response Get File V1 Files File Id Get", "type": "object" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Get File", "tags": [ "files" ] } }, "/v1/files/{file_id}/content": { "get": { "description": "Download the raw bytes of a file.", "operationId": "get_file_content_v1_files__file_id__content_get", "parameters": [ { "in": "path", "name": "file_id", "required": true, "schema": { "title": "File Id", "type": "string" } }, { "in": "query", "name": "user", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Get File Content", "tags": [ "files" ] } }, "/v1/images/generations": { "post": { "description": "OpenAI-compatible image generation endpoint.\n\nAuthentication modes:\n- Master key + user field: Use specified user (must exist)\n- API key + user field: Use specified user (must exist)\n- API key without user field: Use virtual user created with API key", "operationId": "create_image_v1_images_generations_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageGenerationRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Image", "tags": [ "images" ] } }, "/v1/keys": { "get": { "description": "List all API keys.\n\nRequires master key authentication.", "operationId": "list_keys_v1_keys_get", "parameters": [ { "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "minimum": 0, "title": "Skip", "type": "integer" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "maximum": 1000, "minimum": 1, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/KeyInfo" }, "title": "Response List Keys V1 Keys Get", "type": "array" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "List Keys", "tags": [ "keys" ] }, "post": { "description": "Create a new API key.\n\nRequires master key authentication.\n\nIf user_id is provided, the key will be associated with that user (creates user if it doesn't exist).\nIf user_id is not provided, a new user will be created automatically and the key will be associated with it.", "operationId": "create_key_v1_keys_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateKeyRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateKeyResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Key", "tags": [ "keys" ] } }, "/v1/keys/{key_id}": { "delete": { "description": "Delete (revoke) an API key.\n\nRequires master key authentication.", "operationId": "delete_key_v1_keys__key_id__delete", "parameters": [ { "in": "path", "name": "key_id", "required": true, "schema": { "title": "Key Id", "type": "string" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Delete Key", "tags": [ "keys" ] }, "get": { "description": "Get details of a specific API key.\n\nRequires master key authentication.", "operationId": "get_key_v1_keys__key_id__get", "parameters": [ { "in": "path", "name": "key_id", "required": true, "schema": { "title": "Key Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeyInfo" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Get Key", "tags": [ "keys" ] }, "patch": { "description": "Update an API key.\n\nRequires master key authentication.", "operationId": "update_key_v1_keys__key_id__patch", "parameters": [ { "in": "path", "name": "key_id", "required": true, "schema": { "title": "Key Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateKeyRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeyInfo" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Update Key", "tags": [ "keys" ] } }, "/v1/messages": { "post": { "description": "Anthropic Messages API-compatible endpoint.\n\nSupports MCP tool-use loops, sandboxed code execution, and SearXNG\nweb_search in both standalone mode and hybrid mode. Hybrid-mode\nrequests resolve credentials via the platform service and (for\nnon-tool-loop requests) get multi-attempt fallback across the resolved\nroute. Tool-loop requests collapse to a single attempt \u2014 once\n``on_first_response`` lock-in plumbing lands across the codebase, a\nfollow-up will enable pre-lock-in fallback for tool-loop requests too.", "operationId": "create_message_v1_messages_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Message", "tags": [ "messages" ] } }, "/v1/messages/count_tokens": { "post": { "description": "Anthropic ``/v1/messages/count_tokens``-compatible endpoint.\n\nReturns ``{\"input_tokens\": N}`` without contacting an upstream provider:\ncounting is local, so there is no budget reservation, pricing, or usage\nlogging. Authentication mirrors :func:`create_message` \u2014 hybrid mode\nresolves the caller's token against the platform, standalone mode validates\nthe API key \u2014 so the endpoint is not an open token-counting oracle.", "operationId": "count_message_tokens_v1_messages_count_tokens_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CountTokensRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CountTokensResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Count Message Tokens", "tags": [ "messages" ] } }, "/v1/models": { "get": { "description": "List all available models.\n\nReturns models auto-discovered from configured providers, enriched with\npricing data from the model_pricing table when available. Models that only\nexist in the pricing table are also included for backward compatibility.", "operationId": "list_models_v1_models_get", "parameters": [ { "description": "Filter models by provider name", "in": "query", "name": "provider", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter models by provider name", "title": "Provider" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelListResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "List Models", "tags": [ "models" ] } }, "/v1/models/{model_id}": { "get": { "description": "Get details for a specific model.", "operationId": "get_model_v1_models__model_id__get", "parameters": [ { "in": "path", "name": "model_id", "required": true, "schema": { "title": "Model Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelObject" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Get Model", "tags": [ "models" ] } }, "/v1/moderations": { "post": { "description": "OpenAI-compatible moderations endpoint.\n\nAuthentication modes:\n- Master key + user field: Use specified user (must exist)\n- API key + user field: Use specified user (must exist)\n- API key without user field: Use virtual user created with API key", "operationId": "create_moderation_v1_moderations_post", "parameters": [ { "in": "query", "name": "include_raw", "required": false, "schema": { "default": false, "title": "Include Raw", "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModerationRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModerationResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Moderation", "tags": [ "moderations" ] } }, "/v1/pricing": { "get": { "description": "List all model pricing.", "operationId": "list_pricing_v1_pricing_get", "parameters": [ { "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "minimum": 0, "title": "Skip", "type": "integer" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "maximum": 1000, "minimum": 1, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/PricingResponse" }, "title": "Response List Pricing V1 Pricing Get", "type": "array" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "List Pricing", "tags": [ "pricing" ] }, "post": { "description": "Set or update pricing for a model.", "operationId": "set_pricing_v1_pricing_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetPricingRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PricingResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Set Pricing", "tags": [ "pricing" ] } }, "/v1/pricing/{model_key}": { "delete": { "description": "Delete pricing entries for a model.", "operationId": "delete_pricing_v1_pricing__model_key__delete", "parameters": [ { "in": "path", "name": "model_key", "required": true, "schema": { "title": "Model Key", "type": "string" } }, { "description": "ISO datetime identifying a specific pricing row to delete", "in": "query", "name": "effective_at", "required": false, "schema": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "ISO datetime identifying a specific pricing row to delete", "title": "Effective At" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Delete Pricing", "tags": [ "pricing" ] }, "get": { "description": "Get pricing for a specific model as of a timestamp.", "operationId": "get_pricing_v1_pricing__model_key__get", "parameters": [ { "in": "path", "name": "model_key", "required": true, "schema": { "title": "Model Key", "type": "string" } }, { "description": "ISO datetime for effective lookup", "in": "query", "name": "as_of", "required": false, "schema": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "ISO datetime for effective lookup", "title": "as_of" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PricingResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Get Pricing", "tags": [ "pricing" ] } }, "/v1/pricing/{model_key}/history": { "get": { "description": "Return the full pricing history for a model.", "operationId": "get_pricing_history_v1_pricing__model_key__history_get", "parameters": [ { "in": "path", "name": "model_key", "required": true, "schema": { "title": "Model Key", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/PricingResponse" }, "title": "Response Get Pricing History V1 Pricing Model Key History Get", "type": "array" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Get Pricing History", "tags": [ "pricing" ] } }, "/v1/rerank": { "post": { "description": "Rerank documents by relevance to a query.\n\nAuthentication modes:\n- Master key + user field: Use specified user (must exist)\n- API key + user field: Use specified user (must exist)\n- API key without user field: Use virtual user created with API key", "operationId": "create_rerank_v1_rerank_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Rerank", "tags": [ "rerank" ] } }, "/v1/responses": { "post": { "description": "OpenAI-compatible Responses endpoint.\n\nSupports MCP tool-use loops, sandboxed code execution, and SearXNG\nweb_search in both standalone mode and hybrid mode. Hybrid-mode\nrequests resolve credentials via the platform service and (for\nnon-tool-loop requests) get multi-attempt fallback across the resolved\nroute. Tool-loop requests collapse to a single attempt \u2014 once\n``on_first_response`` lock-in plumbing lands across the codebase, a\nfollow-up will enable pre-lock-in fallback for tool-loop requests too.", "operationId": "create_response_v1_responses_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponsesRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create Response", "tags": [ "responses" ] } }, "/v1/usage": { "get": { "description": "List usage logs ordered by timestamp (most recent first).\n\nSupports optional filters for time range and user. Paginated via skip/limit.\nTimestamps accept either ISO 8601 strings or Unix epoch seconds (numeric).", "operationId": "list_usage_v1_usage_get", "parameters": [ { "description": "Return logs with timestamp >= start_date (ISO 8601 or Unix epoch seconds)", "in": "query", "name": "start_date", "required": false, "schema": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "Return logs with timestamp >= start_date (ISO 8601 or Unix epoch seconds)", "title": "Start Date" } }, { "description": "Return logs with timestamp < end_date (ISO 8601 or Unix epoch seconds)", "in": "query", "name": "end_date", "required": false, "schema": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "Return logs with timestamp < end_date (ISO 8601 or Unix epoch seconds)", "title": "End Date" } }, { "description": "Filter to a single user", "in": "query", "name": "user_id", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter to a single user", "title": "User Id" } }, { "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "minimum": 0, "title": "Skip", "type": "integer" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "maximum": 1000, "minimum": 1, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/UsageEntry" }, "title": "Response List Usage V1 Usage Get", "type": "array" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "List Usage", "tags": [ "usage" ] } }, "/v1/users": { "get": { "description": "List all users with pagination.", "operationId": "list_users_v1_users_get", "parameters": [ { "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "minimum": 0, "title": "Skip", "type": "integer" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "maximum": 1000, "minimum": 1, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/UserResponse" }, "title": "Response List Users V1 Users Get", "type": "array" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "List Users", "tags": [ "users" ] }, "post": { "description": "Create a new user.", "operationId": "create_user_v1_users_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Create User", "tags": [ "users" ] } }, "/v1/users/{user_id}": { "delete": { "description": "Delete a user.", "operationId": "delete_user_v1_users__user_id__delete", "parameters": [ { "in": "path", "name": "user_id", "required": true, "schema": { "title": "User Id", "type": "string" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Delete User", "tags": [ "users" ] }, "get": { "description": "Get details of a specific user.", "operationId": "get_user_v1_users__user_id__get", "parameters": [ { "in": "path", "name": "user_id", "required": true, "schema": { "title": "User Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Get User", "tags": [ "users" ] }, "patch": { "description": "Update a user.", "operationId": "update_user_v1_users__user_id__patch", "parameters": [ { "in": "path", "name": "user_id", "required": true, "schema": { "title": "User Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Update User", "tags": [ "users" ] } }, "/v1/users/{user_id}/usage": { "get": { "description": "Get usage history for a specific user.", "operationId": "get_user_usage_v1_users__user_id__usage_get", "parameters": [ { "in": "path", "name": "user_id", "required": true, "schema": { "title": "User Id", "type": "string" } }, { "in": "query", "name": "skip", "required": false, "schema": { "default": 0, "minimum": 0, "title": "Skip", "type": "integer" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "maximum": 1000, "minimum": 1, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/UsageLogResponse" }, "title": "Response Get User Usage V1 Users User Id Usage Get", "type": "array" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "ApiKeyAuth": [] } ], "summary": "Get User Usage", "tags": [ "users" ] } } } }