{ "openapi": "3.0.0", "info": { "description": "AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic, Gemini, Groq, OpenRouter, DeepSeek, Z.ai, xAI, MiniMax, Xiaomi MiMo, OpenCode Go, Oracle, Ollama, Bailian). Drop-in OpenAI-compatible API.", "title": "GoModel API", "contact": {}, "version": "1.0" }, "paths": { "/admin/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/audit/conversation" } } } }, "/admin/audit/detail": { "get": { "description": "Returns one audit log entry enriched with usage summary when available.", "tags": [ "admin" ], "summary": "Get audit log entry detail", "parameters": [ { "description": "Audit log entry ID", "name": "log_id", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.auditLogEntryResponse" } } } }, "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" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/audit/detail" } } } }, "/admin/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/admin.auditLogListResponse" } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/audit/log" } } } }, "/admin/budgets": { "get": { "tags": [ "admin" ], "summary": "List budgets with current status", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.budgetListResponse" } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/budgets" } } }, "put": { "tags": [ "admin" ], "summary": "Create or update one budget", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.upsertBudgetRequest" } } }, "description": "Budget key and amount", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.budgetListResponse" } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/budgets" } } }, "delete": { "tags": [ "admin" ], "summary": "Delete one budget", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.deleteBudgetRequest" } } }, "description": "Budget key", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.budgetListResponse" } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/budgets" } } } }, "/admin/budgets/reset": { "post": { "tags": [ "admin" ], "summary": "Reset all budget periods", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.resetBudgetsRequest" } } }, "description": "Reset confirmation", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.resetBudgetsResponse" } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/budgets/reset" } } } }, "/admin/budgets/reset-one": { "post": { "tags": [ "admin" ], "summary": "Reset one budget period", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.resetBudgetRequest" } } }, "description": "Budget key", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.budgetListResponse" } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/budgets/reset-one" } } } }, "/admin/budgets/settings": { "get": { "tags": [ "admin" ], "summary": "Get budget reset settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/budget.Settings" } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/budgets/settings" } } }, "put": { "tags": [ "admin" ], "summary": "Update budget reset settings", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.updateBudgetSettingsRequest" } } }, "description": "Budget reset settings", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/budget.Settings" } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/budgets/settings" } } } }, "/admin/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/cache/overview" } } } }, "/admin/model-pricing-overrides": { "get": { "description": "Lists persisted USD pricing overrides. Selectors support global \"/\", provider-wide \"provider/\", model-wide \"model\", and exact \"provider/model\" scopes.", "tags": [ "admin" ], "summary": "List model pricing overrides", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/pricingoverrides.View" }, "maxItems": 10000, "description": "Bounded by maxItems=10000." } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/model-pricing-overrides" } } }, "put": { "description": "Stores USD-only pricing for one selector. More precise selectors override broader selectors at runtime.", "tags": [ "admin" ], "summary": "Create or update one model pricing override", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.upsertModelPricingOverrideRequest" } } }, "description": "Pricing selector and override", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/pricingoverrides.View" } } } }, "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" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/model-pricing-overrides" } } }, "delete": { "tags": [ "admin" ], "summary": "Delete one model pricing override", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.deleteModelPricingOverrideRequest" } } }, "description": "Pricing selector to remove", "required": true }, "responses": { "204": { "description": "No Content" }, "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" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/model-pricing-overrides" } } } }, "/admin/models": { "get": { "tags": [ "admin" ], "summary": "List all registered models with provider info and access state", "parameters": [ { "description": "Filter by model category", "name": "category", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/admin.modelInventoryResponse" }, "maxItems": 10000, "description": "Bounded by maxItems=10000." } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/models" } } } }, "/admin/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/models/categories" } } } }, "/admin/runtime/config": { "get": { "tags": [ "admin" ], "summary": "Get admin runtime configuration", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.DashboardConfigResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/runtime/config" } } } }, "/admin/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/usage/daily" } } } }, "/admin/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/usage/log" } } } }, "/admin/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/usage/models" } } } }, "/admin/usage/recalculate-pricing": { "post": { "tags": [ "admin" ], "summary": "Recalculate stored usage costs from current model pricing metadata", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.recalculatePricingRequest" } } }, "description": "Recalculation filters and confirmation", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/usage.RecalculatePricingResult" } } } }, "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" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/usage/recalculate-pricing" } } } }, "/admin/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/usage/summary" } } } }, "/admin/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/usage/user-paths" } } } }, "/admin/virtual-models": { "get": { "tags": [ "admin" ], "summary": "List virtual models (redirects and access policies)", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/virtualmodels.View" }, "maxItems": 10000, "description": "Bounded by maxItems=10000." } } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/virtual-models" } } }, "put": { "tags": [ "admin" ], "summary": "Create or update one virtual model", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.upsertVirtualModelRequest" } } }, "description": "Virtual model definition", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/virtualmodels.View" } } } }, "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" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/virtual-models" } } }, "delete": { "tags": [ "admin" ], "summary": "Delete one virtual model", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/admin.deleteVirtualModelRequest" } } }, "description": "Virtual model source to remove", "required": true }, "responses": { "204": { "description": "No Content" }, "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" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.GatewayError" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/admin/virtual-models" } } } }, "/health": { "get": { "tags": [ "system" ], "summary": "Health check", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "x-mint": { "metadata": { "sidebarTitle": "/health" } } } }, "/health/ready": { "get": { "tags": [ "system" ], "summary": "Readiness check", "responses": { "200": { "description": "ready or degraded", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "503": { "description": "not ready", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } } }, "x-mint": { "metadata": { "sidebarTitle": "/health/ready" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/p/{provider}/{endpoint}" } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/p/{provider}/{endpoint}" } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/p/{provider}/{endpoint}" } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/p/{provider}/{endpoint}" } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/p/{provider}/{endpoint}" } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/p/{provider}/{endpoint}" } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/p/{provider}/{endpoint}" } } } }, "/v1/audio/speech": { "post": { "tags": [ "audio" ], "summary": "Create speech (text-to-speech)", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.AudioSpeechRequest" } } }, "description": "Text-to-speech request", "required": true }, "responses": { "200": { "description": "Binary audio in the requested response_format", "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/audio/speech" } } } }, "/v1/audio/transcriptions": { "post": { "tags": [ "audio" ], "summary": "Create transcription (speech-to-text)", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "description": "Audio file to transcribe", "type": "string", "format": "binary" }, "model": { "description": "Model ID", "type": "string" }, "language": { "description": "Input language (ISO-639-1)", "type": "string" }, "prompt": { "description": "Optional text to guide the model", "type": "string" }, "response_format": { "description": "json, text, srt, verbose_json, or vtt", "type": "string" }, "temperature": { "description": "Sampling temperature (0-1)", "type": "number" }, "timestamp_granularities[]": { "description": "Timestamp granularities to populate: word and/or segment", "type": "array", "items": { "type": "string" } } }, "required": [ "file", "model" ] } } }, "required": true }, "responses": { "200": { "description": "Transcription in the requested response_format: a JSON object for json/verbose_json, or a text/plain body for text/srt/vtt", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } }, "text/plain": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/plain": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/plain": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/plain": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } }, "text/plain": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/audio/transcriptions" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/batches" } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/batches" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/batches/{id}" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/batches/{id}/cancel" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/batches/{id}/results" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/chat/completions" } } } }, "/v1/conversations": { "post": { "tags": [ "conversations" ], "summary": "Create a conversation", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ConversationCreateRequest" } } }, "description": "Conversation create request" }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.Conversation" } } } }, "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" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/conversations" } } } }, "/v1/conversations/{id}": { "get": { "tags": [ "conversations" ], "summary": "Get a conversation", "parameters": [ { "description": "Conversation ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.Conversation" } } } }, "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" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/conversations/{id}" } } }, "post": { "description": "Replaces the conversation metadata in full.", "tags": [ "conversations" ], "summary": "Update a conversation", "parameters": [ { "description": "Conversation ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ConversationUpdateRequest" } } }, "description": "Conversation update request", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.Conversation" } } } }, "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" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/conversations/{id}" } } }, "delete": { "tags": [ "conversations" ], "summary": "Delete a conversation", "parameters": [ { "description": "Conversation ID", "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/core.ConversationDeleteResponse" } } } }, "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" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/conversations/{id}" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/embeddings" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/files" } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/files" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/files/{id}" } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/files/{id}" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/files/{id}/content" } } } }, "/v1/messages": { "post": { "tags": [ "messages" ], "summary": "Create a message (Anthropic Messages API)", "requestBody": { "$ref": "#/components/requestBodies/anthropicapi.MessagesRequest" }, "responses": { "200": { "description": "JSON response or SSE stream when stream=true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/anthropicapi.MessagesResponse" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/anthropicapi.SSEEventFrame" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/anthropicapi.ErrorResponse" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/anthropicapi.ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/anthropicapi.ErrorResponse" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/anthropicapi.ErrorResponse" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/anthropicapi.ErrorResponse" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/anthropicapi.ErrorResponse" } } } }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/anthropicapi.ErrorResponse" } }, "text/event-stream": { "schema": { "$ref": "#/components/schemas/anthropicapi.ErrorResponse" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/messages" } } } }, "/v1/messages/count_tokens": { "post": { "description": "Returns a provider-agnostic heuristic estimate of the input token count.", "tags": [ "messages" ], "summary": "Count message tokens (Anthropic Messages API)", "requestBody": { "$ref": "#/components/requestBodies/anthropicapi.MessagesRequest" }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/anthropicapi.CountTokensResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/anthropicapi.ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/anthropicapi.ErrorResponse" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/messages/count_tokens" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/models" } } } }, "/v1/realtime": { "get": { "description": "Upgrades to a websocket and relays an OpenAI-compatible realtime (speech-to-speech) session to the provider that owns the model named in the ?model= query parameter. Provider credentials are injected by the gateway.", "tags": [ "realtime" ], "summary": "Open a realtime session", "parameters": [ { "description": "Model that owns the realtime session", "name": "model", "in": "query", "required": true, "schema": { "type": "string" } }, { "description": "Optional provider hint", "name": "provider", "in": "query", "schema": { "type": "string" } } ], "responses": { "101": { "description": "Switching Protocols", "content": { "*/*": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "401": { "description": "Unauthorized", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "501": { "description": "Not Implemented", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } }, "502": { "description": "Bad Gateway", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/core.OpenAIErrorEnvelope" } } } } }, "security": [ { "BearerAuth": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/realtime" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/responses" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/responses/compact" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/responses/input_tokens" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/responses/{id}" } } }, "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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/responses/{id}" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/responses/{id}/cancel" } } } }, "/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": [] } ], "x-mint": { "metadata": { "sidebarTitle": "/v1/responses/{id}/input_items" } } } } }, "servers": [ { "url": "{base_url}", "description": "Edit the base URL to point at your GoModel deployment.", "variables": { "base_url": { "default": "http://localhost:8080", "description": "Your GoModel deployment URL" } } } ], "components": { "requestBodies": { "anthropicapi.MessagesRequest": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/anthropicapi.MessagesRequest" } } }, "description": "Anthropic Messages request", "required": true } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "schemas": { "admin.DashboardConfigResponse": { "type": "object", "properties": { "BUDGETS_ENABLED": { "type": "string" }, "CACHE_ENABLED": { "type": "string" }, "DASHBOARD_LIVE_LOGS_ENABLED": { "type": "string" }, "FEATURE_FALLBACK_MODE": { "type": "string" }, "GUARDRAILS_ENABLED": { "type": "string" }, "LOGGING_ENABLED": { "type": "string" }, "REDIS_URL": { "type": "string" }, "SEMANTIC_CACHE_ENABLED": { "type": "string" }, "USAGE_ENABLED": { "type": "string" }, "USAGE_PRICING_RECALCULATION_ENABLED": { "type": "string" } } }, "admin.auditLogEntryResponse": { "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" }, "usage": { "$ref": "#/components/schemas/usage.RequestUsageSummary" }, "user_path": { "type": "string" }, "workflow_version_id": { "type": "string" } } }, "admin.auditLogListResponse": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/admin.auditLogEntryResponse" } }, "limit": { "type": "integer" }, "offset": { "type": "integer" }, "total": { "type": "integer" } } }, "admin.budgetKeyRequest": { "type": "object", "properties": { "period": { "type": "string" }, "period_seconds": { "type": "integer" } }, "oneOf": [ { "required": [ "period" ] }, { "required": [ "period_seconds" ] } ] }, "admin.budgetListResponse": { "type": "object", "properties": { "budgets": { "type": "array", "items": { "$ref": "#/components/schemas/admin.budgetStatusResponse" } }, "server_time": { "type": "string" } } }, "admin.budgetStatusResponse": { "type": "object", "properties": { "amount": { "type": "number" }, "created_at": { "type": "string" }, "has_usage": { "type": "boolean" }, "last_reset_at": { "type": "string" }, "period_end": { "type": "string" }, "period_label": { "type": "string" }, "period_ratio": { "type": "number" }, "period_seconds": { "type": "integer" }, "period_start": { "type": "string" }, "remaining": { "type": "number" }, "source": { "type": "string" }, "spent": { "type": "number" }, "updated_at": { "type": "string" }, "usage_ratio": { "type": "number" }, "user_path": { "type": "string" } } }, "admin.deleteBudgetRequest": { "type": "object", "properties": { "budget_key": { "$ref": "#/components/schemas/admin.budgetKeyRequest" }, "user_path": { "type": "string" } }, "required": [ "budget_key" ] }, "admin.deleteModelPricingOverrideRequest": { "type": "object", "properties": { "selector": { "type": "string" } }, "required": [ "selector" ] }, "admin.deleteVirtualModelRequest": { "type": "object", "properties": { "source": { "type": "string" } }, "required": [ "source" ] }, "admin.modelAccessResponse": { "type": "object", "properties": { "default_enabled": { "type": "boolean" }, "effective_enabled": { "type": "boolean" }, "override": { "$ref": "#/components/schemas/virtualmodels.VirtualModel" }, "selector": { "type": "string" }, "user_paths": { "type": "array", "items": { "type": "string" } } } }, "admin.modelInventoryResponse": { "type": "object", "properties": { "access": { "$ref": "#/components/schemas/admin.modelAccessResponse" }, "model": { "$ref": "#/components/schemas/core.Model" }, "provider_name": { "type": "string" }, "provider_type": { "type": "string" }, "selector": { "type": "string" } } }, "admin.recalculatePricingRequest": { "type": "object", "properties": { "confirm": { "type": "string" }, "confirmation": { "type": "string" }, "days": { "type": "integer" }, "end_date": { "type": "string" }, "selector": { "type": "string" }, "start_date": { "type": "string" }, "user_path": { "type": "string" } }, "required": [ "confirmation" ] }, "admin.resetBudgetRequest": { "type": "object", "properties": { "period": { "type": "string" }, "period_seconds": { "type": "integer" }, "user_path": { "type": "string" } } }, "admin.resetBudgetsRequest": { "type": "object", "properties": { "confirm": { "type": "string" }, "confirmation": { "type": "string" } } }, "admin.resetBudgetsResponse": { "type": "object", "properties": { "status": { "type": "string" } } }, "admin.updateBudgetSettingsRequest": { "type": "object", "properties": { "daily_reset_hour": { "type": "integer" }, "daily_reset_minute": { "type": "integer" }, "monthly_reset_day": { "type": "integer" }, "monthly_reset_hour": { "type": "integer" }, "monthly_reset_minute": { "type": "integer" }, "weekly_reset_hour": { "type": "integer" }, "weekly_reset_minute": { "type": "integer" }, "weekly_reset_weekday": { "type": "integer" } } }, "admin.upsertBudgetRequest": { "type": "object", "properties": { "amount": { "type": "number" }, "budget_key": { "$ref": "#/components/schemas/admin.budgetKeyRequest" }, "user_path": { "type": "string" } }, "required": [ "amount", "budget_key" ] }, "admin.upsertModelPricingOverrideRequest": { "type": "object", "properties": { "pricing": { "$ref": "#/components/schemas/pricingoverrides.Pricing" }, "selector": { "type": "string" } }, "required": [ "pricing", "selector" ] }, "admin.upsertVirtualModelRequest": { "type": "object", "properties": { "description": { "type": "string" }, "enabled": { "type": "boolean" }, "source": { "type": "string" }, "target_model": { "type": "string" }, "user_paths": { "type": "array", "items": { "type": "string", "maxLength": 1024 }, "maxItems": 100 } }, "required": [ "source" ] }, "anthropicapi.CountTokensResponse": { "type": "object", "properties": { "input_tokens": { "type": "integer" } } }, "anthropicapi.ErrorObject": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string" } } }, "anthropicapi.ErrorResponse": { "type": "object", "properties": { "error": { "$ref": "#/components/schemas/anthropicapi.ErrorObject" }, "type": { "type": "string" } } }, "anthropicapi.Message": { "type": "object", "properties": { "content": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/anthropicapi.ContentBlock" } } ] }, "role": { "type": "string" } } }, "anthropicapi.MessagesRequest": { "type": "object", "properties": { "max_tokens": { "type": "integer" }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/anthropicapi.Message" } }, "metadata": { "$ref": "#/components/schemas/anthropicapi.Metadata" }, "model": { "type": "string" }, "stop_sequences": { "type": "array", "items": { "type": "string" } }, "stream": { "type": "boolean" }, "system": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/anthropicapi.ContentBlock" } } ] }, "temperature": { "type": "number" }, "thinking": { "$ref": "#/components/schemas/anthropicapi.Thinking" }, "tool_choice": { "$ref": "#/components/schemas/anthropicapi.ToolChoice" }, "tools": { "type": "array", "items": { "$ref": "#/components/schemas/anthropicapi.Tool" } }, "top_k": { "type": "integer" }, "top_p": { "type": "number" } } }, "anthropicapi.MessagesResponse": { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/components/schemas/anthropicapi.ResponseContentBlock" } }, "id": { "type": "string" }, "model": { "type": "string" }, "role": { "type": "string" }, "stop_reason": { "type": "string" }, "stop_sequence": { "type": "string" }, "type": { "type": "string" }, "usage": { "$ref": "#/components/schemas/anthropicapi.Usage" } } }, "anthropicapi.Metadata": { "type": "object", "properties": { "user_id": { "type": "string" } } }, "anthropicapi.ResponseContentBlock": { "type": "object", "properties": { "id": { "type": "string" }, "input": { "type": "object", "additionalProperties": true }, "name": { "type": "string" }, "text": { "type": "string" }, "thinking": { "type": "string" }, "type": { "type": "string" } } }, "anthropicapi.Thinking": { "type": "object", "properties": { "budget_tokens": { "type": "integer" }, "type": { "type": "string" } } }, "anthropicapi.Tool": { "type": "object", "properties": { "description": { "type": "string" }, "input_schema": { "type": "object", "additionalProperties": true }, "name": { "type": "string" }, "type": { "type": "string" } } }, "anthropicapi.ToolChoice": { "type": "object", "properties": { "disable_parallel_tool_use": { "type": "boolean" }, "name": { "type": "string" }, "type": { "type": "string" } } }, "anthropicapi.Usage": { "type": "object", "properties": { "cache_creation_input_tokens": { "type": "integer" }, "cache_read_input_tokens": { "type": "integer" }, "input_tokens": { "type": "integer" }, "output_tokens": { "type": "integer" } } }, "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_code": { "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.WorkflowFeaturesSnapshot": { "type": "object", "properties": { "audit": { "type": "boolean" }, "budget": { "type": "boolean" }, "cache": { "type": "boolean" }, "fallback": { "type": "boolean" }, "guardrails": { "type": "boolean" }, "usage": { "type": "boolean" } } }, "budget.Settings": { "type": "object", "properties": { "daily_reset_hour": { "type": "integer" }, "daily_reset_minute": { "type": "integer" }, "monthly_reset_day": { "type": "integer" }, "monthly_reset_hour": { "type": "integer" }, "monthly_reset_minute": { "type": "integer" }, "updated_at": { "type": "string" }, "weekly_reset_hour": { "type": "integer" }, "weekly_reset_minute": { "type": "integer" }, "weekly_reset_weekday": { "type": "integer" } } }, "core.AudioSpeechRequest": { "type": "object", "properties": { "input": { "type": "string" }, "instructions": { "type": "string" }, "model": { "type": "string" }, "provider": { "description": "Provider is gateway routing metadata, stripped before dispatching upstream.", "type": "string" }, "response_format": { "type": "string" }, "speed": { "type": "number" }, "voice": { "type": "string" } }, "required": [ "input", "model", "voice" ] }, "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" }, "service_tier": { "type": "string" }, "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": {} } }, "top_p": { "type": "number" }, "user": { "type": "string" } } }, "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.Conversation": { "type": "object", "properties": { "created_at": { "type": "integer" }, "id": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } }, "object": { "description": "\"conversation\"", "type": "string" } } }, "core.ConversationCreateRequest": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object" } }, "metadata": { "type": "object", "additionalProperties": { "type": "string" } } } }, "core.ConversationDeleteResponse": { "type": "object", "properties": { "deleted": { "type": "boolean" }, "id": { "type": "string" }, "object": { "description": "\"conversation.deleted\"", "type": "string" } } }, "core.ConversationUpdateRequest": { "type": "object", "required": [ "metadata" ], "properties": { "metadata": { "type": "object", "additionalProperties": { "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" }, "pricing_sources": { "type": "object", "additionalProperties": { "type": "string" } }, "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" }, "up_to_tokens": { "type": "integer", "minimum": 1 } } }, "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\", \"high\", \"xhigh\", and \"max\".\n\"xhigh\" and \"max\" are supported by newer models such as Claude Opus 4.8;\nproviders downgrade unsupported levels to their nearest equivalent.", "type": "string" } } }, "core.ResponseCompactRequest": { "type": "object", "properties": { "context_management": {}, "conversation": { "description": "Conversation accepts either a conversation ID string or an object with id.", "oneOf": [ { "type": "string" }, { "$ref": "#/components/schemas/core.ResponsesConversationRef" } ] }, "include": { "type": "array", "items": { "type": "string" } }, "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" }, "previous_response_id": { "type": "string" }, "prompt": {}, "prompt_cache_retention": { "type": "string" }, "provider": { "description": "Gateway routing hint; stripped before upstream execution.", "type": "string" }, "reasoning": { "$ref": "#/components/schemas/core.Reasoning" }, "safety_identifier": { "type": "string" }, "service_tier": { "type": "string" }, "store": { "type": "boolean" }, "temperature": { "type": "number" }, "text": {}, "tool_choice": { "description": "string or object" }, "tools": { "type": "array", "items": { "type": "object", "additionalProperties": {} } }, "top_logprobs": { "type": "integer" }, "top_p": { "type": "number" }, "truncation": { "type": "string" }, "user": { "type": "string" } } }, "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": { "context_management": {}, "conversation": { "description": "Conversation accepts either a conversation ID string or an object with id.", "oneOf": [ { "type": "string" }, { "$ref": "#/components/schemas/core.ResponsesConversationRef" } ] }, "include": { "type": "array", "items": { "type": "string" } }, "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" }, "previous_response_id": { "type": "string" }, "prompt": {}, "prompt_cache_retention": { "type": "string" }, "provider": { "description": "Gateway routing hint; stripped before upstream execution.", "type": "string" }, "reasoning": { "$ref": "#/components/schemas/core.Reasoning" }, "safety_identifier": { "type": "string" }, "service_tier": { "type": "string" }, "store": { "type": "boolean" }, "temperature": { "type": "number" }, "text": {}, "tool_choice": { "description": "string or object" }, "tools": { "type": "array", "items": { "type": "object", "additionalProperties": {} } }, "top_logprobs": { "type": "integer" }, "top_p": { "type": "number" }, "truncation": { "type": "string" }, "user": { "type": "string" } } }, "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.ResponsesConversationRef": { "type": "object", "properties": { "id": { "type": "string" } }, "required": [ "id" ] }, "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": { "context_management": {}, "conversation": { "description": "Conversation accepts either a conversation ID string or an object with id.", "oneOf": [ { "type": "string" }, { "$ref": "#/components/schemas/core.ResponsesConversationRef" } ] }, "include": { "type": "array", "items": { "type": "string" } }, "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" }, "previous_response_id": { "type": "string" }, "prompt": {}, "prompt_cache_retention": { "type": "string" }, "provider": { "description": "Gateway routing hint; stripped before upstream execution.", "type": "string" }, "reasoning": { "$ref": "#/components/schemas/core.Reasoning" }, "safety_identifier": { "type": "string" }, "service_tier": { "type": "string" }, "store": { "type": "boolean" }, "stream": { "type": "boolean" }, "stream_options": { "$ref": "#/components/schemas/core.StreamOptions" }, "temperature": { "type": "number" }, "text": {}, "tool_choice": { "description": "string or object" }, "tools": { "type": "array", "items": { "type": "object", "additionalProperties": {} } }, "top_logprobs": { "type": "integer" }, "top_p": { "type": "number" }, "truncation": { "type": "string" }, "user": { "type": "string" } } }, "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" } } }, "pricingoverrides.Pricing": { "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" }, "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/pricingoverrides.PricingTier" } } }, "minProperties": 1 }, "pricingoverrides.PricingTier": { "type": "object", "properties": { "input_per_mtok": { "type": "number" }, "output_per_mtok": { "type": "number" }, "up_to_mtok": { "type": "number" }, "up_to_tokens": { "type": "integer", "minimum": 1 } } }, "pricingoverrides.ScopeKind": { "type": "string", "enum": [ "global", "model", "provider", "provider_model" ], "x-enum-varnames": [ "PricingScopeGlobal", "PricingScopeModel", "PricingScopeProvider", "PricingScopeProviderModel" ] }, "pricingoverrides.View": { "type": "object", "properties": { "created_at": { "type": "string" }, "model": { "type": "string" }, "pricing": { "$ref": "#/components/schemas/pricingoverrides.Pricing" }, "provider_name": { "type": "string" }, "scope_kind": { "$ref": "#/components/schemas/pricingoverrides.ScopeKind" }, "selector": { "type": "string" }, "updated_at": { "type": "string" } } }, "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.RecalculatePricingResult": { "type": "object", "properties": { "matched": { "type": "integer" }, "recalculated": { "type": "integer" }, "status": { "type": "string" }, "with_pricing": { "type": "integer" }, "without_pricing": { "type": "integer" } } }, "usage.RequestUsageSummary": { "type": "object", "properties": { "cache_write_input_tokens": { "type": "integer" }, "cached_input_ratio": { "type": "number" }, "cached_input_tokens": { "type": "integer" }, "entries": { "type": "integer" }, "estimated_cached_characters": { "type": "integer" }, "input_tokens": { "type": "integer" }, "output_tokens": { "type": "integer" }, "total_tokens": { "type": "integer" }, "uncached_input_tokens": { "type": "integer" } } }, "usage.UsageLogEntry": { "type": "object", "properties": { "cache_type": { "type": "string" }, "cache_write_input_tokens": { "type": "integer" }, "cached_input_ratio": { "type": "number" }, "cached_input_tokens": { "type": "integer" }, "cost_source": { "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" }, "uncached_input_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" } } }, "virtualmodels.Target": { "type": "object", "properties": { "model": { "type": "string" }, "provider": { "type": "string" }, "weight": { "description": "inert in v1 (load balancing)", "type": "number" } } }, "virtualmodels.View": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "enabled": { "type": "boolean" }, "kind": { "type": "string" }, "model": { "type": "string" }, "provider_name": { "type": "string" }, "provider_type": { "type": "string" }, "resolved_model": { "type": "string" }, "scope_kind": { "type": "string" }, "source": { "type": "string" }, "strategy": { "type": "string" }, "targets": { "type": "array", "items": { "$ref": "#/components/schemas/virtualmodels.Target" } }, "updated_at": { "type": "string" }, "user_paths": { "type": "array", "items": { "type": "string" } }, "valid": { "type": "boolean" } } }, "virtualmodels.VirtualModel": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "enabled": { "type": "boolean" }, "model": { "type": "string" }, "provider_name": { "type": "string" }, "source": { "type": "string" }, "strategy": { "description": "inert in v1", "type": "string" }, "targets": { "type": "array", "items": { "$ref": "#/components/schemas/virtualmodels.Target" } }, "updated_at": { "type": "string" }, "user_paths": { "type": "array", "items": { "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" } } }, "anthropicapi.ContentBlock": { "type": "object", "properties": { "content": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/anthropicapi.ContentBlock" } } ] }, "id": { "type": "string" }, "input": { "type": "object", "additionalProperties": true }, "is_error": { "type": "boolean" }, "name": { "type": "string" }, "source": { "oneOf": [ { "type": "string" }, { "type": "object", "additionalProperties": true } ] }, "text": { "type": "string" }, "thinking": { "type": "string" }, "tool_use_id": { "type": "string" }, "type": { "type": "string" } } }, "anthropicapi.SSEMessageStartEvent": { "type": "object", "required": [ "message", "type" ], "properties": { "type": { "type": "string", "enum": [ "message_start" ] }, "message": { "$ref": "#/components/schemas/anthropicapi.MessagesResponse" } } }, "anthropicapi.SSEContentBlockStartEvent": { "type": "object", "required": [ "content_block", "index", "type" ], "properties": { "type": { "type": "string", "enum": [ "content_block_start" ] }, "index": { "type": "integer" }, "content_block": { "$ref": "#/components/schemas/anthropicapi.ResponseContentBlock" } } }, "anthropicapi.SSEContentBlockDeltaEvent": { "type": "object", "required": [ "delta", "index", "type" ], "properties": { "type": { "type": "string", "enum": [ "content_block_delta" ] }, "index": { "type": "integer" }, "delta": { "type": "object", "additionalProperties": true } } }, "anthropicapi.SSEContentBlockStopEvent": { "type": "object", "required": [ "index", "type" ], "properties": { "type": { "type": "string", "enum": [ "content_block_stop" ] }, "index": { "type": "integer" } } }, "anthropicapi.SSEMessageDeltaEvent": { "type": "object", "required": [ "delta", "type" ], "properties": { "type": { "type": "string", "enum": [ "message_delta" ] }, "delta": { "type": "object", "additionalProperties": true }, "usage": { "$ref": "#/components/schemas/anthropicapi.Usage" } } }, "anthropicapi.SSEMessageStopEvent": { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "message_stop" ] } } }, "anthropicapi.SSEPingEvent": { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "ping" ] } } }, "anthropicapi.SSEErrorEvent": { "type": "object", "required": [ "error", "type" ], "properties": { "type": { "type": "string", "enum": [ "error" ] }, "error": { "$ref": "#/components/schemas/anthropicapi.ErrorObject" } } }, "anthropicapi.SSEUnknownEvent": { "description": "Fallback for future Anthropic streaming event payloads.", "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string" } }, "additionalProperties": true }, "anthropicapi.SSEEventFrame": { "description": "One server-sent event frame emitted by streaming /v1/messages. On the wire each frame is sent as event: and data: . Unknown event payloads are accepted for forward compatibility.", "anyOf": [ { "$ref": "#/components/schemas/anthropicapi.SSEMessageStartEvent" }, { "$ref": "#/components/schemas/anthropicapi.SSEContentBlockStartEvent" }, { "$ref": "#/components/schemas/anthropicapi.SSEContentBlockDeltaEvent" }, { "$ref": "#/components/schemas/anthropicapi.SSEContentBlockStopEvent" }, { "$ref": "#/components/schemas/anthropicapi.SSEMessageDeltaEvent" }, { "$ref": "#/components/schemas/anthropicapi.SSEMessageStopEvent" }, { "$ref": "#/components/schemas/anthropicapi.SSEPingEvent" }, { "$ref": "#/components/schemas/anthropicapi.SSEErrorEvent" }, { "$ref": "#/components/schemas/anthropicapi.SSEUnknownEvent" } ] } } } }