{ "components": { "schemas": { "AudioSpeechRequest": { "description": "OpenAI-compatible audio speech (TTS) request.", "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_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.", "properties": { "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_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" }, "response_format": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Response Format" }, "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": { "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 GATEWAY_TOOLS_HEADER env, then to the built-in default.", "title": "Tools Header" }, "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" }, "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" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "title": "Detail", "type": "array" } }, "title": "HTTPValidationError", "type": "object" }, "ImageGenerationRequest": { "description": "OpenAI-compatible image generation request.", "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 is enforced at parse time:\n\n* SSRF guard rejects private, link-local, and reserved IP ranges. Loopback is\n allowed by default (sidecars, dev) \u2014 set ``GATEWAY_MCP_ALLOW_LOOPBACK=false`` to disable.\n* Plain ``http://`` is rejected when ``authorization_token`` is set, to keep\n bearer tokens off the wire in cleartext.", "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.", "properties": { "cache_control": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Cache Control" }, "max_tokens": { "title": "Max Tokens", "type": "integer" }, "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" }, "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" }, "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" } }, "required": [ "id", "created", "owned_by" ], "title": "ModelObject", "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" }, "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" }, "ResponsesRequest": { "additionalProperties": true, "description": "OpenAI Responses API-compatible request.", "properties": { "input": { "title": "Input" }, "model": { "title": "Model", "type": "string" }, "stream": { "default": false, "title": "Stream", "type": "boolean" }, "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" }, "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": "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" }, "spend": { "title": "Spend", "type": "number" }, "updated_at": { "title": "Updated At", "type": "string" }, "user_id": { "title": "User Id", "type": "string" } }, "required": [ "user_id", "alias", "spend", "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" } } }, "info": { "description": "A clean FastAPI gateway for otari with API key management", "title": "otari-gateway", "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "summary": "Create Embedding", "tags": [ "embeddings" ] } }, "/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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "summary": "Update Key", "tags": [ "keys" ] } }, "/v1/messages": { "post": { "description": "Anthropic Messages API-compatible endpoint.", "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" } }, "summary": "Create Message", "tags": [ "messages" ] } }, "/v1/models": { "get": { "description": "List all available models.\n\nReturns models derived from the model_pricing table in an\nOpenAI-compatible format.", "operationId": "list_models_v1_models_get", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelListResponse" } } }, "description": "Successful Response" } }, "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" } }, "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": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "summary": "Get Pricing History", "tags": [ "pricing" ] } }, "/v1/responses": { "post": { "description": "OpenAI-compatible Responses endpoint.", "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "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" } }, "summary": "Get User Usage", "tags": [ "users" ] } } } }