{"openapi":"3.1.0","info":{"title":"API Overview","version":"1.0.0"},"paths":{"/models":{"get":{"operationId":"models_list","summary":"List public models or fetch a single model","description":"List all available public models. Supports filtering by provider or vendor, or fetching a single model by query parameter with ?model=<provider/model-name>. Results are paginated: a page holds at most 500 models, and larger catalogs are read by following next_cursor until has_more is false.","tags":["models"],"parameters":[{"name":"model","in":"query","description":"Fetch a single model by ID in format 'provider/model-name'","required":false,"schema":{"type":"string"}},{"name":"provider","in":"query","description":"Filter by provider","required":false,"schema":{"type":"string"}},{"name":"vendor","in":"query","description":"Filter by vendor","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Pagination cursor. Pass the next_cursor returned by the previous page to fetch the models that follow it. Omit on the first request.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Models per page. Defaults to 50, minimum 1, maximum 500. A limit above 500 is rejected with 422; page through the rest with next_cursor rather than raising it.","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":50}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models_list_Response_200"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/vendors":{"get":{"operationId":"vendors_list","summary":"List vendors","description":"List execution vendors and the models they currently serve. Paginated the same way as /models: a page holds at most 500 vendors, and next_cursor walks the rest.","tags":["vendors"],"parameters":[{"name":"cursor","in":"query","description":"Pagination cursor. Pass the next_cursor returned by the previous page to fetch the vendors that follow it. Omit on the first request.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Vendors per page. Defaults to 50, minimum 1, maximum 500. A limit above 500 is rejected with 422; page through the rest with next_cursor rather than raising it.","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":50}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicVendorsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/vendors/{vendor_id}":{"get":{"operationId":"vendors_retrieve","summary":"Fetch a single vendor by ID","description":"Fetch a single execution vendor by ID.","tags":["vendors"],"parameters":[{"name":"vendor_id","in":"path","description":"Vendor slug (e.g. `openai`, `anthropic`, `bedrock`, `azure`). Call `GET /v1/vendors` to list available slugs.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicVendor"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/responses":{"post":{"operationId":"responses_create","summary":"Create response","description":"Create an LLM response in Gateway's native Responses shape. This is not OpenAI's\nResponses API: clients that implement it (the OpenAI SDK's `client.responses.*`,\nCodex) should use `POST /openai/responses`, or send `X-Merge-Wire-Format: openai`\non this endpoint to receive the OpenAI shape. Codex is detected by its `originator`\nheader and served the OpenAI shape automatically.\n\nOpenAI-only request fields with a native equivalent are translated\n(`instructions` → leading system message, `reasoning.effort` → reasoning effort,\n`text.format` → `response_format`, `max_output_tokens` → `max_tokens`); any other\nOpenAI-only field is ignored and reported in `warnings` with code\n`openai_fields_ignored`.\n","tags":["responses"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRequest"}}}},"security":[{"BearerAuth":[]}]}},"/embeddings":{"post":{"operationId":"embeddings_create","summary":"Create Embedding","description":"Create text embeddings.\n\nReturns vector representations of the input text.","tags":["embeddings"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRequestSchema"}}}},"security":[{"BearerAuth":[]}]}},"/chat/completions":{"post":{"operationId":"chatCompletions_create","summary":"Create a chat completion","description":"OpenAI-compatible chat completions endpoint. Accepts the OpenAI chat completions request shape and routes to any catalogued model.\n\nAlso served at `/v1/openai/chat/completions`; both paths accept the same requests. This bare path matches the OpenAI SDK's default base URL shape, so pointing the SDK at `https://api-gateway.merge.dev/v1` works with no other changes.","tags":["chatCompletions"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIChatCompletionRequest"}}}},"security":[{"BearerAuth":[]}]}},"/messages":{"post":{"operationId":"messages_create","summary":"Create a message","description":"Anthropic-compatible Messages endpoint. Accepts the Anthropic Messages request shape and routes to any catalogued model.\n\nAlso served at `/v1/anthropic/v1/messages`; both paths accept the same requests. This bare path is what the Anthropic SDK builds from a bare-host base URL, so pointing the SDK at `https://api-gateway.merge.dev` works with no other changes.","tags":["messages"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicMessageRequest"}}}},"security":[{"BearerAuth":[]}]}},"/messages/count_tokens":{"post":{"operationId":"messages_countTokens","summary":"Count tokens in a message","description":"Counts the input tokens a Messages request would consume, without calling a model.\n\nAlso served at `/v1/anthropic/v1/messages/count_tokens`; both paths accept the same requests.","tags":["messages"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicCountTokensResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicCountTokensRequest"}}}},"security":[{"BearerAuth":[]}]}},"/routing/policies":{"get":{"operationId":"routing_listPolicies","summary":"List Routing Policies","description":"List routing policies available to the current user.\n\nReturns both org-specific policies and the managed (simulator) policy.","tags":["routing"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routing_listPolicies_Response_200"}}}}},"security":[{"BearerAuth":[]}]}},"/routing/strategies":{"get":{"operationId":"routing_listStrategies","summary":"List Routing Strategies","description":"List all available routing strategies with descriptions.","tags":["routing"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routing_listStrategies_Response_200"}}}}},"security":[{"BearerAuth":[]}]}},"/tags":{"get":{"operationId":"tags_list","summary":"List Tags","description":"List all available tags.\n\nReturns tags available for the authenticated organization,\nincluding both global and org-scoped tags.","tags":["tags"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagsListResponse"}}}}},"security":[{"BearerAuth":[]}]}}},"tags":[{"name":"models"},{"name":"vendors"},{"name":"responses"},{"name":"embeddings"},{"name":"chatCompletions"},{"name":"messages"},{"name":"routing"},{"name":"tags"}],"servers":[{"url":"https://api-gateway.merge.dev/v1","description":"Production"}],"components":{"schemas":{"PublicVendorModelInfoAvailabilityStatus":{"type":"string","enum":["available","deprecated"],"title":"PublicVendorModelInfoAvailabilityStatus"},"PublicVendorModelCapabilitiesInputItems":{"type":"string","enum":["text","image","document","embedding"],"title":"PublicVendorModelCapabilitiesInputItems"},"PublicVendorModelCapabilitiesOutputItems":{"type":"string","enum":["text","tool_use","embedding"],"title":"PublicVendorModelCapabilitiesOutputItems"},"PublicVendorModelCapabilities":{"type":"object","properties":{"input":{"type":"array","items":{"$ref":"#/components/schemas/PublicVendorModelCapabilitiesInputItems"}},"output":{"type":"array","items":{"$ref":"#/components/schemas/PublicVendorModelCapabilitiesOutputItems"}},"supports_tool_calling":{"type":"boolean"},"supports_tool_choice":{"type":"boolean","default":false},"supports_structured_outputs":{"type":"boolean"},"streaming":{"type":"boolean"}},"required":["input","output","supports_tool_calling","supports_tool_choice","supports_structured_outputs","streaming"],"description":"Per-route capability flags. Lists supported input/output content types (text, image, document, tool_use) and feature support (tool calling, tool choice, structured outputs, streaming).","title":"PublicVendorModelCapabilities"},"TierPricing":{"type":"object","properties":{"input_per_million":{"type":"number","format":"double"},"output_per_million":{"type":"number","format":"double"}},"required":["input_per_million","output_per_million"],"description":"Per-token pricing for a single service tier.","title":"TierPricing"},"ModelPricing":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"],"default":"USD"},"input_per_million":{"type":"number","format":"double"},"output_per_million":{"type":"number","format":"double"},"flex":{"oneOf":[{"$ref":"#/components/schemas/TierPricing"},{"type":"null"}],"description":"Per-token pricing for the flex tier on this route, or null if the route does not offer it."},"priority":{"oneOf":[{"$ref":"#/components/schemas/TierPricing"},{"type":"null"}],"description":"Per-token pricing for the priority tier on this route, or null if the route does not offer it."}},"required":["input_per_million","output_per_million"],"description":"Pricing information for a model.","title":"ModelPricing"},"PublicVendorModelInfo":{"type":"object","properties":{"launch_date":{"type":["string","null"]},"context_window":{"type":"integer"},"max_output_tokens":{"type":"integer"},"availability_status":{"$ref":"#/components/schemas/PublicVendorModelInfoAvailabilityStatus"},"capabilities":{"$ref":"#/components/schemas/PublicVendorModelCapabilities"},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"service_tiers":{"type":"array","items":{"type":"string"},"default":["standard"],"description":"Service tiers this route supports (always includes 'standard'). Presence of 'flex' means the route is priced for flex."}},"required":["context_window","max_output_tokens","availability_status","capabilities","pricing"],"description":"Per-vendor execution metadata for a model - context window, max output tokens, capabilities, pricing, and availability. A single `PublicModel` carries one of these for each vendor that can execute it.","title":"PublicVendorModelInfo"},"PublicModelAvailabilityStatus":{"type":"string","enum":["available","deprecated"],"title":"PublicModelAvailabilityStatus"},"PublicModel":{"type":"object","properties":{"model":{"type":"string","description":"Model ID in format 'provider/model-name'"},"provider":{"type":"string"},"display_name":{"type":"string"},"vendors":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PublicVendorModelInfo"}},"availability_status":{"$ref":"#/components/schemas/PublicModelAvailabilityStatus"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["model","provider","display_name","vendors","availability_status"],"description":"A canonical model in Merge Gateway's catalog. Identified by `model` (fully-qualified provider/model ID) and exposes the set of `vendors` that can execute it, each with its own capabilities, context window, pricing, and ZDR flag.","title":"PublicModel"},"PublicModelsListResponse":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"default":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicModel"}},"has_more":{"type":"boolean","default":false,"description":"True when more models remain beyond this page. Keep paging while this is true."},"next_cursor":{"type":["string","null"],"description":"Cursor to pass as ?cursor= to fetch the next page. Null on the last page."}},"required":["data"],"description":"Paginated response wrapper for `GET /v1/models`. Use the `next_cursor` field to page through results when `has_more` is true.","title":"PublicModelsListResponse"},"Models_list_Response_200":{"oneOf":[{"$ref":"#/components/schemas/PublicModelsListResponse"},{"$ref":"#/components/schemas/PublicModel"}],"title":"Models_list_Response_200"},"ValidationErrorLocItems":{"oneOf":[{"type":"string"},{"type":"integer"}],"title":"ValidationErrorLocItems"},"ValidationErrorCtx":{"type":"object","properties":{},"title":"ValidationErrorCtx"},"ValidationError":{"type":"object","properties":{"loc":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorLocItems"}},"msg":{"type":"string"},"type":{"type":"string"},"input":{"description":"Any type"},"ctx":{"$ref":"#/components/schemas/ValidationErrorCtx"}},"required":["loc","msg","type"],"description":"Single field-level validation error. `loc` is the JSON path to the offending field, `msg` is a human-readable explanation, and `type` is a stable machine-readable error code.","title":"ValidationError"},"HTTPValidationError":{"type":"object","properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Standard FastAPI validation error wrapper. Returned with HTTP 422 when the request body or query parameters fail Pydantic validation.","title":"HTTPValidationError"},"PublicVendorAvailabilityStatus":{"type":"string","enum":["active","degraded","unavailable"],"title":"PublicVendorAvailabilityStatus"},"PublicVendor":{"type":"object","properties":{"vendor":{"type":"string"},"name":{"type":"string"},"models":{"type":"array","items":{"type":"string"}},"supports_zdr":{"type":"boolean"},"supports_byok":{"type":"boolean"},"availability_status":{"$ref":"#/components/schemas/PublicVendorAvailabilityStatus"}},"required":["vendor","name","models","supports_zdr","supports_byok","availability_status"],"description":"An execution host that Merge Gateway can route to (e.g. `openai`, `bedrock`, `azure`). Lists the model IDs the vendor can serve plus its ZDR and BYOK support.","title":"PublicVendor"},"PublicVendorsListResponse":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"default":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicVendor"}},"has_more":{"type":"boolean","default":false,"description":"True when more vendors remain beyond this page. Keep paging while this is true."},"next_cursor":{"type":["string","null"],"description":"Cursor to pass as ?cursor= to fetch the next page. Null on the last page."}},"required":["data"],"description":"Paginated response wrapper for `GET /v1/vendors`. Use the `next_cursor` field to page through results when `has_more` is true.","title":"PublicVendorsListResponse"},"ResponseRequestInputItemsDiscriminatorMappingMessageRole":{"type":"string","enum":["system","user","assistant","developer"],"description":"The role of the message author. `developer` is accepted as an alias for `system` (matching the OpenAI Responses API) and is treated as `system`","title":"ResponseRequestInputItemsDiscriminatorMappingMessageRole"},"ImageContentSourceType":{"type":"string","enum":["base64","url"],"default":"base64","title":"ImageContentSourceType"},"DocumentContentSourceType":{"type":"string","enum":["base64","url"],"default":"base64","title":"DocumentContentSourceType"},"ResponseRequestInputItemsDiscriminatorMappingMessageContentOneOf1Items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"},"text":{"type":"string"}},"required":["type","text"],"description":"Text content block."},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"],"description":"Discriminator value: image_url"},"url":{"type":"string"}},"required":["type","url"],"description":"Image URL content block for vision models."},{"type":"object","properties":{"type":{"type":"string","enum":["image"],"default":"image"},"source_type":{"$ref":"#/components/schemas/ImageContentSourceType","default":"base64"},"media_type":{"type":"string","description":"e.g. 'image/png', 'image/jpeg'"},"data":{"type":"string","description":"Base64-encoded image data or URL"}},"required":["type","media_type","data"],"description":"Image content block with explicit source type."},{"type":"object","properties":{"type":{"type":"string","enum":["document"],"default":"document"},"source_type":{"$ref":"#/components/schemas/DocumentContentSourceType","default":"base64"},"media_type":{"type":"string","description":"e.g. 'application/pdf'"},"data":{"type":"string","description":"Base64-encoded content or URL"}},"required":["type","media_type","data"],"description":"Document content block (PDF, etc.) for document-understanding models."},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"],"description":"Discriminator value: tool_use"},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["type","id","name","input"],"description":"Tool use content block (in assistant output)."}],"discriminator":{"propertyName":"type"},"title":"ResponseRequestInputItemsDiscriminatorMappingMessageContentOneOf1Items"},"ResponseRequestInputItemsDiscriminatorMappingMessageContent1":{"type":"array","items":{"$ref":"#/components/schemas/ResponseRequestInputItemsDiscriminatorMappingMessageContentOneOf1Items"},"title":"ResponseRequestInputItemsDiscriminatorMappingMessageContent1"},"ResponseRequestInputItemsDiscriminatorMappingMessageContent":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ResponseRequestInputItemsDiscriminatorMappingMessageContent1"}],"title":"ResponseRequestInputItemsDiscriminatorMappingMessageContent"},"ToolResultInputContentOneOf1Items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"},"text":{"type":"string"}},"required":["type","text"],"description":"Text content block."},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"],"description":"Discriminator value: image_url"},"url":{"type":"string"}},"required":["type","url"],"description":"Image URL content block for vision models."},{"type":"object","properties":{"type":{"type":"string","enum":["image"],"default":"image"},"source_type":{"$ref":"#/components/schemas/ImageContentSourceType","default":"base64"},"media_type":{"type":"string","description":"e.g. 'image/png', 'image/jpeg'"},"data":{"type":"string","description":"Base64-encoded image data or URL"}},"required":["type","media_type","data"],"description":"Image content block with explicit source type."},{"type":"object","properties":{"type":{"type":"string","enum":["document"],"default":"document"},"source_type":{"$ref":"#/components/schemas/DocumentContentSourceType","default":"base64"},"media_type":{"type":"string","description":"e.g. 'application/pdf'"},"data":{"type":"string","description":"Base64-encoded content or URL"}},"required":["type","media_type","data"],"description":"Document content block (PDF, etc.) for document-understanding models."},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"],"description":"Discriminator value: tool_use"},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["type","id","name","input"],"description":"Tool use content block (in assistant output)."}],"discriminator":{"propertyName":"type"},"title":"ToolResultInputContentOneOf1Items"},"ToolResultInputContent1":{"type":"array","items":{"$ref":"#/components/schemas/ToolResultInputContentOneOf1Items"},"title":"ToolResultInputContent1"},"ToolResultInputContent":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ToolResultInputContent1"}],"title":"ToolResultInputContent"},"ResponseRequestInputItems":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"],"description":"Discriminator value: message"},"role":{"$ref":"#/components/schemas/ResponseRequestInputItemsDiscriminatorMappingMessageRole","description":"The role of the message author. `developer` is accepted as an alias for `system` (matching the OpenAI Responses API) and is treated as `system`"},"content":{"$ref":"#/components/schemas/ResponseRequestInputItemsDiscriminatorMappingMessageContent"}},"required":["type","role","content"],"description":"A message in the conversation."},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"],"default":"tool_result"},"tool_use_id":{"type":"string"},"content":{"$ref":"#/components/schemas/ToolResultInputContent"}},"required":["type","tool_use_id","content"],"description":"Result from a tool call, sent back to continue the conversation."}],"discriminator":{"propertyName":"type"},"title":"ResponseRequestInputItems"},"FunctionTool":{"type":"object","properties":{"type":{"type":"string","enum":["function"],"default":"function"},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["name","description","parameters"],"description":"A function tool that the model can call.","title":"FunctionTool"},"ResponseRequestToolChoice":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"description":"Any type"}}],"description":"Tool choice policy: 'auto', 'none', 'required', or {'type': 'function', 'function': {'name': '...'}}","title":"ResponseRequestToolChoice"},"ResponseFormatJson":{"type":"object","properties":{"type":{"type":"string","enum":["json_object"],"default":"json_object"}},"description":"JSON response format configuration.","title":"ResponseFormatJson"},"JsonSchemaSpec":{"type":"object","properties":{"name":{"type":"string","default":"response"},"description":{"type":["string","null"]},"schema":{"type":"object","additionalProperties":{"description":"Any type"}},"strict":{"type":["boolean","null"]}},"required":["schema"],"description":"The json_schema wrapper for structured output.\n\n``strict`` is tri-state: ``None`` means the caller didn't specify it, and it\nis omitted on the wire (``model_dump(exclude_none=True)``) so the provider's\nown default applies — the gateway never injects a value. ``extra=\"allow\"``\nkeeps unknown wrapper keys flowing through to the provider.","title":"JsonSchemaSpec"},"ResponseFormatJsonSchema":{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"],"default":"json_schema"},"json_schema":{"$ref":"#/components/schemas/JsonSchemaSpec"}},"required":["json_schema"],"description":"JSON Schema response format configuration (for structured output).","title":"ResponseFormatJsonSchema"},"ResponseRequestResponseFormat":{"oneOf":[{"$ref":"#/components/schemas/ResponseFormatJson"},{"$ref":"#/components/schemas/ResponseFormatJsonSchema"}],"description":"Response format (json_object or json_schema structured output)","title":"ResponseRequestResponseFormat"},"TagInput":{"type":"object","properties":{"key":{"type":"string","description":"Tag key"},"value":{"type":"string","description":"Tag value"}},"required":["key","value"],"description":"Tag key-value pair for use in requests.","title":"TagInput"},"ResponseRequestServiceTier":{"type":"string","enum":["standard","flex","priority"],"description":"Processing tier. 'flex' = discounted best-effort (slower, may be throttled); 'priority' = premium low-latency (not currently priced on any route, so it fails closed). Omit or 'standard' for normal processing. Allowed only on routes that price the requested tier, otherwise the request fails closed with 400.","title":"ResponseRequestServiceTier"},"ResponseRequest":{"type":"object","properties":{"model":{"type":["string","null"],"description":"Model ID in format 'provider/model-name'. Optional if a routing policy is configured."},"customer":{"type":["string","null"],"description":"Embedded Routing: the Customer id to scope this request to, as a Merge UUID (the `id` returned when the customer was created, not your `origin_id`). Applies that customer's routing policy, provider keys, budget, and usage attribution. A non-UUID value returns 422; a UUID that matches no customer returns 404 (`customer_not_found`). Requires embedded routing enabled for your organization."},"routing_policy_id":{"type":["string","null"],"description":"Embedded Routing: route this request with a specific customer routing policy instead of the customer's default. Requires customer."},"input":{"type":"array","items":{"$ref":"#/components/schemas/ResponseRequestInputItems"},"description":"Conversation history"},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/FunctionTool"},"description":"Available tools"},"tool_choice":{"oneOf":[{"$ref":"#/components/schemas/ResponseRequestToolChoice"},{"type":"null"}],"description":"Tool choice policy: 'auto', 'none', 'required', or {'type': 'function', 'function': {'name': '...'}}"},"max_tokens":{"type":["integer","null"],"description":"Maximum tokens to generate"},"temperature":{"type":["number","null"],"format":"double","minimum":0,"maximum":2,"description":"Sampling temperature"},"top_p":{"type":["number","null"],"format":"double","minimum":0,"maximum":1,"description":"Nucleus sampling parameter"},"stop":{"type":["array","null"],"items":{"type":"string"},"description":"Stop sequences"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/ResponseRequestResponseFormat"},{"type":"null"}],"description":"Response format (json_object or json_schema structured output)"},"stream":{"type":"boolean","default":false,"description":"Whether to stream the response"},"tags":{"type":["array","null"],"items":{"$ref":"#/components/schemas/TagInput"},"description":"Tags to attach to this request for categorization (key-value pairs)"},"project_id":{"type":["string","null"],"description":"Optional project ID (UUID) to associate with this request"},"include_routing_metadata":{"type":"boolean","default":false,"description":"Include detailed routing metadata in response"},"include_guardrails_metadata":{"type":"boolean","default":false,"description":"Include prompt-injection protection and DLP results for this request in a top-level `guardrails` object. In prompt-injection alert mode this also runs the direct scan on the request path (bounded by the alert-mode budget) so the score is available in the body; requests without the flag are unaffected."},"vendor":{"type":["string","null"],"description":"Restrict routing to a specific vendor (hosting platform)"},"vendors":{"type":["array","null"],"items":{"type":"string"},"description":"Ordered list of acceptable vendors. First available wins."},"service_tier":{"oneOf":[{"$ref":"#/components/schemas/ResponseRequestServiceTier"},{"type":"null"}],"description":"Processing tier. 'flex' = discounted best-effort (slower, may be throttled); 'priority' = premium low-latency (not currently priced on any route, so it fails closed). Omit or 'standard' for normal processing. Allowed only on routes that price the requested tier, otherwise the request fails closed with 400."},"service_tier_fallback":{"type":"boolean","default":false,"description":"If the provider throttles the requested tier (429/503), retry once at the standard tier, billed at standard rates. The response service_tier shows the tier that actually served."}},"required":["input"],"description":"Request body for POST /v1/responses.","title":"ResponseRequest"},"OutputMessageFinishReason":{"type":"string","enum":["stop","max_tokens","tool_use","content_filter"],"title":"OutputMessageFinishReason"},"OutputMessageContentItems":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"},"text":{"type":"string"}},"required":["type","text"],"description":"Text content block."},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"],"description":"Discriminator value: image_url"},"url":{"type":"string"}},"required":["type","url"],"description":"Image URL content block for vision models."},{"type":"object","properties":{"type":{"type":"string","enum":["image"],"default":"image"},"source_type":{"$ref":"#/components/schemas/ImageContentSourceType","default":"base64"},"media_type":{"type":"string","description":"e.g. 'image/png', 'image/jpeg'"},"data":{"type":"string","description":"Base64-encoded image data or URL"}},"required":["type","media_type","data"],"description":"Image content block with explicit source type."},{"type":"object","properties":{"type":{"type":"string","enum":["document"],"default":"document"},"source_type":{"$ref":"#/components/schemas/DocumentContentSourceType","default":"base64"},"media_type":{"type":"string","description":"e.g. 'application/pdf'"},"data":{"type":"string","description":"Base64-encoded content or URL"}},"required":["type","media_type","data"],"description":"Document content block (PDF, etc.) for document-understanding models."},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"],"description":"Discriminator value: tool_use"},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["type","id","name","input"],"description":"Tool use content block (in assistant output)."}],"discriminator":{"propertyName":"type"},"title":"OutputMessageContentItems"},"OutputMessage":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message"],"default":"message"},"role":{"type":"string","enum":["assistant"],"default":"assistant"},"finish_reason":{"oneOf":[{"$ref":"#/components/schemas/OutputMessageFinishReason"},{"type":"null"}]},"content":{"type":"array","items":{"$ref":"#/components/schemas/OutputMessageContentItems"}}},"required":["id","content"],"description":"An output message from the assistant.","title":"OutputMessage"},"Usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"cost":{"type":["number","null"],"format":"double","description":"Cost of this call in USD, computed by Gateway. Null when the route that served the request has no pricing on file, so cost trackers record no spend rather than a false zero."}},"required":["input_tokens","output_tokens","total_tokens"],"description":"Token usage statistics.","title":"Usage"},"RoutingLatency":{"type":"object","properties":{"policy_lookup_ms":{"type":"number","format":"double","default":0},"routing_decision_ms":{"type":"number","format":"double","default":0},"llm_call_ms":{"type":"number","format":"double","default":0},"total_ms":{"type":"number","format":"double","default":0}},"description":"Latency breakdown for routing steps.","title":"RoutingLatency"},"RoutingMetadata":{"type":"object","properties":{"policy_id":{"type":["string","null"]},"policy_name":{"type":["string","null"]},"strategy":{"type":["string","null"]},"intelligent_routing_used":{"type":"boolean","default":false},"complexity_score":{"type":["number","null"],"format":"double","description":"ML-computed prompt complexity score (0-1)"},"adjusted_score":{"type":["number","null"],"format":"double","description":"Strategy-adjusted complexity score"},"selected_tier":{"type":["integer","null"]},"total_tiers":{"type":["integer","null"]},"routing_reason":{"type":["string","null"],"description":"Human-readable explanation of the routing decision"},"model_requested":{"type":["string","null"]},"model_used":{"type":["string","null"],"description":"The actual model selected by routing"},"cost_usd":{"type":["number","null"],"format":"double","description":"Estimated provider spend for the request in USD, at the list price of the route that served it, whoever paid the provider. On a BYOK key this is what the tokens cost on your own provider account. Null when the route has no pricing on file."},"merge_fee_usd":{"type":["number","null"],"format":"double","description":"Merge's fee on this request in USD, at the markup rate that applies to your organization (the plan rate, or 0 when no markup applies). cost_usd + merge_fee_usd is the request's cost with markup on every key type. Excludes server-tool charges such as web search. Null when cost_usd is null."},"latency":{"oneOf":[{"$ref":"#/components/schemas/RoutingLatency"},{"type":"null"}]}},"description":"Metadata about how the request was routed.","title":"RoutingMetadata"},"PromptInjectionMetadataMode":{"type":"string","enum":["off","alert","block"],"description":"The effective prompt-injection mode at evaluation time.","title":"PromptInjectionMetadataMode"},"PITriggeringSegment":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":["string","null"]},"score":{"type":["number","null"],"format":"double"}},"required":["id"],"description":"The segment that produced the decisive score.","title":"PITriggeringSegment"},"PISegmentScore":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","description":"`system_message`, `user_message`, `assistant_message`, `tool_result`, `tool_definition`, ..."},"trusted":{"type":"boolean"},"score":{"type":["number","null"],"format":"double","description":"Maximum Tier 1 score for the segment; null when it was not scored."},"lexical_hit":{"type":"boolean","default":false,"description":"True when the pattern-based detector fired on this segment."}},"required":["id","kind","trusted"],"description":"Direct-injection score for one scanned input segment. Identified by id and kind; never carries the text.","title":"PISegmentScore"},"PiIndirectMetadataMode":{"type":"string","enum":["off","alert","block"],"title":"PiIndirectMetadataMode"},"PIIndirectMetadata":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/PiIndirectMetadataMode"},"action":{"type":["string","null"],"description":"`observe` or `block`."},"blocked_reason":{"type":["string","null"]},"would_block":{"type":"boolean","default":false,"description":"The block rule was satisfied; in alert mode this is what a block-mode org would have done."},"tainted":{"type":"boolean","default":false,"description":"Untrusted content (tool results, retrieved documents, web search) was present."},"taint_sources":{"type":"array","items":{"type":"string"},"description":"`client_tool_result`, `web_search`, `fusion_candidate`."},"tier2a_score":{"type":["number","null"],"format":"double","description":"Heuristic detector confidence."},"tier2b_score":{"type":["number","null"],"format":"double","description":"Embedding similarity to known attacks."},"fired_signals":{"type":"array","items":{"type":"string"}},"structural_violation":{"type":"boolean","default":false,"description":"A model-emitted tool call carried an exfiltration-shaped argument."},"flagged_tools":{"type":"array","items":{"type":"string"}}},"required":["mode"],"description":"Indirect-injection signals for the request.","title":"PIIndirectMetadata"},"PIOutputMetadata":{"type":"object","properties":{"credential_findings":{"type":"integer","default":0},"redacted":{"type":"boolean","default":false}},"description":"Output-side credential-leak scan of the response text (non-streaming only).","title":"PIOutputMetadata"},"PromptInjectionMetadata":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/PromptInjectionMetadataMode","description":"The effective prompt-injection mode at evaluation time."},"action":{"type":["string","null"],"description":"`observe` or `block`. Null when no direct scan ran."},"blocked_reason":{"type":["string","null"],"description":"Why the request was blocked, e.g. `pi_block_threshold`."},"skipped_reason":{"type":["string","null"],"description":"Why no Tier 1 score is present: `alert_timeout`, `block_timeout`, `saturated` (alert mode: every scan slot on the serving instance was busy, so the scan was skipped rather than queued), `no_segments`, `sidecar_error`, `sidecar_unavailable`, `deferred`."},"score":{"type":["number","null"],"format":"double","description":"Maximum direct-injection (Tier 1) score across scanned segments, in [0, 1]."},"block_threshold":{"type":["number","null"],"format":"double","description":"The effective `pi_block_threshold` the score is compared against."},"model_version":{"type":["string","null"],"description":"Classifier version that produced the decisive score."},"triggering_segment":{"oneOf":[{"$ref":"#/components/schemas/PITriggeringSegment"},{"type":"null"}],"description":"The segment behind the decisive score: the maximum in alert mode, the first over threshold in block mode."},"segments":{"type":"array","items":{"$ref":"#/components/schemas/PISegmentScore"},"description":"Every input segment the scanner saw, by id and kind, with its score when scored."},"allowlist_skipped_segment_ids":{"type":"array","items":{"type":"string"},"description":"Segments skipped because they matched an allowlist pattern."},"indirect":{"oneOf":[{"$ref":"#/components/schemas/PIIndirectMetadata"},{"type":"null"}],"description":"Indirect-injection (untrusted content) signals for the request."},"output":{"oneOf":[{"$ref":"#/components/schemas/PIOutputMetadata"},{"type":"null"}],"description":"Output-side credential scan. Non-streaming responses only."},"policy_scope":{"type":["string","null"],"description":"`org`, or `project` when a project override applied."},"latency_ms":{"type":["number","null"],"format":"double","description":"Time the direct scan took, in milliseconds."}},"required":["mode"],"description":"Prompt-injection protection outcome for the request.","title":"PromptInjectionMetadata"},"DlpMetadataStatus":{"type":"string","enum":["skipped","clean","flagged","redacted","blocked","error"],"title":"DlpMetadataStatus"},"DlpMetadataAction":{"type":"string","enum":["none","notify","redact","block"],"title":"DlpMetadataAction"},"DLPMetadata":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/DlpMetadataStatus"},"action":{"$ref":"#/components/schemas/DlpMetadataAction"},"skipped_reason":{"type":["string","null"],"description":"Set when status is `skipped` or `error`: `no_enabled_rules`, `no_text`, `disabled`, `sidecar_timeout`, `sidecar_http_error`, `sidecar_exception`."},"finding_count":{"type":"integer","default":0},"entity_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"Findings per entity type, keyed by entity name (for example US_SSN). Never the matched values."},"action_counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"Findings per rule action (`LOG`, `REDACT`, `BLOCK`)."},"rule_ids":{"type":"array","items":{"type":"string"},"description":"Your DLP rule ids that matched."},"policy_scope":{"type":["string","null"],"description":"`org`, or `project` when a project override applied."},"latency_ms":{"type":["number","null"],"format":"double"}},"required":["status","action"],"description":"DLP enforcement outcome for the request.","title":"DLPMetadata"},"GuardrailsMetadata":{"type":"object","properties":{"prompt_injection":{"oneOf":[{"$ref":"#/components/schemas/PromptInjectionMetadata"},{"type":"null"}],"description":"Prompt-injection protection outcome. Null when the organization has no prompt-injection configuration."},"dlp":{"oneOf":[{"$ref":"#/components/schemas/DLPMetadata"},{"type":"null"}],"description":"DLP enforcement outcome. Null when DLP did not run for the request."}},"description":"Guardrail results attached when `include_guardrails_metadata` is set. Every field is a copy of a value already computed for the request log; no prompt text or matched value is ever included.","title":"GuardrailsMetadata"},"ResponseResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["response"],"default":"response"},"created_at":{"type":"string","format":"date-time"},"model":{"type":"string","description":"The model that generated the response, in 'provider/model-name' format"},"vendor":{"type":["string","null"],"description":"The execution vendor that served the request"},"provider_request_id":{"type":["string","null"],"description":"The upstream provider's request ID"},"output":{"type":"array","items":{"$ref":"#/components/schemas/OutputMessage"}},"usage":{"$ref":"#/components/schemas/Usage"},"routing":{"oneOf":[{"$ref":"#/components/schemas/RoutingMetadata"},{"type":"null"}],"description":"Routing metadata (only present when include_routing_metadata=true)"},"guardrails":{"oneOf":[{"$ref":"#/components/schemas/GuardrailsMetadata"},{"type":"null"}],"description":"Prompt-injection protection and DLP results (only present when include_guardrails_metadata=true). Also present on blocked 422 responses beside `error`."},"service_tier":{"type":["string","null"],"description":"The tier that actually served the request and was billed. Differs from the requested tier on a throttle fallback."}},"required":["id","created_at","model","output","usage"],"description":"Response body for POST /v1/responses.","title":"ResponseResponse"},"EmbeddingRequestSchemaInput":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Text to embed","title":"EmbeddingRequestSchemaInput"},"EmbeddingRequestSchema":{"type":"object","properties":{"model":{"type":"string","description":"Model ID in format 'provider/model-name'"},"input":{"$ref":"#/components/schemas/EmbeddingRequestSchemaInput","description":"Text to embed"},"encoding_format":{"type":["string","null"],"description":"Encoding format for embeddings"},"dimensions":{"type":["integer","null"],"description":"Number of dimensions for the output embeddings. Supported by OpenAI text-embedding-3 and later models and by Google gemini embedding models."},"task_type":{"type":["string","null"],"description":"Google-only: the embedding task type (e.g. RETRIEVAL_QUERY, RETRIEVAL_DOCUMENT, SEMANTIC_SIMILARITY, CLASSIFICATION, CLUSTERING). Ignored for non-Google models."},"user":{"type":["string","null"],"description":"End-user identifier"}},"required":["model","input"],"description":"Request body for POST /v1/embeddings.","title":"EmbeddingRequestSchema"},"EmbeddingDataSchema":{"type":"object","properties":{"object":{"type":"string","enum":["embedding"],"default":"embedding"},"embedding":{"type":"array","items":{"type":"number","format":"double"}},"index":{"type":"integer"}},"required":["embedding","index"],"description":"Single embedding result.","title":"EmbeddingDataSchema"},"EmbeddingUsage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"cost":{"type":["number","null"],"format":"double","description":"Cost of this call in USD, computed by Gateway. Null when the embedding model has no pricing on file, so cost trackers record no spend rather than a false zero."}},"required":["prompt_tokens","total_tokens"],"description":"Token usage for embeddings.","title":"EmbeddingUsage"},"EmbeddingResponseSchema":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"default":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmbeddingDataSchema"}},"model":{"type":"string"},"usage":{"$ref":"#/components/schemas/EmbeddingUsage"}},"required":["data","model","usage"],"description":"Response body for POST /v1/embeddings.","title":"EmbeddingResponseSchema"},"OpenAiChatMessageRole":{"type":"string","enum":["system","user","assistant","tool","developer"],"title":"OpenAiChatMessageRole"},"OpenAiChatMessageContent":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}}],"title":"OpenAiChatMessageContent"},"OpenAIChatMessage":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/OpenAiChatMessageRole"},"content":{"oneOf":[{"$ref":"#/components/schemas/OpenAiChatMessageContent"},{"type":"null"}]},"name":{"type":["string","null"]},"tool_calls":{"type":["array","null"],"items":{"type":"object","additionalProperties":{"description":"Any type"}}},"tool_call_id":{"type":["string","null"]}},"required":["role"],"description":"OpenAI chat message format.","title":"OpenAIChatMessage"},"OpenAiChatCompletionRequestStop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"title":"OpenAiChatCompletionRequestStop"},"OpenAIFunctionDef":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","default":""},"parameters":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["name"],"description":"OpenAI function definition within a tool.","title":"OpenAIFunctionDef"},"OpenAITool":{"type":"object","properties":{"type":{"type":"string","enum":["function"],"default":"function"},"function":{"$ref":"#/components/schemas/OpenAIFunctionDef"}},"required":["function"],"description":"OpenAI tool definition.","title":"OpenAITool"},"OpenAiChatCompletionRequestToolChoice":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"description":"Any type"}}],"title":"OpenAiChatCompletionRequestToolChoice"},"OpenAIResponseFormat":{"type":"object","properties":{"type":{"type":"string","default":"text","description":"One of 'text', 'json_object', or 'json_schema'."},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/JsonSchemaSpec"},{"type":"null"}],"description":"Required when type is 'json_schema'."}},"description":"OpenAI response format.","title":"OpenAIResponseFormat"},"OpenAiChatCompletionRequestServiceTier":{"type":"string","enum":["standard","flex","priority"],"description":"Processing tier. 'flex' = discounted best-effort (slower, may be throttled); 'priority' = premium low-latency (not currently priced on any route, so it fails closed). Omit or 'standard' for normal processing. Allowed only on routes that price the requested tier, otherwise the request fails closed with 400.","title":"OpenAiChatCompletionRequestServiceTier"},"OpenAIChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/OpenAIChatMessage"}},"temperature":{"type":["number","null"],"format":"double"},"top_p":{"type":["number","null"],"format":"double"},"n":{"type":["integer","null"]},"stream":{"type":"boolean","default":false},"stop":{"oneOf":[{"$ref":"#/components/schemas/OpenAiChatCompletionRequestStop"},{"type":"null"}]},"max_tokens":{"type":["integer","null"]},"max_completion_tokens":{"type":["integer","null"]},"presence_penalty":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"logit_bias":{"type":["object","null"],"additionalProperties":{"type":"number","format":"double"}},"user":{"type":["string","null"]},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/OpenAITool"}},"tool_choice":{"oneOf":[{"$ref":"#/components/schemas/OpenAiChatCompletionRequestToolChoice"},{"type":"null"}]},"response_format":{"oneOf":[{"$ref":"#/components/schemas/OpenAIResponseFormat"},{"type":"null"}]},"seed":{"type":["integer","null"]},"stream_options":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"service_tier":{"oneOf":[{"$ref":"#/components/schemas/OpenAiChatCompletionRequestServiceTier"},{"type":"null"}],"description":"Processing tier. 'flex' = discounted best-effort (slower, may be throttled); 'priority' = premium low-latency (not currently priced on any route, so it fails closed). Omit or 'standard' for normal processing. Allowed only on routes that price the requested tier, otherwise the request fails closed with 400."},"service_tier_fallback":{"type":"boolean","default":false,"description":"If the provider throttles the requested tier (429/503), retry once at the standard tier, billed at standard rates. The response service_tier shows the tier that actually served."}},"required":["model","messages"],"description":"OpenAI chat completion request body.","title":"OpenAIChatCompletionRequest"},"AnthropicMessageParamRole":{"type":"string","enum":["user","assistant"],"title":"AnthropicMessageParamRole"},"AnthropicContentBlockContent":{"oneOf":[{"type":"string"},{"type":"array","items":{"description":"Any type"}}],"title":"AnthropicContentBlockContent"},"AnthropicContentBlock":{"type":"object","properties":{"type":{"type":"string","description":"Block type, such as `text`, `image`, `tool_use`, or `tool_result`"},"text":{"type":["string","null"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]},"input":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"tool_use_id":{"type":["string","null"]},"content":{"oneOf":[{"$ref":"#/components/schemas/AnthropicContentBlockContent"},{"type":"null"}]},"source":{"type":["object","null"],"additionalProperties":{"description":"Any type"}}},"required":["type"],"title":"AnthropicContentBlock"},"AnthropicMessageParamContent1":{"type":"array","items":{"$ref":"#/components/schemas/AnthropicContentBlock"},"title":"AnthropicMessageParamContent1"},"AnthropicMessageParamContent":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/AnthropicMessageParamContent1"}],"title":"AnthropicMessageParamContent"},"AnthropicMessageParam":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/AnthropicMessageParamRole"},"content":{"$ref":"#/components/schemas/AnthropicMessageParamContent"}},"required":["role","content"],"title":"AnthropicMessageParam"},"AnthropicMessageRequestSystem1":{"type":"array","items":{"$ref":"#/components/schemas/AnthropicContentBlock"},"title":"AnthropicMessageRequestSystem1"},"AnthropicMessageRequestSystem":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/AnthropicMessageRequestSystem1"}],"title":"AnthropicMessageRequestSystem"},"AnthropicToolDef":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"input_schema":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["name","input_schema"],"title":"AnthropicToolDef"},"AnthropicMessageRequest":{"type":"object","properties":{"model":{"type":"string"},"max_tokens":{"type":"integer"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/AnthropicMessageParam"}},"system":{"oneOf":[{"$ref":"#/components/schemas/AnthropicMessageRequestSystem"},{"type":"null"}]},"stream":{"type":"boolean","default":false},"temperature":{"type":["number","null"],"format":"double"},"top_p":{"type":["number","null"],"format":"double"},"top_k":{"type":["integer","null"]},"stop_sequences":{"type":["array","null"],"items":{"type":"string"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AnthropicToolDef"}},"tool_choice":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"metadata":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"service_tier":{"type":["string","null"]}},"required":["model","max_tokens","messages"],"title":"AnthropicMessageRequest"},"AnthropicMessageResponseStopReason":{"type":"string","enum":["end_turn","max_tokens","stop_sequence","tool_use"],"title":"AnthropicMessageResponseStopReason"},"AnthropicUsage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"cache_creation_input_tokens":{"type":["integer","null"]},"cache_read_input_tokens":{"type":["integer","null"]}},"required":["input_tokens","output_tokens"],"title":"AnthropicUsage"},"AnthropicMessageResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message"]},"role":{"type":"string","enum":["assistant"]},"model":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/components/schemas/AnthropicContentBlock"}},"stop_reason":{"oneOf":[{"$ref":"#/components/schemas/AnthropicMessageResponseStopReason"},{"type":"null"}]},"stop_sequence":{"type":["string","null"]},"usage":{"$ref":"#/components/schemas/AnthropicUsage"}},"required":["id","type","role","model","content","usage"],"title":"AnthropicMessageResponse"},"AnthropicCountTokensRequestSystem1":{"type":"array","items":{"$ref":"#/components/schemas/AnthropicContentBlock"},"title":"AnthropicCountTokensRequestSystem1"},"AnthropicCountTokensRequestSystem":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/AnthropicCountTokensRequestSystem1"}],"title":"AnthropicCountTokensRequestSystem"},"AnthropicCountTokensRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/AnthropicMessageParam"}},"system":{"oneOf":[{"$ref":"#/components/schemas/AnthropicCountTokensRequestSystem"},{"type":"null"}]},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AnthropicToolDef"}}},"required":["model","messages"],"title":"AnthropicCountTokensRequest"},"AnthropicCountTokensResponse":{"type":"object","properties":{"input_tokens":{"type":"integer"}},"required":["input_tokens"],"title":"AnthropicCountTokensResponse"},"RoutingPoliciesGetResponsesContentApplicationJsonSchemaDataItemsProvidersItems":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"}},"title":"RoutingPoliciesGetResponsesContentApplicationJsonSchemaDataItemsProvidersItems"},"RoutingPoliciesGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"strategy":{"type":"string"},"description":{"type":["string","null"]},"is_intelligent":{"type":"boolean"},"providers":{"type":"array","items":{"$ref":"#/components/schemas/RoutingPoliciesGetResponsesContentApplicationJsonSchemaDataItemsProvidersItems"}},"is_active":{"type":"boolean"}},"title":"RoutingPoliciesGetResponsesContentApplicationJsonSchemaDataItems"},"Routing_listPolicies_Response_200":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/RoutingPoliciesGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"Routing_listPolicies_Response_200"},"RoutingStrategiesGetResponsesContentApplicationJsonSchemaDataItemsMlRouting":{"type":"object","properties":{"score_exponent":{"type":"number","format":"double"},"behavior":{"type":"string"}},"title":"RoutingStrategiesGetResponsesContentApplicationJsonSchemaDataItemsMlRouting"},"RoutingStrategiesGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_intelligent":{"type":"boolean"},"description":{"type":"string"},"ml_routing":{"oneOf":[{"$ref":"#/components/schemas/RoutingStrategiesGetResponsesContentApplicationJsonSchemaDataItemsMlRouting"},{"type":"null"}]}},"title":"RoutingStrategiesGetResponsesContentApplicationJsonSchemaDataItems"},"Routing_listStrategies_Response_200":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/RoutingStrategiesGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"Routing_listStrategies_Response_200"},"TagSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique tag identifier"},"object":{"type":"string","enum":["tag"],"default":"tag"},"tag_key":{"type":"string","description":"Tag key"},"tag_value":{"type":"string","description":"Tag value"},"org_id":{"type":["string","null"],"description":"Organization ID, null for global tags"},"is_global":{"type":"boolean","default":false,"description":"Whether this is a global tag"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","tag_key","tag_value"],"description":"A tag available through the gateway.","title":"TagSchema"},"TagsListResponse":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"default":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TagSchema"}},"has_more":{"type":"boolean","default":false},"next_cursor":{"type":["string","null"]}},"required":["data"],"description":"Response for GET /v1/tags.","title":"TagsListResponse"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Your production key sent as a bearer token."}}}}