{ "openapi": "3.0.0", "info": { "description": "High-performance AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic, Gemini, Groq, OpenRouter, Z.ai, xAI, Oracle, Ollama). Drop-in OpenAI-compatible API.", "title": "GoModel API", "contact": {}, "version": "1.0" }, "paths": { "/admin/api/v1/audit/conversation": { "get": { "tags": [ "admin" ], "summary": "Get conversation thread around an audit log entry", "parameters": [ { "description": "Anchor audit log entry ID", "name": "log_id", "in": "query", "required": true, "schema": { "type": "string" } }, { "description": "Max entries in thread (default 40, max 200)", "name": "limit", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/auditlog.ConversationResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/admin/api/v1/audit/log": { "get": { "tags": [ "admin" ], "summary": "Get paginated audit log entries", "parameters": [ { "description": "Number of days (default 30)", "name": "days", "in": "query", "schema": { "type": "integer" } }, { "description": "Start date (YYYY-MM-DD)", "name": "start_date", "in": "query", "schema": { "type": "string" } }, { "description": "End date (YYYY-MM-DD)", "name": "end_date", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by requested model selector", "name": "requested_model", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by provider name or provider type", "name": "provider", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by HTTP method", "name": "method", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by request path", "name": "path", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by tracked user path subtree", "name": "user_path", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by error type", "name": "error_type", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by status code", "name": "status_code", "in": "query", "schema": { "type": "integer" } }, { "description": "Filter by stream mode (true/false)", "name": "stream", "in": "query", "schema": { "type": "boolean" } }, { "description": "Search across request_id/requested_model/provider/method/path/error_type/error_message", "name": "search", "in": "query", "schema": { "type": "string" } }, { "description": "Page size (default 25, max 100)", "name": "limit", "in": "query", "schema": { "type": "integer" } }, { "description": "Offset for pagination", "name": "offset", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/auditlog.LogListResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/admin/api/v1/cache/overview": { "get": { "tags": [ "admin" ], "summary": "Get cached-only usage overview", "parameters": [ { "description": "Number of days (default 30)", "name": "days", "in": "query", "schema": { "type": "integer" } }, { "description": "Start date (YYYY-MM-DD)", "name": "start_date", "in": "query", "schema": { "type": "string" } }, { "description": "End date (YYYY-MM-DD)", "name": "end_date", "in": "query", "schema": { "type": "string" } }, { "description": "Grouping interval: daily, weekly, monthly, yearly (default daily)", "name": "interval", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by tracked user path subtree", "name": "user_path", "in": "query", "schema": { "type": "string" } }, { "description": "Cache mode filter: uncached, cached, all (cache overview always uses cached mode)", "name": "cache_mode", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/usage.CacheOverview" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/admin/api/v1/models/categories": { "get": { "tags": [ "admin" ], "summary": "List model categories with counts", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/providers.CategoryCount" } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/admin/api/v1/usage/daily": { "get": { "tags": [ "admin" ], "summary": "Get usage breakdown by period", "parameters": [ { "description": "Number of days (default 30)", "name": "days", "in": "query", "schema": { "type": "integer" } }, { "description": "Start date (YYYY-MM-DD)", "name": "start_date", "in": "query", "schema": { "type": "string" } }, { "description": "End date (YYYY-MM-DD)", "name": "end_date", "in": "query", "schema": { "type": "string" } }, { "description": "Grouping interval: daily, weekly, monthly, yearly (default daily)", "name": "interval", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by tracked user path subtree", "name": "user_path", "in": "query", "schema": { "type": "string" } }, { "description": "Cache mode filter: uncached, cached, all (default uncached)", "name": "cache_mode", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/usage.DailyUsage" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/admin/api/v1/usage/log": { "get": { "tags": [ "admin" ], "summary": "Get paginated usage log entries", "parameters": [ { "description": "Number of days (default 30)", "name": "days", "in": "query", "schema": { "type": "integer" } }, { "description": "Start date (YYYY-MM-DD)", "name": "start_date", "in": "query", "schema": { "type": "string" } }, { "description": "End date (YYYY-MM-DD)", "name": "end_date", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by model name", "name": "model", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by provider name or provider type", "name": "provider", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by tracked user path subtree", "name": "user_path", "in": "query", "schema": { "type": "string" } }, { "description": "Cache mode filter: uncached, cached, all (default uncached)", "name": "cache_mode", "in": "query", "schema": { "type": "string" } }, { "description": "Search across model, provider, request_id, provider_id", "name": "search", "in": "query", "schema": { "type": "string" } }, { "description": "Page size (default 50, max 200)", "name": "limit", "in": "query", "schema": { "type": "integer" } }, { "description": "Offset for pagination", "name": "offset", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/usage.UsageLogResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/admin/api/v1/usage/models": { "get": { "tags": [ "admin" ], "summary": "Get usage breakdown by model", "parameters": [ { "description": "Number of days (default 30)", "name": "days", "in": "query", "schema": { "type": "integer" } }, { "description": "Start date (YYYY-MM-DD)", "name": "start_date", "in": "query", "schema": { "type": "string" } }, { "description": "End date (YYYY-MM-DD)", "name": "end_date", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by tracked user path subtree", "name": "user_path", "in": "query", "schema": { "type": "string" } }, { "description": "Cache mode filter: uncached, cached, all (default uncached)", "name": "cache_mode", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/usage.ModelUsage" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/admin/api/v1/usage/summary": { "get": { "tags": [ "admin" ], "summary": "Get usage summary", "parameters": [ { "description": "Number of days (default 30)", "name": "days", "in": "query", "schema": { "type": "integer" } }, { "description": "Start date (YYYY-MM-DD)", "name": "start_date", "in": "query", "schema": { "type": "string" } }, { "description": "End date (YYYY-MM-DD)", "name": "end_date", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by tracked user path subtree", "name": "user_path", "in": "query", "schema": { "type": "string" } }, { "description": "Cache mode filter: uncached, cached, all (default uncached)", "name": "cache_mode", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/usage.UsageSummary" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/admin/api/v1/usage/user-paths": { "get": { "tags": [ "admin" ], "summary": "Get usage breakdown by user path", "parameters": [ { "description": "Number of days (default 30)", "name": "days", "in": "query", "schema": { "type": "integer" } }, { "description": "Start date (YYYY-MM-DD)", "name": "start_date", "in": "query", "schema": { "type": "string" } }, { "description": "End date (YYYY-MM-DD)", "name": "end_date", "in": "query", "schema": { "type": "string" } }, { "description": "Filter by tracked user path subtree", "name": "user_path", "in": "query", "schema": { "type": "string" } }, { "description": "Cache mode filter: uncached, cached, all (default uncached)", "name": "cache_mode", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/usage.UserPathUsage" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/health": { "get": { "tags": [ "system" ], "summary": "Health check", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } }, "/p/{provider}/{endpoint}": { "get": { "description": "Runtime-configurable passthrough endpoint under /p/{provider}/{endpoint}; enabled by default via server.enable_passthrough_routes. The endpoint path is opaque and may proxy JSON, binary, or SSE responses with upstream status codes preserved. For multi-segment provider endpoints, clients that rely on OpenAPI-generated path handling should URL-encode embedded slashes in the endpoint parameter. A leading v1/ segment is normalized away by default so /p/{provider}/v1/... and /p/{provider}/... map to the same upstream path relative to the provider base URL.", "tags": [ "passthrough" ], "summary": "Provider passthrough", "parameters": [ { "description": "Provider type", "name": "provider", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider-native endpoint path relative to the provider base URL. URL-encode embedded / characters when using generated clients.", "name": "endpoint", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "201": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "202": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "204": { "description": "No Content passthrough response", "content": { "application/json": { "schema": { "type": "string" } }, "application/octet-stream": { "schema": { "type": "string" } }, "text/event-stream": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] }, "put": { "description": "Runtime-configurable passthrough endpoint under /p/{provider}/{endpoint}; enabled by default via server.enable_passthrough_routes. The endpoint path is opaque and may proxy JSON, binary, or SSE responses with upstream status codes preserved. For multi-segment provider endpoints, clients that rely on OpenAPI-generated path handling should URL-encode embedded slashes in the endpoint parameter. A leading v1/ segment is normalized away by default so /p/{provider}/v1/... and /p/{provider}/... map to the same upstream path relative to the provider base URL.", "tags": [ "passthrough" ], "summary": "Provider passthrough", "parameters": [ { "description": "Provider type", "name": "provider", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider-native endpoint path relative to the provider base URL. URL-encode embedded / characters when using generated clients.", "name": "endpoint", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "201": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "202": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "204": { "description": "No Content passthrough response", "content": { "application/json": { "schema": { "type": "string" } }, "application/octet-stream": { "schema": { "type": "string" } }, "text/event-stream": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] }, "post": { "description": "Runtime-configurable passthrough endpoint under /p/{provider}/{endpoint}; enabled by default via server.enable_passthrough_routes. The endpoint path is opaque and may proxy JSON, binary, or SSE responses with upstream status codes preserved. For multi-segment provider endpoints, clients that rely on OpenAPI-generated path handling should URL-encode embedded slashes in the endpoint parameter. A leading v1/ segment is normalized away by default so /p/{provider}/v1/... and /p/{provider}/... map to the same upstream path relative to the provider base URL.", "tags": [ "passthrough" ], "summary": "Provider passthrough", "parameters": [ { "description": "Provider type", "name": "provider", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider-native endpoint path relative to the provider base URL. URL-encode embedded / characters when using generated clients.", "name": "endpoint", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "201": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "202": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "204": { "description": "No Content passthrough response", "content": { "application/json": { "schema": { "type": "string" } }, "application/octet-stream": { "schema": { "type": "string" } }, "text/event-stream": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] }, "delete": { "description": "Runtime-configurable passthrough endpoint under /p/{provider}/{endpoint}; enabled by default via server.enable_passthrough_routes. The endpoint path is opaque and may proxy JSON, binary, or SSE responses with upstream status codes preserved. For multi-segment provider endpoints, clients that rely on OpenAPI-generated path handling should URL-encode embedded slashes in the endpoint parameter. A leading v1/ segment is normalized away by default so /p/{provider}/v1/... and /p/{provider}/... map to the same upstream path relative to the provider base URL.", "tags": [ "passthrough" ], "summary": "Provider passthrough", "parameters": [ { "description": "Provider type", "name": "provider", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider-native endpoint path relative to the provider base URL. URL-encode embedded / characters when using generated clients.", "name": "endpoint", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "201": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "202": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "204": { "description": "No Content passthrough response", "content": { "application/json": { "schema": { "type": "string" } }, "application/octet-stream": { "schema": { "type": "string" } }, "text/event-stream": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] }, "options": { "description": "Runtime-configurable passthrough endpoint under /p/{provider}/{endpoint}; enabled by default via server.enable_passthrough_routes. The endpoint path is opaque and may proxy JSON, binary, or SSE responses with upstream status codes preserved. For multi-segment provider endpoints, clients that rely on OpenAPI-generated path handling should URL-encode embedded slashes in the endpoint parameter. A leading v1/ segment is normalized away by default so /p/{provider}/v1/... and /p/{provider}/... map to the same upstream path relative to the provider base URL.", "tags": [ "passthrough" ], "summary": "Provider passthrough", "parameters": [ { "description": "Provider type", "name": "provider", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider-native endpoint path relative to the provider base URL. URL-encode embedded / characters when using generated clients.", "name": "endpoint", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "201": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "202": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "204": { "description": "No Content passthrough response", "content": { "application/json": { "schema": { "type": "string" } }, "application/octet-stream": { "schema": { "type": "string" } }, "text/event-stream": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] }, "head": { "description": "Runtime-configurable passthrough endpoint under /p/{provider}/{endpoint}; enabled by default via server.enable_passthrough_routes. The endpoint path is opaque and may proxy JSON, binary, or SSE responses with upstream status codes preserved. For multi-segment provider endpoints, clients that rely on OpenAPI-generated path handling should URL-encode embedded slashes in the endpoint parameter. A leading v1/ segment is normalized away by default so /p/{provider}/v1/... and /p/{provider}/... map to the same upstream path relative to the provider base URL.", "tags": [ "passthrough" ], "summary": "Provider passthrough", "parameters": [ { "description": "Provider type", "name": "provider", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider-native endpoint path relative to the provider base URL. URL-encode embedded / characters when using generated clients.", "name": "endpoint", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "201": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "202": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "204": { "description": "No Content passthrough response", "content": { "application/json": { "schema": { "type": "string" } }, "application/octet-stream": { "schema": { "type": "string" } }, "text/event-stream": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] }, "patch": { "description": "Runtime-configurable passthrough endpoint under /p/{provider}/{endpoint}; enabled by default via server.enable_passthrough_routes. The endpoint path is opaque and may proxy JSON, binary, or SSE responses with upstream status codes preserved. For multi-segment provider endpoints, clients that rely on OpenAPI-generated path handling should URL-encode embedded slashes in the endpoint parameter. A leading v1/ segment is normalized away by default so /p/{provider}/v1/... and /p/{provider}/... map to the same upstream path relative to the provider base URL.", "tags": [ "passthrough" ], "summary": "Provider passthrough", "parameters": [ { "description": "Provider type", "name": "provider", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider-native endpoint path relative to the provider base URL. URL-encode embedded / characters when using generated clients.", "name": "endpoint", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "201": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "202": { "description": "Opaque upstream response body", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "text/event-stream": { "schema": { "type": "string", "format": "binary" } } } }, "204": { "description": "No Content passthrough response", "content": { "application/json": { "schema": { "type": "string" } }, "application/octet-stream": { "schema": { "type": "string" } }, "text/event-stream": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/batches": { "get": { "tags": [ "batch" ], "summary": "List batches", "parameters": [ { "description": "Pagination cursor", "name": "after", "in": "query", "schema": { "type": "string" } }, { "description": "Maximum items to return (1-100, default 20)", "name": "limit", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.BatchListResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] }, "post": { "tags": [ "batch" ], "summary": "Create a native provider batch", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.BatchRequest" } } }, "description": "Batch request", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.BatchResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/batches/{id}": { "get": { "tags": [ "batch" ], "summary": "Get a batch", "parameters": [ { "description": "Batch ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.BatchResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/batches/{id}/cancel": { "post": { "tags": [ "batch" ], "summary": "Cancel a batch", "parameters": [ { "description": "Batch ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.BatchResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/batches/{id}/results": { "get": { "tags": [ "batch" ], "summary": "Get batch results", "parameters": [ { "description": "Batch ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.BatchResultsResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/chat/completions": { "post": { "tags": [ "chat" ], "summary": "Create a chat completion", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ChatRequest" } } }, "description": "Chat completion request", "required": true }, "responses": { "200": { "description": "JSON response or SSE stream when stream=true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ChatResponse" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.ChatResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/embeddings": { "post": { "tags": [ "embeddings" ], "summary": "Create embeddings", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.EmbeddingRequest" } } }, "description": "Embeddings request", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.EmbeddingResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/files": { "get": { "tags": [ "files" ], "summary": "List files", "parameters": [ { "description": "Provider filter", "name": "provider", "in": "query", "schema": { "type": "string" } }, { "description": "File purpose filter", "name": "purpose", "in": "query", "schema": { "type": "string" } }, { "description": "Pagination cursor", "name": "after", "in": "query", "schema": { "type": "string" } }, { "description": "Maximum items to return (1-100, default 20)", "name": "limit", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.FileListResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] }, "post": { "tags": [ "files" ], "summary": "Upload a file", "parameters": [ { "description": "Provider override when multiple providers are configured", "name": "provider", "in": "query", "schema": { "type": "string" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "purpose": { "description": "File purpose", "type": "string" }, "file": { "description": "File to upload", "type": "string", "format": "binary" } }, "required": [ "purpose", "file" ] } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.FileObject" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/files/{id}": { "get": { "tags": [ "files" ], "summary": "Get file metadata", "parameters": [ { "description": "File ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider override", "name": "provider", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.FileObject" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] }, "delete": { "tags": [ "files" ], "summary": "Delete a file", "parameters": [ { "description": "File ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider override", "name": "provider", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.FileDeleteResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/files/{id}/content": { "get": { "tags": [ "files" ], "summary": "Download file content", "parameters": [ { "description": "File ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider override", "name": "provider", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Raw file content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "Bad Request", "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/models": { "get": { "tags": [ "models" ], "summary": "List available models", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ModelsResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/responses": { "post": { "tags": [ "responses" ], "summary": "Create a model response (Responses API)", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ResponsesRequest" } } }, "description": "Responses API request", "required": true }, "responses": { "200": { "description": "JSON response or SSE stream when stream=true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ResponsesResponse" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.ResponsesResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/responses/compact": { "post": { "tags": [ "responses" ], "summary": "Compact response input", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ResponseCompactRequest" } } }, "description": "Response compact request", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ResponseCompactResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "501": { "description": "Not Implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/responses/input_tokens": { "post": { "tags": [ "responses" ], "summary": "Count response input tokens", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ResponseInputTokensRequest" } } }, "description": "Response input token request", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ResponseInputTokensResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "501": { "description": "Not Implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/responses/{id}": { "get": { "tags": [ "responses" ], "summary": "Get a response", "parameters": [ { "description": "Response ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider override for native lookups", "name": "provider", "in": "query", "schema": { "type": "string" } }, { "description": "Fields to include in the response", "name": "include", "in": "query", "explode": true, "schema": { "type": "array", "items": { "type": "string" } } }, { "description": "Fields to include in the response", "name": "include[]", "in": "query", "explode": true, "schema": { "type": "array", "items": { "type": "string" } } }, { "description": "Whether to include obfuscated response data", "name": "include_obfuscation", "in": "query", "schema": { "type": "boolean" } }, { "description": "Input item offset for providers that support it", "name": "starting_after", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ResponsesResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "501": { "description": "Not Implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] }, "delete": { "tags": [ "responses" ], "summary": "Delete a response", "parameters": [ { "description": "Response ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider override for native deletion", "name": "provider", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ResponseDeleteResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "501": { "description": "Not Implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/responses/{id}/cancel": { "post": { "tags": [ "responses" ], "summary": "Cancel a response", "parameters": [ { "description": "Response ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider override for native cancellation", "name": "provider", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ResponsesResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "501": { "description": "Not Implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } }, "/v1/responses/{id}/input_items": { "get": { "tags": [ "responses" ], "summary": "List response input items", "parameters": [ { "description": "Response ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "description": "Provider override for native lookups", "name": "provider", "in": "query", "schema": { "type": "string" } }, { "description": "Pagination cursor", "name": "after", "in": "query", "schema": { "type": "string" } }, { "description": "Fields to include in listed input items", "name": "include", "in": "query", "explode": true, "schema": { "type": "array", "items": { "type": "string" } } }, { "description": "Fields to include in listed input items", "name": "include[]", "in": "query", "explode": true, "schema": { "type": "array", "items": { "type": "string" } } }, { "description": "Maximum items to return (1-100, default 20)", "name": "limit", "in": "query", "schema": { "type": "integer" } }, { "description": "Sort order: asc or desc", "name": "order", "in": "query", "schema": { "type": "string", "enum": [ "asc", "desc" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ResponseInputItemListResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "501": { "description": "Not Implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ] } } }, "servers": [ { "url": "https://gomodel.example.com", "description": "GoModel HTTPS deployment" }, { "url": "http://localhost:8080", "description": "Local GoModel" } ], "components": { "securitySchemes": { "BearerAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } }, "schemas": { "auditlog.ConversationResult": { "type": "object", "properties": { "anchor_id": { "type": "string" }, "entries": { "type": "array", "items": { "$ref": "#/components/schemas/auditlog.LogEntry" } } } }, "auditlog.FailoverSnapshot": { "type": "object", "properties": { "target_model": { "type": "string" } } }, "auditlog.LogData": { "type": "object", "properties": { "api_key_hash": { "type": "string" }, "error_message": { "description": "Error details (message can be long, so kept in JSON)", "type": "string" }, "failover": { "description": "Failover captures runtime redirect details when translated execution\nmoved from the primary selector to a configured failover target.", "allOf": [ { "$ref": "#/components/schemas/auditlog.FailoverSnapshot" } ] }, "max_tokens": { "type": "integer" }, "request_body": { "description": "Optional bodies (when LOGGING_LOG_BODIES=true)\nStored as interface{} so MongoDB serializes as native BSON documents (queryable/readable)\ninstead of BSON Binary (base64 in Compass)" }, "request_body_too_big_to_handle": { "description": "Body capture status flags (set when body exceeds 1MB limit)", "type": "boolean" }, "request_headers": { "description": "Optional headers (when LOGGING_LOG_HEADERS=true)\nSensitive headers are auto-redacted", "type": "object", "additionalProperties": { "type": "string" } }, "response_body": {}, "response_body_too_big_to_handle": { "type": "boolean" }, "response_headers": { "type": "object", "additionalProperties": { "type": "string" } }, "temperature": { "description": "Request parameters", "type": "number" }, "user_agent": { "description": "Identity", "type": "string" }, "workflow_features": { "description": "WorkflowFeatures captures the request-time effective workflow features\nafter runtime caps were applied. This keeps audit views historically accurate\neven if the active process config changes later.", "allOf": [ { "$ref": "#/components/schemas/auditlog.WorkflowFeaturesSnapshot" } ] } } }, "auditlog.LogEntry": { "type": "object", "properties": { "alias_used": { "type": "boolean" }, "auth_key_id": { "type": "string" }, "auth_method": { "type": "string" }, "cache_type": { "type": "string" }, "client_ip": { "type": "string" }, "data": { "description": "Data contains flexible request/response information as JSON", "allOf": [ { "$ref": "#/components/schemas/auditlog.LogData" } ] }, "duration_ns": { "description": "DurationNs is the request duration in nanoseconds", "type": "integer" }, "error_type": { "type": "string" }, "id": { "description": "ID is a unique identifier for this log entry (UUID)", "type": "string" }, "method": { "type": "string" }, "path": { "type": "string" }, "provider": { "description": "canonical provider type used for routing and filters", "type": "string" }, "provider_name": { "type": "string" }, "request_id": { "description": "Extracted fields for efficient filtering (indexed in relational DBs)", "type": "string" }, "requested_model": { "description": "Core fields (indexed for queries)", "type": "string" }, "resolved_model": { "type": "string" }, "status_code": { "type": "integer" }, "stream": { "type": "boolean" }, "timestamp": { "description": "Timestamp is when the request started", "type": "string" }, "user_path": { "type": "string" }, "workflow_version_id": { "type": "string" } } }, "auditlog.LogListResult": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/auditlog.LogEntry" } }, "limit": { "type": "integer" }, "offset": { "type": "integer" }, "total": { "type": "integer" } } }, "auditlog.WorkflowFeaturesSnapshot": { "type": "object", "properties": { "audit": { "type": "boolean" }, "cache": { "type": "boolean" }, "fallback": { "type": "boolean" }, "guardrails": { "type": "boolean" }, "usage": { "type": "boolean" } } }, "core.BatchError": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string" } } }, "core.BatchListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/core.BatchResponse" } }, "first_id": { "type": "string" }, "has_more": { "type": "boolean" }, "last_id": { "type": "string" }, "object": { "type": "string" } } }, "core.BatchRequest": { "type": "object", "properties": { "completion_window": { "type": "string" }, "endpoint": { "type": "string" }, "input_file_id": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "requests": { "type": "array", "items": { "$ref": "#/components/schemas/core.BatchRequestItem" } } } }, "core.BatchRequestCounts": { "type": "object", "properties": { "completed": { "type": "integer" }, "failed": { "type": "integer" }, "total": { "type": "integer" } } }, "core.BatchRequestItem": { "type": "object", "properties": { "body": { "type": "object" }, "custom_id": { "type": "string" }, "method": { "type": "string" }, "url": { "type": "string" } } }, "core.BatchResponse": { "type": "object", "properties": { "cancelled_at": { "type": "integer" }, "cancelling_at": { "type": "integer" }, "completed_at": { "type": "integer" }, "completion_window": { "type": "string" }, "created_at": { "type": "integer" }, "endpoint": { "type": "string" }, "failed_at": { "type": "integer" }, "id": { "type": "string" }, "in_progress_at": { "type": "integer" }, "input_file_id": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "object": { "type": "string" }, "provider": { "type": "string" }, "provider_batch_id": { "type": "string" }, "request_counts": { "$ref": "#/components/schemas/core.BatchRequestCounts" }, "results": { "type": "array", "items": { "$ref": "#/components/schemas/core.BatchResultItem" } }, "status": { "type": "string" }, "usage": { "description": "Gateway extension: optional usage/result snapshots persisted by the gateway.", "allOf": [ { "$ref": "#/components/schemas/core.BatchUsageSummary" } ] } } }, "core.BatchResultItem": { "type": "object", "properties": { "custom_id": { "type": "string" }, "error": { "$ref": "#/components/schemas/core.BatchError" }, "index": { "type": "integer" }, "model": { "type": "string" }, "provider": { "type": "string" }, "response": {}, "status_code": { "type": "integer" }, "url": { "type": "string" } } }, "core.BatchResultsResponse": { "type": "object", "properties": { "batch_id": { "type": "string" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/core.BatchResultItem" } }, "object": { "type": "string" } } }, "core.BatchUsageSummary": { "type": "object", "properties": { "input_cost": { "type": "number" }, "input_tokens": { "type": "integer" }, "output_cost": { "type": "number" }, "output_tokens": { "type": "integer" }, "total_cost": { "type": "number" }, "total_tokens": { "type": "integer" } } }, "core.ChatRequest": { "type": "object", "properties": { "max_tokens": { "type": "integer" }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/core.Message" } }, "model": { "type": "string" }, "parallel_tool_calls": { "type": "boolean" }, "provider": { "description": "Gateway routing hint; stripped before upstream execution.", "type": "string" }, "reasoning": { "$ref": "#/components/schemas/core.Reasoning" }, "stream": { "type": "boolean" }, "stream_options": { "$ref": "#/components/schemas/core.StreamOptions" }, "temperature": { "type": "number" }, "tool_choice": { "description": "string or object" }, "tools": { "type": "array", "items": { "type": "object", "additionalProperties": {} } } } }, "core.ChatResponse": { "type": "object", "properties": { "choices": { "type": "array", "items": { "$ref": "#/components/schemas/core.Choice" } }, "created": { "type": "integer" }, "id": { "type": "string" }, "model": { "type": "string" }, "object": { "type": "string" }, "provider": { "type": "string" }, "system_fingerprint": { "type": "string" }, "usage": { "$ref": "#/components/schemas/core.Usage" } } }, "core.Choice": { "type": "object", "properties": { "finish_reason": { "type": "string" }, "index": { "type": "integer" }, "logprobs": { "type": "object" }, "message": { "$ref": "#/components/schemas/core.ResponseMessage" } } }, "core.CompletionTokensDetails": { "type": "object", "properties": { "accepted_prediction_tokens": { "type": "integer" }, "audio_tokens": { "type": "integer" }, "reasoning_tokens": { "type": "integer" }, "rejected_prediction_tokens": { "type": "integer" } } }, "core.ContentPart": { "type": "object", "properties": { "image_url": { "$ref": "#/components/schemas/core.ImageURLContent" }, "input_audio": { "$ref": "#/components/schemas/core.InputAudioContent" }, "text": { "type": "string" }, "type": { "type": "string" } } }, "core.EmbeddingData": { "type": "object", "properties": { "embedding": { "type": "object" }, "index": { "type": "integer" }, "object": { "type": "string" } } }, "core.EmbeddingRequest": { "type": "object", "properties": { "dimensions": { "type": "integer" }, "encoding_format": { "type": "string" }, "input": {}, "model": { "type": "string" }, "provider": { "description": "Gateway routing hint; stripped before upstream execution.", "type": "string" } } }, "core.EmbeddingResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/core.EmbeddingData" } }, "model": { "type": "string" }, "object": { "type": "string" }, "provider": { "type": "string" }, "usage": { "$ref": "#/components/schemas/core.EmbeddingUsage" } } }, "core.EmbeddingUsage": { "type": "object", "properties": { "prompt_tokens": { "type": "integer" }, "total_tokens": { "type": "integer" } } }, "core.ErrorType": { "type": "string", "enum": [ "provider_error", "rate_limit_error", "invalid_request_error", "authentication_error", "not_found_error" ], "x-enum-varnames": [ "ErrorTypeProvider", "ErrorTypeRateLimit", "ErrorTypeInvalidRequest", "ErrorTypeAuthentication", "ErrorTypeNotFound" ] }, "core.FileDeleteResponse": { "type": "object", "properties": { "deleted": { "type": "boolean" }, "id": { "type": "string" }, "object": { "type": "string" } } }, "core.FileListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/core.FileObject" } }, "has_more": { "type": "boolean" }, "object": { "type": "string" } } }, "core.FileObject": { "type": "object", "properties": { "bytes": { "type": "integer" }, "created_at": { "type": "integer" }, "filename": { "type": "string" }, "id": { "type": "string" }, "object": { "type": "string" }, "provider": { "description": "Gateway enrichment for multi-provider deployments.", "type": "string" }, "purpose": { "type": "string" }, "status": { "type": "string" }, "status_details": { "type": "string" } } }, "core.FunctionCall": { "type": "object", "properties": { "arguments": { "type": "string" }, "name": { "type": "string" } } }, "core.GatewayError": { "type": "object", "properties": { "code": { "type": "string", "nullable": true }, "message": { "type": "string" }, "param": { "type": "string", "nullable": true }, "provider": { "type": "string" }, "status_code": { "type": "integer" }, "type": { "$ref": "#/components/schemas/core.ErrorType" } } }, "core.ImageURLContent": { "type": "object", "properties": { "detail": { "type": "string" }, "media_type": { "type": "string" }, "url": { "type": "string" } } }, "core.InputAudioContent": { "type": "object", "properties": { "data": { "type": "string" }, "format": { "type": "string" } } }, "core.Message": { "type": "object", "properties": { "content": { "description": "ContentSchema documents that `content` accepts either a plain string\nor an array of ContentPart values.", "type": "array", "items": { "$ref": "#/components/schemas/core.ContentPart" }, "x-oneof": "[{\"type\":\"null\"},{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/core.ContentPart\"}}]" }, "role": { "type": "string" }, "tool_call_id": { "type": "string" }, "tool_calls": { "type": "array", "items": { "$ref": "#/components/schemas/core.ToolCall" } } } }, "core.Model": { "type": "object", "properties": { "created": { "type": "integer" }, "id": { "type": "string" }, "metadata": { "description": "Metadata holds optional enrichment data (display name, pricing, capabilities, etc.).\nMay be nil if the model was not found in the external registry.", "allOf": [ { "$ref": "#/components/schemas/core.ModelMetadata" } ] }, "object": { "type": "string" }, "owned_by": { "type": "string" } } }, "core.ModelCategory": { "type": "string", "enum": [ "all", "text_generation", "embedding", "image", "audio", "video", "utility" ], "x-enum-varnames": [ "CategoryAll", "CategoryTextGeneration", "CategoryEmbedding", "CategoryImage", "CategoryAudio", "CategoryVideo", "CategoryUtility" ] }, "core.ModelMetadata": { "type": "object", "properties": { "capabilities": { "type": "object", "additionalProperties": { "type": "boolean" } }, "categories": { "type": "array", "items": { "$ref": "#/components/schemas/core.ModelCategory" } }, "context_window": { "type": "integer" }, "description": { "type": "string" }, "display_name": { "type": "string" }, "family": { "type": "string" }, "max_output_tokens": { "type": "integer" }, "modes": { "type": "array", "items": { "type": "string" } }, "pricing": { "$ref": "#/components/schemas/core.ModelPricing" }, "rankings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/core.ModelRanking" } }, "tags": { "type": "array", "items": { "type": "string" } } } }, "core.ModelPricing": { "type": "object", "properties": { "audio_input_per_mtok": { "type": "number" }, "audio_output_per_mtok": { "type": "number" }, "batch_input_per_mtok": { "type": "number" }, "batch_output_per_mtok": { "type": "number" }, "cache_write_per_mtok": { "type": "number" }, "cached_input_per_mtok": { "type": "number" }, "currency": { "type": "string" }, "input_per_image": { "type": "number" }, "input_per_mtok": { "type": "number" }, "output_per_mtok": { "type": "number" }, "per_character_input": { "type": "number" }, "per_image": { "type": "number" }, "per_page": { "type": "number" }, "per_request": { "type": "number" }, "per_second_input": { "type": "number" }, "per_second_output": { "type": "number" }, "reasoning_output_per_mtok": { "type": "number" }, "tiers": { "type": "array", "items": { "$ref": "#/components/schemas/core.ModelPricingTier" } } } }, "core.ModelPricingTier": { "type": "object", "properties": { "input_per_mtok": { "type": "number" }, "output_per_mtok": { "type": "number" }, "up_to_mtok": { "type": "number" } } }, "core.ModelRanking": { "type": "object", "properties": { "as_of": { "type": "string" }, "elo": { "type": "number" }, "rank": { "type": "integer" } } }, "core.ModelsResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/core.Model" } }, "object": { "type": "string" } } }, "core.OpenAIErrorEnvelope": { "type": "object", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/core.OpenAIErrorObject" } } }, "core.OpenAIErrorObject": { "type": "object", "required": [ "code", "message", "param", "type" ], "properties": { "code": { "type": "string", "nullable": true }, "message": { "type": "string" }, "param": { "type": "string", "nullable": true }, "type": { "$ref": "#/components/schemas/core.ErrorType" } } }, "core.PromptTokensDetails": { "type": "object", "properties": { "audio_tokens": { "type": "integer" }, "cached_tokens": { "type": "integer" }, "image_tokens": { "type": "integer" }, "text_tokens": { "type": "integer" } } }, "core.Reasoning": { "type": "object", "properties": { "effort": { "description": "Effort controls how much reasoning effort the model should use.\nValid values are \"low\", \"medium\", and \"high\".", "type": "string" } } }, "core.ResponseCompactRequest": { "type": "object", "properties": { "input": { "description": "string or []ResponsesInputElement — see docs for array form", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/core.ResponsesInputElement" } } ] }, "instructions": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "model": { "type": "string" }, "provider": { "description": "Gateway routing hint; stripped before upstream execution.", "type": "string" }, "reasoning": { "$ref": "#/components/schemas/core.Reasoning" } } }, "core.ResponseCompactResponse": { "type": "object", "properties": { "created_at": { "type": "integer" }, "error": { "$ref": "#/components/schemas/core.ResponsesError" }, "id": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "object": { "type": "string" }, "output": { "type": "array", "items": { "$ref": "#/components/schemas/core.ResponsesOutputItem" } }, "provider": { "type": "string" }, "usage": { "$ref": "#/components/schemas/core.ResponsesUsage" } } }, "core.ResponseDeleteResponse": { "type": "object", "properties": { "deleted": { "type": "boolean" }, "id": { "type": "string" }, "object": { "type": "string" } } }, "core.ResponseInputItemListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/core.ResponsesInputElement" } }, "first_id": { "type": "string" }, "has_more": { "type": "boolean" }, "last_id": { "type": "string" }, "object": { "type": "string" } } }, "core.ResponseInputTokensRequest": { "type": "object", "properties": { "input": { "description": "string or []ResponsesInputElement — see docs for array form", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/core.ResponsesInputElement" } } ] }, "instructions": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "model": { "type": "string" }, "provider": { "description": "Gateway routing hint; stripped before upstream execution.", "type": "string" }, "reasoning": { "$ref": "#/components/schemas/core.Reasoning" } } }, "core.ResponseInputTokensResponse": { "type": "object", "properties": { "input_tokens": { "type": "integer" }, "object": { "type": "string" } } }, "core.ResponseMessage": { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/components/schemas/core.ContentPart" }, "x-oneof": "[{\"type\":\"null\"},{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/core.ContentPart\"}}]" }, "role": { "type": "string" }, "tool_calls": { "type": "array", "items": { "$ref": "#/components/schemas/core.ToolCall" } } } }, "core.ResponsesContentItem": { "type": "object", "properties": { "annotations": { "description": "Providers can return structured annotation objects here (for example\ncitations from native tools), so keep the payload shape liberal.", "type": "array", "items": { "type": "object" } }, "image_url": { "$ref": "#/components/schemas/core.ImageURLContent" }, "input_audio": { "$ref": "#/components/schemas/core.InputAudioContent" }, "text": { "type": "string" }, "type": { "description": "\"output_text\", \"input_image\", \"input_audio\", etc.", "type": "string" } } }, "core.ResponsesError": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" } } }, "core.ResponsesOutputItem": { "type": "object", "properties": { "arguments": { "type": "string" }, "call_id": { "type": "string" }, "content": { "type": "array", "items": { "$ref": "#/components/schemas/core.ResponsesContentItem" } }, "id": { "type": "string" }, "name": { "type": "string" }, "role": { "type": "string" }, "status": { "type": "string" }, "type": { "description": "\"message\", \"function_call\", etc.", "type": "string" } } }, "core.ResponsesRequest": { "type": "object", "properties": { "input": { "description": "string or []ResponsesInputElement — see docs for array form", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/core.ResponsesInputElement" } } ] }, "instructions": { "type": "string" }, "max_output_tokens": { "type": "integer" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "model": { "type": "string" }, "parallel_tool_calls": { "type": "boolean" }, "provider": { "description": "Gateway routing hint; stripped before upstream execution.", "type": "string" }, "reasoning": { "$ref": "#/components/schemas/core.Reasoning" }, "stream": { "type": "boolean" }, "stream_options": { "$ref": "#/components/schemas/core.StreamOptions" }, "temperature": { "type": "number" }, "tool_choice": { "description": "string or object" }, "tools": { "type": "array", "items": { "type": "object", "additionalProperties": {} } } } }, "core.ResponsesResponse": { "type": "object", "properties": { "created_at": { "type": "integer" }, "error": { "$ref": "#/components/schemas/core.ResponsesError" }, "id": { "type": "string" }, "model": { "type": "string" }, "object": { "description": "\"response\"", "type": "string" }, "output": { "type": "array", "items": { "$ref": "#/components/schemas/core.ResponsesOutputItem" } }, "provider": { "type": "string" }, "status": { "description": "\"completed\", \"failed\", \"in_progress\"", "type": "string" }, "usage": { "$ref": "#/components/schemas/core.ResponsesUsage" } } }, "core.ResponsesUsage": { "type": "object", "properties": { "completion_tokens_details": { "$ref": "#/components/schemas/core.CompletionTokensDetails" }, "input_tokens": { "type": "integer" }, "output_tokens": { "type": "integer" }, "prompt_tokens_details": { "$ref": "#/components/schemas/core.PromptTokensDetails" }, "raw_usage": { "type": "object", "additionalProperties": {} }, "total_tokens": { "type": "integer" } } }, "core.StreamOptions": { "type": "object", "properties": { "include_usage": { "description": "IncludeUsage requests token usage information in streaming responses.\nWhen true, the final streaming chunk will include usage statistics.", "type": "boolean" } } }, "core.ToolCall": { "type": "object", "properties": { "function": { "$ref": "#/components/schemas/core.FunctionCall" }, "id": { "type": "string" }, "type": { "type": "string" } } }, "core.Usage": { "type": "object", "properties": { "completion_tokens": { "type": "integer" }, "completion_tokens_details": { "$ref": "#/components/schemas/core.CompletionTokensDetails" }, "prompt_tokens": { "type": "integer" }, "prompt_tokens_details": { "$ref": "#/components/schemas/core.PromptTokensDetails" }, "raw_usage": { "type": "object", "additionalProperties": {} }, "total_tokens": { "type": "integer" } } }, "providers.CategoryCount": { "type": "object", "properties": { "category": { "$ref": "#/components/schemas/core.ModelCategory" }, "count": { "type": "integer" }, "display_name": { "type": "string" } } }, "usage.CacheOverview": { "type": "object", "properties": { "daily": { "type": "array", "items": { "$ref": "#/components/schemas/usage.CacheOverviewDaily" } }, "summary": { "$ref": "#/components/schemas/usage.CacheOverviewSummary" } } }, "usage.CacheOverviewDaily": { "type": "object", "properties": { "date": { "type": "string" }, "exact_hits": { "type": "integer" }, "hits": { "type": "integer" }, "input_tokens": { "type": "integer" }, "output_tokens": { "type": "integer" }, "saved_cost": { "type": "number" }, "semantic_hits": { "type": "integer" }, "total_tokens": { "type": "integer" } } }, "usage.CacheOverviewSummary": { "type": "object", "properties": { "exact_hits": { "type": "integer" }, "semantic_hits": { "type": "integer" }, "total_hits": { "type": "integer" }, "total_input_tokens": { "type": "integer" }, "total_output_tokens": { "type": "integer" }, "total_saved_cost": { "type": "number" }, "total_tokens": { "type": "integer" } } }, "usage.DailyUsage": { "type": "object", "properties": { "date": { "type": "string" }, "input_cost": { "type": "number" }, "input_tokens": { "type": "integer" }, "output_cost": { "type": "number" }, "output_tokens": { "type": "integer" }, "requests": { "type": "integer" }, "total_cost": { "type": "number" }, "total_tokens": { "type": "integer" } } }, "usage.ModelUsage": { "type": "object", "properties": { "input_cost": { "type": "number" }, "input_tokens": { "type": "integer" }, "model": { "type": "string" }, "output_cost": { "type": "number" }, "output_tokens": { "type": "integer" }, "provider": { "type": "string" }, "provider_name": { "type": "string" }, "total_cost": { "type": "number" } } }, "usage.UsageLogEntry": { "type": "object", "properties": { "cache_type": { "type": "string" }, "costs_calculation_caveat": { "type": "string" }, "endpoint": { "type": "string" }, "id": { "type": "string" }, "input_cost": { "type": "number" }, "input_tokens": { "type": "integer" }, "model": { "type": "string" }, "output_cost": { "type": "number" }, "output_tokens": { "type": "integer" }, "provider": { "type": "string" }, "provider_id": { "type": "string" }, "provider_name": { "type": "string" }, "raw_data": { "type": "object", "additionalProperties": {} }, "request_id": { "type": "string" }, "timestamp": { "type": "string" }, "total_cost": { "type": "number" }, "total_tokens": { "type": "integer" }, "user_path": { "type": "string" } } }, "usage.UsageLogResult": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/usage.UsageLogEntry" } }, "limit": { "type": "integer" }, "offset": { "type": "integer" }, "total": { "type": "integer" } } }, "usage.UsageSummary": { "type": "object", "properties": { "total_cost": { "type": "number" }, "total_input_cost": { "type": "number" }, "total_input_tokens": { "type": "integer" }, "total_output_cost": { "type": "number" }, "total_output_tokens": { "type": "integer" }, "total_requests": { "type": "integer" }, "total_tokens": { "type": "integer" } } }, "usage.UserPathUsage": { "type": "object", "properties": { "input_cost": { "type": "number", "nullable": true }, "input_tokens": { "type": "integer" }, "output_cost": { "type": "number", "nullable": true }, "output_tokens": { "type": "integer" }, "total_cost": { "type": "number", "nullable": true }, "total_tokens": { "type": "integer" }, "user_path": { "type": "string" } } }, "core.ResponsesInputElement": { "type": "object", "properties": { "arguments": { "type": "string" }, "call_id": { "description": "Function call fields (type=\"function_call\")", "type": "string" }, "content": { "description": "Can be string or []ContentPart", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/core.ContentPart" } } ] }, "name": { "type": "string" }, "output": { "description": "Function call output fields (type=\"function_call_output\") - CallID shared above", "type": "string" }, "role": { "description": "Message fields (type=\"\" or \"message\")", "type": "string" }, "status": { "type": "string" }, "type": { "description": "\"message\", \"function_call\", \"function_call_output\"", "type": "string" } } } } } }