GET

/v1/schemas/openrouter/chat/messages?kind=output

kind outputactivity chathash dd726226extracted Jul 26, 2026version currentsource upstream spec ↗

Response body

0 properties · 0 required · 0 $defs

This schema isn’t a plain object with properties — showing the raw JSON instead.

application/json
{
  "provider": "openrouter",
  "activity": "chat",
  "endpointId": "messages",
  "kind": "output",
  "contentHash": "dd7262260931cbdf92d5450fd2ec2e61819f6b62a00a1c2b5a4b02925419d077",
  "specRevision": null,
  "provenance": {
    "sourceUrl": "https://openrouter.ai/openapi.json",
    "sourceHash": "649f05d6444b17beb599bba6b64bc474d28da969f3963db41c4146aaf664c0bb",
    "fetchedAt": 1785042124,
    "extractorVersion": "1"
  },
  "createdAt": 1785042124,
  "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": {
            "$ref": "#/$defs/ProviderName"
          },
          "usage": {
            "allOf": [
              {
                "$ref": "#/$defs/AnthropicUsage"
              },
              {
                "properties": {
                  "cost": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "cost_details": {
                    "$ref": "#/$defs/CostDetails"
                  },
                  "is_byok": {
                    "type": "boolean"
                  },
                  "iterations": {
                    "items": {
                      "$ref": "#/$defs/AnthropicUsageIteration"
                    },
                    "type": "array"
                  },
                  "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"
        },
        "properties": {
          "expires_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "expires_at"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "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"
      },
      "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",
              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"
        ]
      },
      "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": [
              "invalid_tool_input",
              "url_too_long",
              "url_not_allowed",
              "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"
          },
          "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": {
          "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"
      },
      "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",
            "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"
          }
        ]
      },
      "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"
          }
        ]
      },
      "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"
      },
      "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"
      },
      "OpenRouterMetadata": {
        "example": {
          "attempt": 1,
          "endpoints": {
            "available": [
              {
                "model": "openai/gpt-4o",
                "provider": "OpenAI",
                "selected": true
              }
            ],
            "total": 1
          },
          "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"
          },
          "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"
      },
      "ProviderName": {
        "enum": [
          "AkashML",
          "AI21",
          "AionLabs",
          "Alibaba",
          "Ambient",
          "Baidu",
          "Amazon Bedrock",
          "Amazon Nova",
          "Anthropic",
          "Arcee AI",
          "AtlasCloud",
          "Avian",
          "Azure",
          "BaseTen",
          "BytePlus",
          "Black Forest Labs",
          "Cerebras",
          "Chutes",
          "Cirrascale",
          "Clarifai",
          "Cloudflare",
          "Cohere",
          "CoreWeave",
          "Crucible",
          "Crusoe",
          "Darkbloom",
          "Decart",
          "Deepgram",
          "DeepInfra",
          "DeepSeek",
          "DekaLLM",
          "DigitalOcean",
          "Featherless",
          "Fireworks",
          "Fish Audio",
          "Friendli",
          "GMICloud",
          "Google",
          "Google AI Studio",
          "Groq",
          "HeyGen",
          "Inception",
          "Inceptron",
          "InferenceNet",
          "Ionstream",
          "Infermatic",
          "Io Net",
          "Inferact vLLM",
          "Inflection",
          "Liquid",
          "Mara",
          "Mancer 2",
          "Meta",
          "Minimax",
          "ModelRun",
          "Mistral",
          "Modular",
          "Moonshot AI",
          "Morph",
          "VoyageAI by MongoDB",
          "NCompass",
          "Nebius",
          "Nex AGI",
          "NextBit",
          "Novita",
          "Nvidia",
          "OpenAI",
          "OpenInference",
          "Parasail",
          "Poolside",
          "Perceptron",
          "Perplexity",
          "Phala",
          "Recraft",
          "Reka",
          "Relace",
          "Sail Research",
          "Sakana AI",
          "SambaNova",
          "Seed",
          "SiliconFlow",
          "Sourceful",
          "StepFun",
          "Stealth",
          "StreamLake",
          "Switchpoint",
          "Tencent",
          "Tenstorrent",
          "Together",
          "Upstage",
          "Venice",
          "Wafer",
          "WandB",
          "Quiver",
          "Krea",
          "Runway",
          "Xiaomi",
          "xAI",
          "Z.AI",
          "FakeProvider"
        ],
        "example": "OpenAI",
        "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 tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"openrouter","endpointId":"messages","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}