GET
/v1/schemas/openrouter/chat/messages?kind=output
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace1d21386bacdc7d3c4b6d8dd2ccd7d61a51b5e073bf6dcc4e61db5b65e7e4c1ac{
"fetchedAt": 1793943005,
"extractorVersion": "1",
"verifiedAt": null
} |
Response body
0 properties · 0 required · 0 $defsThis schema isn’t a plain object with properties — showing the raw JSON instead.
application/json
{
"provider": "openrouter",
"activity": "chat",
"endpointId": "messages",
"kind": "output",
"contentHash": "10aa6715a8302d32d5cf05669d58093e53137be420ebf49ede2962c183ee12d3",
"specRevision": null,
"provenance": {
"sourceUrl": "https://openrouter.ai/openapi.json",
"sourceHash": "1d21386bacdc7d3c4b6d8dd2ccd7d61a51b5e073bf6dcc4e61db5b65e7e4c1ac",
"fetchedAt": 1793943005,
"extractorVersion": "1",
"derivation": "upstream-spec",
"verifiedAt": null
},
"createdAt": 1793943005,
"supersededAt": null,
"schema": {
"allOf": [
{
"$ref": "#/$defs/BaseMessagesResult"
},
{
"properties": {
"context_management": {
"properties": {
"applied_edits": {
"items": {
"additionalProperties": {},
"properties": {
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"applied_edits"
],
"type": [
"object",
"null"
]
},
"openrouter_metadata": {
"$ref": "#/$defs/OpenRouterMetadata"
},
"provider": {
"type": "string"
},
"safeguard_results": {
"items": {
"$ref": "#/$defs/AnthropicSafeguardResult"
},
"type": [
"array",
"null"
]
},
"usage": {
"allOf": [
{
"$ref": "#/$defs/AnthropicUsage"
},
{
"properties": {
"cost": {
"format": "double",
"type": [
"number",
"null"
]
},
"cost_details": {
"$ref": "#/$defs/CostDetails"
},
"deferred_tools_details": {
"properties": {
"completion_tokens": {
"description": "Completion tokens summed over every upstream call",
"type": "integer"
},
"prompt_tokens": {
"description": "Prompt tokens summed over every upstream call",
"type": "integer"
},
"total_tokens": {
"description": "Sum of the above two fields",
"type": "integer"
},
"turns": {
"description": "Upstream model calls the run made",
"exclusiveMinimum": true,
"minimum": 0,
"type": "integer"
}
},
"required": [
"turns",
"prompt_tokens",
"completion_tokens",
"total_tokens"
],
"type": "object"
},
"is_byok": {
"type": "boolean"
},
"iterations": {
"items": {
"$ref": "#/$defs/AnthropicUsageIteration"
},
"type": "array"
},
"server_tool_use": {
"$ref": "#/$defs/ORAnthropicServerToolUsage"
},
"service_tier": {
"type": [
"string",
"null"
]
},
"speed": {
"$ref": "#/$defs/AnthropicSpeed"
}
},
"type": "object"
}
],
"example": {
"cache_creation": null,
"cache_creation_input_tokens": null,
"cache_read_input_tokens": null,
"inference_geo": null,
"input_tokens": 100,
"output_tokens": 50,
"output_tokens_details": null,
"server_tool_use": null,
"service_tier": "standard"
}
}
},
"type": "object"
}
],
"description": "Non-streaming response from the Anthropic Messages API with OpenRouter extensions",
"example": {
"container": null,
"content": [
{
"citations": [],
"text": "Hello! I'm doing well, thank you for asking.",
"type": "text"
}
],
"id": "msg_01XFDUDYJgAACzvnptvVoYEL",
"model": "claude-sonnet-4-5-20250929",
"role": "assistant",
"stop_details": null,
"stop_reason": "end_turn",
"stop_sequence": null,
"type": "message",
"usage": {
"cache_creation": null,
"cache_creation_input_tokens": null,
"cache_read_input_tokens": null,
"inference_geo": null,
"input_tokens": 12,
"output_tokens": 15,
"output_tokens_details": null,
"server_tool_use": null,
"service_tier": "standard"
}
},
"$defs": {
"AnthropicAdvisorMessageUsageIteration": {
"allOf": [
{
"$ref": "#/$defs/AnthropicBaseUsageIteration"
},
{
"properties": {
"model": {
"type": "string"
},
"type": {
"enum": [
"advisor_message"
],
"type": "string"
}
},
"required": [
"type",
"model"
],
"type": "object"
}
],
"example": {
"cache_creation": null,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 823,
"model": "claude-opus-4-6",
"output_tokens": 1612,
"type": "advisor_message"
}
},
"AnthropicAdvisorToolResult": {
"example": {
"content": {
"text": "Advisor response text",
"type": "advisor_result"
},
"tool_use_id": "srvtoolu_01abc",
"type": "advisor_tool_result"
},
"properties": {
"content": {
"additionalProperties": {},
"type": "object"
},
"tool_use_id": {
"type": "string"
},
"type": {
"enum": [
"advisor_tool_result"
],
"type": "string"
}
},
"required": [
"type",
"tool_use_id",
"content"
],
"type": "object"
},
"AnthropicBase64PdfSource": {
"example": {
"data": "JVBERi0x...",
"media_type": "application/pdf",
"type": "base64"
},
"properties": {
"data": {
"type": "string"
},
"media_type": {
"enum": [
"application/pdf"
],
"type": "string"
},
"type": {
"enum": [
"base64"
],
"type": "string"
}
},
"required": [
"type",
"media_type",
"data"
],
"type": "object"
},
"AnthropicBaseUsageIteration": {
"example": {
"cache_creation": null,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 100,
"output_tokens": 50
},
"properties": {
"cache_creation": {
"$ref": "#/$defs/AnthropicIterationCacheCreation"
},
"cache_creation_input_tokens": {
"type": "integer"
},
"cache_read_input_tokens": {
"type": "integer"
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
}
},
"type": "object"
},
"AnthropicBashCodeExecutionContent": {
"discriminator": {
"mapping": {
"bash_code_execution_result": "#/components/schemas/AnthropicBashCodeExecutionResult",
"bash_code_execution_tool_result_error": "#/components/schemas/AnthropicBashCodeExecutionToolResultError"
},
"propertyName": "type"
},
"example": {
"content": [],
"return_code": 0,
"stderr": "",
"stdout": "Hello",
"type": "bash_code_execution_result"
},
"oneOf": [
{
"$ref": "#/$defs/AnthropicBashCodeExecutionToolResultError"
},
{
"$ref": "#/$defs/AnthropicBashCodeExecutionResult"
}
]
},
"AnthropicBashCodeExecutionOutput": {
"example": {
"file_id": "file_01abc",
"type": "bash_code_execution_output"
},
"properties": {
"file_id": {
"type": "string"
},
"type": {
"enum": [
"bash_code_execution_output"
],
"type": "string"
}
},
"required": [
"file_id",
"type"
],
"type": "object"
},
"AnthropicBashCodeExecutionResult": {
"example": {
"content": [],
"return_code": 0,
"stderr": "",
"stdout": "Hello",
"type": "bash_code_execution_result"
},
"properties": {
"content": {
"items": {
"$ref": "#/$defs/AnthropicBashCodeExecutionOutput"
},
"type": "array"
},
"return_code": {
"type": "integer"
},
"stderr": {
"type": "string"
},
"stdout": {
"type": "string"
},
"type": {
"enum": [
"bash_code_execution_result"
],
"type": "string"
}
},
"required": [
"content",
"return_code",
"stderr",
"stdout",
"type"
],
"type": "object"
},
"AnthropicBashCodeExecutionToolResult": {
"example": {
"content": {
"content": [],
"return_code": 0,
"stderr": "",
"stdout": "Hello",
"type": "bash_code_execution_result"
},
"tool_use_id": "srvtoolu_01abc",
"type": "bash_code_execution_tool_result"
},
"properties": {
"content": {
"$ref": "#/$defs/AnthropicBashCodeExecutionContent"
},
"tool_use_id": {
"type": "string"
},
"type": {
"enum": [
"bash_code_execution_tool_result"
],
"type": "string"
}
},
"required": [
"type",
"content",
"tool_use_id"
],
"type": "object"
},
"AnthropicBashCodeExecutionToolResultError": {
"example": {
"error_code": "unavailable",
"type": "bash_code_execution_tool_result_error"
},
"properties": {
"error_code": {
"enum": [
"invalid_tool_input",
"unavailable",
"too_many_requests",
"execution_time_exceeded",
"output_file_too_large"
],
"type": "string",
"x-speakeasy-unknown-values": "allow"
},
"type": {
"enum": [
"bash_code_execution_tool_result_error"
],
"type": "string"
}
},
"required": [
"error_code",
"type"
],
"type": "object"
},
"AnthropicCacheCreation": {
"example": {
"ephemeral_1h_input_tokens": 0,
"ephemeral_5m_input_tokens": 100
},
"properties": {
"ephemeral_1h_input_tokens": {
"type": "integer"
},
"ephemeral_5m_input_tokens": {
"type": "integer"
}
},
"required": [
"ephemeral_5m_input_tokens",
"ephemeral_1h_input_tokens"
],
"type": [
"object",
"null"
]
},
"AnthropicCaller": {
"discriminator": {
"mapping": {
"code_execution_20250825": "#/components/schemas/AnthropicCodeExecution20250825Caller",
"code_execution_20260120": "#/components/schemas/AnthropicCodeExecution20260120Caller",
"direct": "#/components/schemas/AnthropicDirectCaller"
},
"propertyName": "type"
},
"example": {
"type": "direct"
},
"oneOf": [
{
"$ref": "#/$defs/AnthropicDirectCaller"
},
{
"$ref": "#/$defs/AnthropicCodeExecution20250825Caller"
},
{
"$ref": "#/$defs/AnthropicCodeExecution20260120Caller"
}
]
},
"AnthropicCitationCharLocation": {
"example": {
"cited_text": "Example cited text",
"document_index": 0,
"document_title": null,
"end_char_index": 18,
"file_id": null,
"start_char_index": 0,
"type": "char_location"
},
"properties": {
"cited_text": {
"type": "string"
},
"document_index": {
"type": "integer"
},
"document_title": {
"type": [
"string",
"null"
]
},
"end_char_index": {
"type": "integer"
},
"file_id": {
"type": [
"string",
"null"
]
},
"start_char_index": {
"type": "integer"
},
"type": {
"enum": [
"char_location"
],
"type": "string"
}
},
"required": [
"type",
"cited_text",
"document_index",
"document_title",
"start_char_index",
"end_char_index",
"file_id"
],
"type": "object"
},
"AnthropicCitationContentBlockLocation": {
"example": {
"cited_text": "Example cited text",
"document_index": 0,
"document_title": null,
"end_block_index": 1,
"file_id": null,
"start_block_index": 0,
"type": "content_block_location"
},
"properties": {
"cited_text": {
"type": "string"
},
"document_index": {
"type": "integer"
},
"document_title": {
"type": [
"string",
"null"
]
},
"end_block_index": {
"type": "integer"
},
"file_id": {
"type": [
"string",
"null"
]
},
"start_block_index": {
"type": "integer"
},
"type": {
"enum": [
"content_block_location"
],
"type": "string"
}
},
"required": [
"type",
"cited_text",
"document_index",
"document_title",
"start_block_index",
"end_block_index",
"file_id"
],
"type": "object"
},
"AnthropicCitationPageLocation": {
"example": {
"cited_text": "Example cited text",
"document_index": 0,
"document_title": null,
"end_page_number": 2,
"file_id": null,
"start_page_number": 1,
"type": "page_location"
},
"properties": {
"cited_text": {
"type": "string"
},
"document_index": {
"type": "integer"
},
"document_title": {
"type": [
"string",
"null"
]
},
"end_page_number": {
"type": "integer"
},
"file_id": {
"type": [
"string",
"null"
]
},
"start_page_number": {
"type": "integer"
},
"type": {
"enum": [
"page_location"
],
"type": "string"
}
},
"required": [
"type",
"cited_text",
"document_index",
"document_title",
"start_page_number",
"end_page_number",
"file_id"
],
"type": "object"
},
"AnthropicCitationSearchResultLocation": {
"example": {
"cited_text": "Example cited text",
"end_block_index": 1,
"search_result_index": 0,
"source": "example_source",
"start_block_index": 0,
"title": "Example Result",
"type": "search_result_location"
},
"properties": {
"cited_text": {
"type": "string"
},
"end_block_index": {
"type": "integer"
},
"search_result_index": {
"type": "integer"
},
"source": {
"type": "string"
},
"start_block_index": {
"type": "integer"
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"search_result_location"
],
"type": "string"
}
},
"required": [
"type",
"cited_text",
"search_result_index",
"source",
"title",
"start_block_index",
"end_block_index"
],
"type": "object"
},
"AnthropicCitationWebSearchResultLocation": {
"example": {
"cited_text": "Example cited text",
"encrypted_index": "enc_idx_0",
"title": "Example Page",
"type": "web_search_result_location",
"url": "https://example.com"
},
"properties": {
"cited_text": {
"type": "string"
},
"encrypted_index": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"web_search_result_location"
],
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"type",
"cited_text",
"encrypted_index",
"title",
"url"
],
"type": "object"
},
"AnthropicCitationsConfig": {
"default": null,
"example": {
"enabled": true
},
"properties": {
"enabled": {
"type": "boolean"
}
},
"required": [
"enabled"
],
"type": [
"object",
"null"
]
},
"AnthropicCodeExecution20250825Caller": {
"example": {
"tool_id": "toolu_01abc",
"type": "code_execution_20250825"
},
"properties": {
"tool_id": {
"type": "string"
},
"type": {
"enum": [
"code_execution_20250825"
],
"type": "string"
}
},
"required": [
"type",
"tool_id"
],
"type": "object"
},
"AnthropicCodeExecution20260120Caller": {
"example": {
"tool_id": "toolu_01abc",
"type": "code_execution_20260120"
},
"properties": {
"tool_id": {
"type": "string"
},
"type": {
"enum": [
"code_execution_20260120"
],
"type": "string"
}
},
"required": [
"type",
"tool_id"
],
"type": "object"
},
"AnthropicCodeExecutionContent": {
"discriminator": {
"mapping": {
"code_execution_result": "#/components/schemas/AnthropicCodeExecutionResult",
"code_execution_tool_result_error": "#/components/schemas/AnthropicCodeExecutionToolResultError",
"encrypted_code_execution_result": "#/components/schemas/AnthropicEncryptedCodeExecutionResult"
},
"propertyName": "type"
},
"example": {
"content": [],
"return_code": 0,
"stderr": "",
"stdout": "Hello",
"type": "code_execution_result"
},
"oneOf": [
{
"$ref": "#/$defs/AnthropicCodeExecutionToolResultError"
},
{
"$ref": "#/$defs/AnthropicCodeExecutionResult"
},
{
"$ref": "#/$defs/AnthropicEncryptedCodeExecutionResult"
}
]
},
"AnthropicCodeExecutionOutput": {
"example": {
"file_id": "file_01abc",
"type": "code_execution_output"
},
"properties": {
"file_id": {
"type": "string"
},
"type": {
"enum": [
"code_execution_output"
],
"type": "string"
}
},
"required": [
"file_id",
"type"
],
"type": "object"
},
"AnthropicCodeExecutionResult": {
"example": {
"content": [],
"return_code": 0,
"stderr": "",
"stdout": "Hello",
"type": "code_execution_result"
},
"properties": {
"content": {
"items": {
"$ref": "#/$defs/AnthropicCodeExecutionOutput"
},
"type": "array"
},
"return_code": {
"type": "integer"
},
"stderr": {
"type": "string"
},
"stdout": {
"type": "string"
},
"type": {
"enum": [
"code_execution_result"
],
"type": "string"
}
},
"required": [
"content",
"return_code",
"stderr",
"stdout",
"type"
],
"type": "object"
},
"AnthropicCodeExecutionToolResult": {
"example": {
"content": {
"content": [],
"return_code": 0,
"stderr": "",
"stdout": "Hello",
"type": "code_execution_result"
},
"tool_use_id": "srvtoolu_01abc",
"type": "code_execution_tool_result"
},
"properties": {
"content": {
"$ref": "#/$defs/AnthropicCodeExecutionContent"
},
"tool_use_id": {
"type": "string"
},
"type": {
"enum": [
"code_execution_tool_result"
],
"type": "string"
}
},
"required": [
"type",
"content",
"tool_use_id"
],
"type": "object"
},
"AnthropicCodeExecutionToolResultError": {
"example": {
"error_code": "unavailable",
"type": "code_execution_tool_result_error"
},
"properties": {
"error_code": {
"$ref": "#/$defs/AnthropicServerToolErrorCode"
},
"type": {
"enum": [
"code_execution_tool_result_error"
],
"type": "string"
}
},
"required": [
"error_code",
"type"
],
"type": "object"
},
"AnthropicCompactionBlock": {
"example": {
"content": "Compacted summary of conversation.",
"type": "compaction"
},
"properties": {
"content": {
"type": [
"string",
"null"
]
},
"encrypted_content": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"compaction"
],
"type": "string"
}
},
"required": [
"type",
"content"
],
"type": "object"
},
"AnthropicCompactionUsageIteration": {
"allOf": [
{
"$ref": "#/$defs/AnthropicBaseUsageIteration"
},
{
"properties": {
"type": {
"enum": [
"compaction"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
],
"example": {
"cache_creation": null,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 50,
"output_tokens": 25,
"type": "compaction"
}
},
"AnthropicContainer": {
"example": {
"expires_at": "2026-04-08T00:00:00Z",
"id": "ctr_01abc",
"skills": null
},
"properties": {
"expires_at": {
"type": "string"
},
"id": {
"type": "string"
},
"skills": {
"default": null,
"items": {
"$ref": "#/$defs/AnthropicContainerSkill"
},
"type": [
"array",
"null"
]
}
},
"required": [
"id",
"expires_at"
],
"type": [
"object",
"null"
]
},
"AnthropicContainerSkill": {
"example": {
"skill_id": "pdf",
"type": "anthropic",
"version": "latest"
},
"properties": {
"skill_id": {
"type": "string"
},
"type": {
"enum": [
"anthropic",
"custom"
],
"type": "string",
"x-speakeasy-unknown-values": "allow"
},
"version": {
"type": "string"
}
},
"required": [
"skill_id",
"type",
"version"
],
"type": "object"
},
"AnthropicContainerUpload": {
"example": {
"file_id": "file_01abc",
"type": "container_upload"
},
"properties": {
"file_id": {
"type": "string"
},
"type": {
"enum": [
"container_upload"
],
"type": "string"
}
},
"required": [
"type",
"file_id"
],
"type": "object"
},
"AnthropicDirectCaller": {
"example": {
"type": "direct"
},
"properties": {
"type": {
"enum": [
"direct"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"AnthropicDocumentBlock": {
"example": {
"citations": null,
"source": {
"data": "Hello, world!",
"media_type": "text/plain",
"type": "text"
},
"title": null,
"type": "document"
},
"properties": {
"citations": {
"$ref": "#/$defs/AnthropicCitationsConfig"
},
"source": {
"anyOf": [
{
"$ref": "#/$defs/AnthropicBase64PdfSource"
},
{
"$ref": "#/$defs/AnthropicPlainTextSource"
}
]
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"document"
],
"type": "string"
}
},
"required": [
"source",
"title",
"type"
],
"type": "object"
},
"AnthropicEncryptedCodeExecutionResult": {
"example": {
"content": [],
"encrypted_stdout": "enc_stdout",
"return_code": 0,
"stderr": "",
"type": "encrypted_code_execution_result"
},
"properties": {
"content": {
"items": {
"$ref": "#/$defs/AnthropicCodeExecutionOutput"
},
"type": "array"
},
"encrypted_stdout": {
"type": "string"
},
"return_code": {
"type": "integer"
},
"stderr": {
"type": "string"
},
"type": {
"enum": [
"encrypted_code_execution_result"
],
"type": "string"
}
},
"required": [
"content",
"encrypted_stdout",
"return_code",
"stderr",
"type"
],
"type": "object"
},
"AnthropicInputTransformation": {
"additionalProperties": {},
"description": "A server-side transformation Anthropic applied to the request input",
"example": {
"path": "messages.1.content.0",
"reason": "prefix_binding_mismatch",
"type": "thinking_dropped"
},
"properties": {
"path": {
"type": [
"string",
"null"
]
},
"reason": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"AnthropicIterationCacheCreation": {
"default": null,
"example": {
"ephemeral_1h_input_tokens": 0,
"ephemeral_5m_input_tokens": 0
},
"properties": {
"ephemeral_1h_input_tokens": {
"type": "integer"
},
"ephemeral_5m_input_tokens": {
"type": "integer"
}
},
"type": [
"object",
"null"
]
},
"AnthropicMessageUsageIteration": {
"allOf": [
{
"$ref": "#/$defs/AnthropicBaseUsageIteration"
},
{
"properties": {
"model": {
"type": "string"
},
"type": {
"enum": [
"message"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
],
"example": {
"cache_creation": null,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 100,
"output_tokens": 50,
"type": "message"
}
},
"AnthropicOutputTokensDetails": {
"example": {
"thinking_tokens": 0
},
"properties": {
"thinking_tokens": {
"type": "integer"
}
},
"required": [
"thinking_tokens"
],
"type": [
"object",
"null"
]
},
"AnthropicPlainTextSource": {
"example": {
"data": "Hello, world!",
"media_type": "text/plain",
"type": "text"
},
"properties": {
"data": {
"type": "string"
},
"media_type": {
"enum": [
"text/plain"
],
"type": "string"
},
"type": {
"enum": [
"text"
],
"type": "string"
}
},
"required": [
"type",
"media_type",
"data"
],
"type": "object"
},
"AnthropicRedactedThinkingBlock": {
"example": {
"data": "cmVkYWN0ZWQ=",
"type": "redacted_thinking"
},
"properties": {
"data": {
"type": "string"
},
"type": {
"enum": [
"redacted_thinking"
],
"type": "string"
}
},
"required": [
"type",
"data"
],
"type": "object"
},
"AnthropicRefusalStopDetails": {
"description": "Structured information about a refusal",
"example": {
"category": "cyber",
"explanation": "The request was refused due to policy.",
"type": "refusal"
},
"properties": {
"category": {
"enum": [
"cyber",
"bio",
"frontier_llm",
"reasoning_extraction",
"general_harms",
null
],
"type": [
"string",
"null"
],
"x-speakeasy-unknown-values": "allow"
},
"explanation": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"refusal"
],
"type": "string"
}
},
"required": [
"type",
"category",
"explanation"
],
"type": [
"object",
"null"
]
},
"AnthropicSafeguardResult": {
"additionalProperties": {},
"description": "The outcome of a server-side safeguard, keyed by tool-use id where applicable",
"example": {
"status": {
"tool_uses": {
"toolu_01ABC": {
"outcome": "not_flagged",
"type": "evaluated"
}
},
"type": "available"
},
"type": "dangerous_tool_use"
},
"properties": {
"status": {
"additionalProperties": {},
"properties": {
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type",
"status"
],
"type": "object"
},
"AnthropicServerToolErrorCode": {
"enum": [
"invalid_tool_input",
"unavailable",
"too_many_requests",
"execution_time_exceeded"
],
"example": "unavailable",
"type": "string",
"x-speakeasy-unknown-values": "allow"
},
"AnthropicServerToolUsage": {
"example": {
"web_fetch_requests": 0,
"web_search_requests": 1
},
"properties": {
"web_fetch_requests": {
"type": "integer"
},
"web_search_requests": {
"type": "integer"
}
},
"required": [
"web_search_requests",
"web_fetch_requests"
],
"type": [
"object",
"null"
]
},
"AnthropicServiceTier": {
"enum": [
"standard",
"priority",
"batch",
null
],
"example": "standard",
"type": [
"string",
"null"
],
"x-speakeasy-unknown-values": "allow"
},
"AnthropicSpeed": {
"enum": [
"fast",
"standard",
null
],
"example": "standard",
"type": [
"string",
"null"
],
"x-speakeasy-unknown-values": "allow"
},
"AnthropicTextBlock": {
"example": {
"citations": null,
"text": "Hello, world!",
"type": "text"
},
"properties": {
"citations": {
"items": {
"$ref": "#/$defs/AnthropicTextCitation"
},
"type": [
"array",
"null"
]
},
"text": {
"type": "string"
},
"type": {
"enum": [
"text"
],
"type": "string"
}
},
"required": [
"type",
"text",
"citations"
],
"type": "object"
},
"AnthropicTextCitation": {
"discriminator": {
"mapping": {
"char_location": "#/components/schemas/AnthropicCitationCharLocation",
"content_block_location": "#/components/schemas/AnthropicCitationContentBlockLocation",
"page_location": "#/components/schemas/AnthropicCitationPageLocation",
"search_result_location": "#/components/schemas/AnthropicCitationSearchResultLocation",
"web_search_result_location": "#/components/schemas/AnthropicCitationWebSearchResultLocation"
},
"propertyName": "type"
},
"example": {
"cited_text": "Example text",
"document_index": 0,
"document_title": null,
"end_char_index": 10,
"file_id": null,
"start_char_index": 0,
"type": "char_location"
},
"oneOf": [
{
"$ref": "#/$defs/AnthropicCitationCharLocation"
},
{
"$ref": "#/$defs/AnthropicCitationPageLocation"
},
{
"$ref": "#/$defs/AnthropicCitationContentBlockLocation"
},
{
"$ref": "#/$defs/AnthropicCitationWebSearchResultLocation"
},
{
"$ref": "#/$defs/AnthropicCitationSearchResultLocation"
}
]
},
"AnthropicTextEditorCodeExecutionContent": {
"discriminator": {
"mapping": {
"text_editor_code_execution_create_result": "#/components/schemas/AnthropicTextEditorCodeExecutionCreateResult",
"text_editor_code_execution_str_replace_result": "#/components/schemas/AnthropicTextEditorCodeExecutionStrReplaceResult",
"text_editor_code_execution_tool_result_error": "#/components/schemas/AnthropicTextEditorCodeExecutionToolResultError",
"text_editor_code_execution_view_result": "#/components/schemas/AnthropicTextEditorCodeExecutionViewResult"
},
"propertyName": "type"
},
"example": {
"content": "file content",
"file_type": "text",
"num_lines": 10,
"start_line": 1,
"total_lines": 10,
"type": "text_editor_code_execution_view_result"
},
"oneOf": [
{
"$ref": "#/$defs/AnthropicTextEditorCodeExecutionToolResultError"
},
{
"$ref": "#/$defs/AnthropicTextEditorCodeExecutionViewResult"
},
{
"$ref": "#/$defs/AnthropicTextEditorCodeExecutionCreateResult"
},
{
"$ref": "#/$defs/AnthropicTextEditorCodeExecutionStrReplaceResult"
}
]
},
"AnthropicTextEditorCodeExecutionCreateResult": {
"example": {
"is_file_update": false,
"type": "text_editor_code_execution_create_result"
},
"properties": {
"is_file_update": {
"type": "boolean"
},
"type": {
"enum": [
"text_editor_code_execution_create_result"
],
"type": "string"
}
},
"required": [
"is_file_update",
"type"
],
"type": "object"
},
"AnthropicTextEditorCodeExecutionStrReplaceResult": {
"example": {
"lines": null,
"new_lines": null,
"new_start": null,
"old_lines": null,
"old_start": null,
"type": "text_editor_code_execution_str_replace_result"
},
"properties": {
"lines": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"new_lines": {
"type": [
"integer",
"null"
]
},
"new_start": {
"type": [
"integer",
"null"
]
},
"old_lines": {
"type": [
"integer",
"null"
]
},
"old_start": {
"type": [
"integer",
"null"
]
},
"type": {
"enum": [
"text_editor_code_execution_str_replace_result"
],
"type": "string"
}
},
"required": [
"lines",
"new_lines",
"new_start",
"old_lines",
"old_start",
"type"
],
"type": "object"
},
"AnthropicTextEditorCodeExecutionToolResult": {
"example": {
"content": {
"content": "file content",
"file_type": "text",
"num_lines": 10,
"start_line": 1,
"total_lines": 10,
"type": "text_editor_code_execution_view_result"
},
"tool_use_id": "srvtoolu_01abc",
"type": "text_editor_code_execution_tool_result"
},
"properties": {
"content": {
"$ref": "#/$defs/AnthropicTextEditorCodeExecutionContent"
},
"tool_use_id": {
"type": "string"
},
"type": {
"enum": [
"text_editor_code_execution_tool_result"
],
"type": "string"
}
},
"required": [
"type",
"content",
"tool_use_id"
],
"type": "object"
},
"AnthropicTextEditorCodeExecutionToolResultError": {
"example": {
"error_code": "unavailable",
"error_message": null,
"type": "text_editor_code_execution_tool_result_error"
},
"properties": {
"error_code": {
"enum": [
"invalid_tool_input",
"unavailable",
"too_many_requests",
"execution_time_exceeded",
"file_not_found"
],
"type": "string",
"x-speakeasy-unknown-values": "allow"
},
"error_message": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"text_editor_code_execution_tool_result_error"
],
"type": "string"
}
},
"required": [
"error_code",
"error_message",
"type"
],
"type": "object"
},
"AnthropicTextEditorCodeExecutionViewResult": {
"example": {
"content": "file content",
"file_type": "text",
"num_lines": 10,
"start_line": 1,
"total_lines": 10,
"type": "text_editor_code_execution_view_result"
},
"properties": {
"content": {
"type": "string"
},
"file_type": {
"enum": [
"text",
"image",
"pdf"
],
"type": "string",
"x-speakeasy-unknown-values": "allow"
},
"num_lines": {
"type": [
"integer",
"null"
]
},
"start_line": {
"type": [
"integer",
"null"
]
},
"total_lines": {
"type": [
"integer",
"null"
]
},
"type": {
"enum": [
"text_editor_code_execution_view_result"
],
"type": "string"
}
},
"required": [
"content",
"file_type",
"num_lines",
"start_line",
"total_lines",
"type"
],
"type": "object"
},
"AnthropicThinkingBlock": {
"example": {
"signature": "sig_abc123",
"thinking": "Let me think about this...",
"type": "thinking"
},
"properties": {
"signature": {
"type": "string"
},
"thinking": {
"type": "string"
},
"type": {
"enum": [
"thinking"
],
"type": "string"
}
},
"required": [
"type",
"thinking",
"signature"
],
"type": "object"
},
"AnthropicToolReference": {
"example": {
"tool_name": "my_tool",
"type": "tool_reference"
},
"properties": {
"tool_name": {
"type": "string"
},
"type": {
"enum": [
"tool_reference"
],
"type": "string"
}
},
"required": [
"tool_name",
"type"
],
"type": "object"
},
"AnthropicToolSearchContent": {
"discriminator": {
"mapping": {
"tool_search_tool_result_error": "#/components/schemas/AnthropicToolSearchResultError",
"tool_search_tool_search_result": "#/components/schemas/AnthropicToolSearchResult"
},
"propertyName": "type"
},
"example": {
"tool_references": [
{
"tool_name": "my_tool",
"type": "tool_reference"
}
],
"type": "tool_search_tool_search_result"
},
"oneOf": [
{
"$ref": "#/$defs/AnthropicToolSearchResultError"
},
{
"$ref": "#/$defs/AnthropicToolSearchResult"
}
]
},
"AnthropicToolSearchResult": {
"example": {
"tool_references": [
{
"tool_name": "my_tool",
"type": "tool_reference"
}
],
"type": "tool_search_tool_search_result"
},
"properties": {
"tool_references": {
"items": {
"$ref": "#/$defs/AnthropicToolReference"
},
"type": "array"
},
"type": {
"enum": [
"tool_search_tool_search_result"
],
"type": "string"
}
},
"required": [
"tool_references",
"type"
],
"type": "object"
},
"AnthropicToolSearchResultError": {
"example": {
"error_code": "unavailable",
"error_message": null,
"type": "tool_search_tool_result_error"
},
"properties": {
"error_code": {
"$ref": "#/$defs/AnthropicServerToolErrorCode"
},
"error_message": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"tool_search_tool_result_error"
],
"type": "string"
}
},
"required": [
"error_code",
"error_message",
"type"
],
"type": "object"
},
"AnthropicToolSearchToolResult": {
"example": {
"content": {
"tool_references": [
{
"tool_name": "my_tool",
"type": "tool_reference"
}
],
"type": "tool_search_tool_search_result"
},
"tool_use_id": "srvtoolu_01abc",
"type": "tool_search_tool_result"
},
"properties": {
"content": {
"$ref": "#/$defs/AnthropicToolSearchContent"
},
"tool_use_id": {
"type": "string"
},
"type": {
"enum": [
"tool_search_tool_result"
],
"type": "string"
}
},
"required": [
"type",
"content",
"tool_use_id"
],
"type": "object"
},
"AnthropicToolUseBlock": {
"example": {
"caller": {
"type": "direct"
},
"id": "toolu_01abc",
"input": {
"location": "San Francisco"
},
"name": "get_weather",
"type": "tool_use"
},
"properties": {
"caller": {
"$ref": "#/$defs/AnthropicCaller"
},
"id": {
"type": "string"
},
"input": {},
"name": {
"type": "string"
},
"type": {
"enum": [
"tool_use"
],
"type": "string"
}
},
"required": [
"type",
"id",
"caller",
"name"
],
"type": "object"
},
"AnthropicUnknownUsageIteration": {
"allOf": [
{
"$ref": "#/$defs/AnthropicBaseUsageIteration"
},
{
"properties": {
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
],
"example": {
"cache_creation": null,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 100,
"output_tokens": 50,
"type": "unknown"
}
},
"AnthropicUsage": {
"example": {
"cache_creation": null,
"cache_creation_input_tokens": null,
"cache_read_input_tokens": null,
"inference_geo": null,
"input_tokens": 100,
"output_tokens": 50,
"output_tokens_details": null,
"server_tool_use": null,
"service_tier": "standard"
},
"properties": {
"cache_creation": {
"$ref": "#/$defs/AnthropicCacheCreation"
},
"cache_creation_input_tokens": {
"type": [
"integer",
"null"
]
},
"cache_read_input_tokens": {
"type": [
"integer",
"null"
]
},
"inference_geo": {
"type": [
"string",
"null"
]
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"output_tokens_details": {
"$ref": "#/$defs/AnthropicOutputTokensDetails"
},
"server_tool_use": {
"$ref": "#/$defs/AnthropicServerToolUsage"
},
"service_tier": {
"$ref": "#/$defs/AnthropicServiceTier"
}
},
"required": [
"input_tokens",
"output_tokens",
"output_tokens_details",
"cache_creation_input_tokens",
"cache_read_input_tokens",
"cache_creation",
"inference_geo",
"server_tool_use",
"service_tier"
],
"type": "object"
},
"AnthropicUsageIteration": {
"anyOf": [
{
"$ref": "#/$defs/AnthropicCompactionUsageIteration"
},
{
"$ref": "#/$defs/AnthropicMessageUsageIteration"
},
{
"$ref": "#/$defs/AnthropicAdvisorMessageUsageIteration"
},
{
"$ref": "#/$defs/AnthropicUnknownUsageIteration"
}
],
"example": {
"cache_creation": null,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 100,
"output_tokens": 50,
"type": "message"
}
},
"AnthropicWebFetchBlock": {
"example": {
"content": {
"citations": null,
"source": {
"data": "",
"media_type": "text/plain",
"type": "text"
},
"title": null,
"type": "document"
},
"retrieved_at": null,
"type": "web_fetch_result",
"url": "https://example.com"
},
"properties": {
"content": {
"$ref": "#/$defs/AnthropicDocumentBlock"
},
"retrieved_at": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"web_fetch_result"
],
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"content",
"retrieved_at",
"type",
"url"
],
"type": "object"
},
"AnthropicWebFetchContent": {
"discriminator": {
"mapping": {
"web_fetch_result": "#/components/schemas/AnthropicWebFetchBlock",
"web_fetch_tool_result_error": "#/components/schemas/AnthropicWebFetchToolResultError"
},
"propertyName": "type"
},
"example": {
"content": {
"citations": null,
"source": {
"data": "",
"media_type": "text/plain",
"type": "text"
},
"title": null,
"type": "document"
},
"retrieved_at": null,
"type": "web_fetch_result",
"url": "https://example.com"
},
"oneOf": [
{
"$ref": "#/$defs/AnthropicWebFetchToolResultError"
},
{
"$ref": "#/$defs/AnthropicWebFetchBlock"
}
]
},
"AnthropicWebFetchToolResult": {
"example": {
"caller": {
"type": "direct"
},
"content": {
"content": {
"citations": null,
"source": {
"data": "",
"media_type": "text/plain",
"type": "text"
},
"title": null,
"type": "document"
},
"retrieved_at": null,
"type": "web_fetch_result",
"url": "https://example.com"
},
"tool_use_id": "srvtoolu_01abc",
"type": "web_fetch_tool_result"
},
"properties": {
"caller": {
"$ref": "#/$defs/AnthropicCaller"
},
"content": {
"$ref": "#/$defs/AnthropicWebFetchContent"
},
"tool_use_id": {
"type": "string"
},
"type": {
"enum": [
"web_fetch_tool_result"
],
"type": "string"
}
},
"required": [
"type",
"caller",
"content",
"tool_use_id"
],
"type": "object"
},
"AnthropicWebFetchToolResultError": {
"example": {
"error_code": "unavailable",
"type": "web_fetch_tool_result_error"
},
"properties": {
"error_code": {
"enum": [
"content_too_large",
"invalid_tool_input",
"url_too_long",
"url_not_allowed",
"url_not_in_prior_context",
"url_not_accessible",
"unsupported_content_type",
"too_many_requests",
"max_uses_exceeded",
"unavailable"
],
"type": "string",
"x-speakeasy-unknown-values": "allow"
},
"type": {
"enum": [
"web_fetch_tool_result_error"
],
"type": "string"
}
},
"required": [
"type",
"error_code"
],
"type": "object"
},
"AnthropicWebSearchResult": {
"example": {
"encrypted_content": "enc_content_0",
"page_age": null,
"title": "Example Page",
"type": "web_search_result",
"url": "https://example.com"
},
"properties": {
"encrypted_content": {
"type": "string"
},
"page_age": {
"type": [
"string",
"null"
]
},
"title": {
"type": "string"
},
"type": {
"enum": [
"web_search_result"
],
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"type",
"encrypted_content",
"page_age",
"title",
"url"
],
"type": "object"
},
"AnthropicWebSearchToolResult": {
"example": {
"caller": {
"type": "direct"
},
"content": [],
"tool_use_id": "srvtoolu_01abc",
"type": "web_search_tool_result"
},
"properties": {
"caller": {
"$ref": "#/$defs/AnthropicCaller"
},
"content": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/AnthropicWebSearchResult"
},
"type": "array"
},
{
"$ref": "#/$defs/AnthropicWebSearchToolResultError"
}
]
},
"tool_use_id": {
"type": "string"
},
"type": {
"enum": [
"web_search_tool_result"
],
"type": "string"
}
},
"required": [
"type",
"caller",
"tool_use_id",
"content"
],
"type": "object"
},
"AnthropicWebSearchToolResultError": {
"example": {
"error_code": "unavailable",
"type": "web_search_tool_result_error"
},
"properties": {
"error_code": {
"enum": [
"invalid_tool_input",
"unavailable",
"max_uses_exceeded",
"too_many_requests",
"query_too_long",
"request_too_large"
],
"type": "string",
"x-speakeasy-unknown-values": "allow"
},
"type": {
"enum": [
"web_search_tool_result_error"
],
"type": "string"
}
},
"required": [
"type",
"error_code"
],
"type": "object"
},
"BaseMessagesResult": {
"description": "Base Anthropic Messages API response before OpenRouter extensions",
"example": {
"container": null,
"content": [
{
"citations": [],
"text": "Hello!",
"type": "text"
}
],
"id": "msg_01XFDUDYJgAACzvnptvVoYEL",
"model": "claude-sonnet-4-5-20250929",
"role": "assistant",
"stop_details": null,
"stop_reason": "end_turn",
"stop_sequence": null,
"type": "message",
"usage": {
"cache_creation": null,
"cache_creation_input_tokens": null,
"cache_read_input_tokens": null,
"inference_geo": null,
"input_tokens": 12,
"output_tokens": 8,
"output_tokens_details": null,
"server_tool_use": null,
"service_tier": "standard"
}
},
"properties": {
"container": {
"$ref": "#/$defs/AnthropicContainer"
},
"content": {
"items": {
"$ref": "#/$defs/ORAnthropicContentBlock"
},
"type": "array"
},
"id": {
"type": "string"
},
"input_transformations": {
"items": {
"$ref": "#/$defs/AnthropicInputTransformation"
},
"type": [
"array",
"null"
]
},
"model": {
"type": "string"
},
"role": {
"enum": [
"assistant"
],
"type": "string"
},
"stop_details": {
"$ref": "#/$defs/AnthropicRefusalStopDetails"
},
"stop_reason": {
"$ref": "#/$defs/ORAnthropicStopReason"
},
"stop_sequence": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"message"
],
"type": "string"
},
"usage": {
"allOf": [
{
"$ref": "#/$defs/AnthropicUsage"
},
{
"properties": {
"iterations": {
"items": {
"$ref": "#/$defs/AnthropicUsageIteration"
},
"type": "array"
},
"speed": {
"$ref": "#/$defs/AnthropicSpeed"
}
},
"type": "object"
}
],
"example": {
"cache_creation": null,
"cache_creation_input_tokens": null,
"cache_read_input_tokens": null,
"inference_geo": null,
"input_tokens": 100,
"output_tokens": 50,
"output_tokens_details": null,
"server_tool_use": null,
"service_tier": "standard"
}
}
},
"required": [
"id",
"type",
"role",
"container",
"content",
"model",
"stop_reason",
"stop_details",
"stop_sequence",
"usage"
],
"type": "object"
},
"CostDetails": {
"description": "Breakdown of upstream inference costs",
"example": {
"upstream_inference_completions_cost": 0.0004,
"upstream_inference_cost": null,
"upstream_inference_prompt_cost": 0.0008
},
"properties": {
"server_tool_cost": {
"description": "Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly. 0 when a metered server tool ran but settled at zero dollars; absent when no metered server tool ran.",
"format": "double",
"type": [
"number",
"null"
]
},
"upstream_inference_completions_cost": {
"format": "double",
"type": "number"
},
"upstream_inference_cost": {
"format": "double",
"type": [
"number",
"null"
]
},
"upstream_inference_prompt_cost": {
"format": "double",
"type": "number"
}
},
"required": [
"upstream_inference_prompt_cost",
"upstream_inference_completions_cost"
],
"type": [
"object",
"null"
]
},
"EndpointInfo": {
"example": {
"model": "openai/gpt-4o",
"provider": "OpenAI",
"selected": true
},
"properties": {
"model": {
"type": "string"
},
"provider": {
"type": "string"
},
"selected": {
"type": "boolean"
}
},
"required": [
"provider",
"model",
"selected"
],
"type": "object"
},
"EndpointsMetadata": {
"example": {
"available": [
{
"model": "openai/gpt-4o",
"provider": "OpenAI",
"selected": true
}
],
"total": 3
},
"properties": {
"available": {
"items": {
"$ref": "#/$defs/EndpointInfo"
},
"type": "array"
},
"total": {
"type": "integer"
}
},
"required": [
"total",
"available"
],
"type": "object"
},
"ORAnthropicBashToolResult": {
"description": "Output of an `openrouter:bash` call executed in the OpenRouter sandbox (`engine: 'openrouter'`)",
"example": {
"content": {
"command": "ls",
"exitCode": 0,
"stderr": "",
"stdout": "README.md\n"
},
"tool_use_id": "srvtoolu_01abc",
"type": "openrouter_bash_tool_result"
},
"properties": {
"container_id": {
"description": "The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.",
"type": "string"
},
"content": {
"additionalProperties": {},
"type": "object"
},
"files": {
"description": "Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.",
"items": {
"properties": {
"container_id": {
"type": "string"
},
"end_index": {
"type": "integer"
},
"file_id": {
"type": "string"
},
"filename": {
"type": "string"
},
"start_index": {
"type": "integer"
},
"type": {
"enum": [
"container_file_citation"
],
"type": "string"
}
},
"required": [
"type",
"container_id",
"file_id",
"filename",
"start_index",
"end_index"
],
"type": "object"
},
"type": "array"
},
"tool_use_id": {
"type": "string"
},
"type": {
"enum": [
"openrouter_bash_tool_result"
],
"type": "string"
}
},
"required": [
"type",
"tool_use_id",
"content"
],
"type": "object"
},
"ORAnthropicContentBlock": {
"discriminator": {
"mapping": {
"advisor_tool_result": "#/components/schemas/AnthropicAdvisorToolResult",
"bash_code_execution_tool_result": "#/components/schemas/AnthropicBashCodeExecutionToolResult",
"code_execution_tool_result": "#/components/schemas/AnthropicCodeExecutionToolResult",
"compaction": "#/components/schemas/AnthropicCompactionBlock",
"container_upload": "#/components/schemas/AnthropicContainerUpload",
"openrouter_bash_tool_result": "#/components/schemas/ORAnthropicBashToolResult",
"openrouter_shell_tool_result": "#/components/schemas/ORAnthropicShellToolResult",
"openrouter_tool_search_result": "#/components/schemas/ORAnthropicToolSearchResult",
"redacted_thinking": "#/components/schemas/AnthropicRedactedThinkingBlock",
"server_tool_use": "#/components/schemas/ORAnthropicServerToolUseBlock",
"text": "#/components/schemas/AnthropicTextBlock",
"text_editor_code_execution_tool_result": "#/components/schemas/AnthropicTextEditorCodeExecutionToolResult",
"thinking": "#/components/schemas/AnthropicThinkingBlock",
"tool_search_tool_result": "#/components/schemas/AnthropicToolSearchToolResult",
"tool_use": "#/components/schemas/AnthropicToolUseBlock",
"web_fetch_tool_result": "#/components/schemas/AnthropicWebFetchToolResult",
"web_search_tool_result": "#/components/schemas/AnthropicWebSearchToolResult"
},
"propertyName": "type"
},
"example": {
"citations": null,
"text": "Hello, world!",
"type": "text"
},
"oneOf": [
{
"$ref": "#/$defs/AnthropicTextBlock"
},
{
"$ref": "#/$defs/AnthropicToolUseBlock"
},
{
"$ref": "#/$defs/AnthropicThinkingBlock"
},
{
"$ref": "#/$defs/AnthropicRedactedThinkingBlock"
},
{
"$ref": "#/$defs/ORAnthropicServerToolUseBlock"
},
{
"$ref": "#/$defs/AnthropicWebSearchToolResult"
},
{
"$ref": "#/$defs/AnthropicWebFetchToolResult"
},
{
"$ref": "#/$defs/AnthropicCodeExecutionToolResult"
},
{
"$ref": "#/$defs/AnthropicBashCodeExecutionToolResult"
},
{
"$ref": "#/$defs/AnthropicTextEditorCodeExecutionToolResult"
},
{
"$ref": "#/$defs/AnthropicToolSearchToolResult"
},
{
"$ref": "#/$defs/AnthropicContainerUpload"
},
{
"$ref": "#/$defs/AnthropicCompactionBlock"
},
{
"$ref": "#/$defs/AnthropicAdvisorToolResult"
},
{
"$ref": "#/$defs/ORAnthropicShellToolResult"
},
{
"$ref": "#/$defs/ORAnthropicBashToolResult"
},
{
"$ref": "#/$defs/ORAnthropicToolSearchResult"
}
]
},
"ORAnthropicNullableCaller": {
"discriminator": {
"mapping": {
"code_execution_20250825": "#/components/schemas/AnthropicCodeExecution20250825Caller",
"code_execution_20260120": "#/components/schemas/AnthropicCodeExecution20260120Caller",
"direct": "#/components/schemas/AnthropicDirectCaller"
},
"propertyName": "type"
},
"example": {
"type": "direct"
},
"oneOf": [
{
"$ref": "#/$defs/AnthropicDirectCaller"
},
{
"$ref": "#/$defs/AnthropicCodeExecution20250825Caller"
},
{
"$ref": "#/$defs/AnthropicCodeExecution20260120Caller"
},
{
"type": "null"
}
]
},
"ORAnthropicServerToolUsage": {
"example": {
"tool_calls_executed": 1,
"tool_calls_requested": 1,
"web_fetch_requests": 0,
"web_search_requests": 0
},
"properties": {
"tool_calls_executed": {
"type": "integer"
},
"tool_calls_requested": {
"type": "integer"
},
"web_fetch_requests": {
"type": "integer"
},
"web_search_requests": {
"type": "integer"
}
},
"required": [
"web_search_requests",
"web_fetch_requests"
],
"type": [
"object",
"null"
]
},
"ORAnthropicServerToolUseBlock": {
"example": {
"caller": {
"type": "direct"
},
"id": "srvtoolu_01abc",
"input": {},
"name": "advisor",
"type": "server_tool_use"
},
"properties": {
"caller": {
"$ref": "#/$defs/ORAnthropicNullableCaller"
},
"id": {
"type": "string"
},
"input": {},
"name": {
"type": "string"
},
"type": {
"enum": [
"server_tool_use"
],
"type": "string"
}
},
"required": [
"type",
"id",
"name"
],
"type": "object"
},
"ORAnthropicShellToolResult": {
"description": "Output of an `openrouter:shell` call executed in the OpenRouter sandbox",
"example": {
"content": {
"output": [
{
"outcome": {
"exit_code": 0,
"type": "exit"
},
"stderr": "",
"stdout": "README.md\n"
}
]
},
"tool_use_id": "srvtoolu_01abc",
"type": "openrouter_shell_tool_result"
},
"properties": {
"container_id": {
"description": "The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.",
"type": "string"
},
"content": {
"additionalProperties": {},
"type": "object"
},
"files": {
"description": "Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.",
"items": {
"properties": {
"container_id": {
"type": "string"
},
"end_index": {
"type": "integer"
},
"file_id": {
"type": "string"
},
"filename": {
"type": "string"
},
"start_index": {
"type": "integer"
},
"type": {
"enum": [
"container_file_citation"
],
"type": "string"
}
},
"required": [
"type",
"container_id",
"file_id",
"filename",
"start_index",
"end_index"
],
"type": "object"
},
"type": "array"
},
"tool_use_id": {
"type": "string"
},
"type": {
"enum": [
"openrouter_shell_tool_result"
],
"type": "string"
}
},
"required": [
"type",
"tool_use_id",
"content"
],
"type": "object"
},
"ORAnthropicStopReason": {
"enum": [
"end_turn",
"max_tokens",
"model_context_window_exceeded",
"stop_sequence",
"tool_use",
"pause_turn",
"refusal",
"compaction",
null
],
"example": "end_turn",
"type": [
"string",
"null"
],
"x-speakeasy-unknown-values": "allow"
},
"ORAnthropicToolSearchResult": {
"description": "Router-owned deferred discovery result containing original selected tool definitions.",
"example": {
"content": {
"matches": []
},
"tool_use_id": "search",
"type": "openrouter_tool_search_result"
},
"properties": {
"content": {
"additionalProperties": {},
"type": "object"
},
"tool_use_id": {
"type": "string"
},
"type": {
"enum": [
"openrouter_tool_search_result"
],
"type": "string"
}
},
"required": [
"type",
"tool_use_id",
"content"
],
"type": "object"
},
"OpenRouterMetadata": {
"example": {
"attempt": 1,
"endpoints": {
"available": [
{
"model": "openai/gpt-4o",
"provider": "OpenAI",
"selected": true
}
],
"total": 1
},
"generation_time": 2016,
"is_byok": false,
"region": "iad",
"requested": "openai/gpt-4o",
"strategy": "direct",
"summary": "available=1, selected=OpenAI"
},
"properties": {
"attempt": {
"type": "integer"
},
"attempts": {
"items": {
"$ref": "#/$defs/RouterAttempt"
},
"type": "array"
},
"endpoints": {
"$ref": "#/$defs/EndpointsMetadata"
},
"generation_time": {
"description": "Milliseconds measured for the generation, from dispatching the upstream request until its response body ended. Divide the completion token count by this for throughput. Absent when no upstream request was dispatched.",
"example": 2016,
"type": "integer"
},
"is_byok": {
"type": "boolean"
},
"params": {
"$ref": "#/$defs/RouterParams"
},
"pipeline": {
"items": {
"$ref": "#/$defs/PipelineStage"
},
"type": "array"
},
"region": {
"type": [
"string",
"null"
]
},
"requested": {
"type": "string"
},
"strategy": {
"$ref": "#/$defs/RoutingStrategy"
},
"summary": {
"type": "string"
}
},
"required": [
"requested",
"strategy",
"region",
"summary",
"attempt",
"is_byok",
"endpoints"
],
"type": "object"
},
"PipelineStage": {
"example": {
"data": {
"action": "redacted",
"engines": [
"presidio"
],
"flagged": true,
"matched_entity_types": [
"EMAIL",
"PHONE"
]
},
"name": "content-filter",
"summary": "PII redacted via Presidio (EMAIL, PHONE)",
"type": "guardrail"
},
"properties": {
"cost_usd": {
"format": "double",
"type": [
"number",
"null"
]
},
"data": {
"additionalProperties": {},
"type": "object"
},
"guardrail_id": {
"type": "string"
},
"guardrail_scope": {
"type": "string"
},
"name": {
"type": "string"
},
"summary": {
"type": "string"
},
"type": {
"$ref": "#/$defs/PipelineStageType"
}
},
"required": [
"type",
"name"
],
"type": "object"
},
"PipelineStageType": {
"description": "Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it.",
"enum": [
"guardrail",
"plugin",
"server_tools",
"response_healing",
"context_compression"
],
"example": "guardrail",
"type": "string",
"x-speakeasy-unknown-values": "allow"
},
"RouterAttempt": {
"example": {
"model": "openai/gpt-4o",
"provider": "OpenAI",
"status": 200
},
"properties": {
"model": {
"type": "string"
},
"provider": {
"type": "string"
},
"status": {
"type": "integer"
}
},
"required": [
"provider",
"model",
"status"
],
"type": "object"
},
"RouterParams": {
"additionalProperties": {},
"example": {
"version_group": "anthropic/claude-sonnet-4"
},
"properties": {
"quality_floor": {
"format": "double",
"type": "number"
},
"throughput_floor": {
"format": "double",
"type": "number"
},
"version_group": {
"type": "string"
}
},
"type": "object"
},
"RoutingStrategy": {
"enum": [
"direct",
"auto",
"free",
"latest",
"alias",
"fallback",
"pareto",
"bodybuilder",
"fusion"
],
"example": "direct",
"type": "string",
"x-speakeasy-unknown-values": "allow"
}
}
}
}Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"openrouter","endpointId":"messages","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}