{
  "openapi": "3.1.0",
  "info": {
    "title": "SeedRouter Claude Opus 5.5",
    "version": "1.0.0",
    "description": "The official Anthropic Messages API under the SeedRouter base URL: change the base URL and API key. The same model also answers the OpenAI Chat Completions and Responses formats. Failed requests are not charged."
  },
  "servers": [
    {
      "url": "https://api.seedrouter.ai/v1"
    }
  ],
  "security": [
    {
      "apiKeyHeader": []
    },
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/messages": {
      "post": {
        "summary": "Create a message (Anthropic Messages API)",
        "operationId": "createMessage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The message, or a server-sent event stream when stream is true.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Public error in the Anthropic shape.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "const": "error"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_api_key",
                            "permission_denied",
                            "invalid_request_error",
                            "insufficient_quota",
                            "model_not_found",
                            "task_not_found",
                            "content_policy_violation",
                            "generation_failed",
                            "no_output",
                            "delivery_failed",
                            "service_unavailable",
                            "rate_limited",
                            "submission_unknown",
                            "task_expired"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Public error in the Anthropic shape.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "const": "error"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_api_key",
                            "permission_denied",
                            "invalid_request_error",
                            "insufficient_quota",
                            "model_not_found",
                            "task_not_found",
                            "content_policy_violation",
                            "generation_failed",
                            "no_output",
                            "delivery_failed",
                            "service_unavailable",
                            "rate_limited",
                            "submission_unknown",
                            "task_expired"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Public error in the Anthropic shape.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "const": "error"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_api_key",
                            "permission_denied",
                            "invalid_request_error",
                            "insufficient_quota",
                            "model_not_found",
                            "task_not_found",
                            "content_policy_violation",
                            "generation_failed",
                            "no_output",
                            "delivery_failed",
                            "service_unavailable",
                            "rate_limited",
                            "submission_unknown",
                            "task_expired"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Public error in the Anthropic shape.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "const": "error"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_api_key",
                            "permission_denied",
                            "invalid_request_error",
                            "insufficient_quota",
                            "model_not_found",
                            "task_not_found",
                            "content_policy_violation",
                            "generation_failed",
                            "no_output",
                            "delivery_failed",
                            "service_unavailable",
                            "rate_limited",
                            "submission_unknown",
                            "task_expired"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Public error in the Anthropic shape.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "const": "error"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_api_key",
                            "permission_denied",
                            "invalid_request_error",
                            "insufficient_quota",
                            "model_not_found",
                            "task_not_found",
                            "content_policy_violation",
                            "generation_failed",
                            "no_output",
                            "delivery_failed",
                            "service_unavailable",
                            "rate_limited",
                            "submission_unknown",
                            "task_expired"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chat/completions": {
      "post": {
        "summary": "Create a chat completion (OpenAI Chat Completions format)",
        "operationId": "createChatCompletion",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model"
                ],
                "additionalProperties": true,
                "description": "The OpenAI Chat Completions body; converted to this model.",
                "properties": {
                  "model": {
                    "type": "string",
                    "enum": [
                      "claude-opus-5-5"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A chat completion, or a stream."
          },
          "400": {
            "description": "Public error; no infrastructure details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Public error; no infrastructure details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Public error; no infrastructure details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Public error; no infrastructure details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/responses": {
      "post": {
        "summary": "Create a response (OpenAI Responses format)",
        "operationId": "createResponse",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model"
                ],
                "additionalProperties": true,
                "description": "The OpenAI Responses body; converted to this model.",
                "properties": {
                  "model": {
                    "type": "string",
                    "enum": [
                      "claude-opus-5-5"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A response object, or a stream."
          },
          "400": {
            "description": "Public error; no infrastructure details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Public error; no infrastructure details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Public error; no infrastructure details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Public error; no infrastructure details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "MessagesRequest": {
        "type": "object",
        "required": [
          "model",
          "max_tokens",
          "messages"
        ],
        "additionalProperties": true,
        "description": "The official Messages request body. Every field is forwarded as sent.",
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "claude-opus-5-5"
            ]
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 128000,
            "description": "Required. 0 only pre-warms the prompt cache without a response."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "role",
                "content"
              ],
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant"
                  ]
                },
                "content": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type"
                        ],
                        "additionalProperties": true,
                        "description": "A content block: text, image, document, tool_use, tool_result, thinking and the other official block types.",
                        "properties": {
                          "type": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "system": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "type"
                  ],
                  "additionalProperties": true,
                  "description": "A content block: text, image, document, tool_use, tool_result, thinking and the other official block types.",
                  "properties": {
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          },
          "thinking": {
            "type": "object",
            "description": "This model uses adaptive thinking; set display to choose whether a summary is returned.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "adaptive"
                ]
              },
              "display": {
                "type": "string",
                "enum": [
                  "summarized",
                  "omitted"
                ],
                "default": "omitted"
              }
            }
          },
          "output_config": {
            "type": "object",
            "properties": {
              "effort": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "xhigh",
                  "max"
                ],
                "default": "medium"
              },
              "format": {
                "anyOf": [
                  {
                    "type": "object",
                    "additionalProperties": true
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "stop_sequences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "temperature": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "top_p": {
            "type": "number",
            "minimum": 0.99,
            "maximum": 1
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "tool_choice": {
            "type": "object",
            "additionalProperties": true
          },
          "metadata": {
            "type": "object",
            "properties": {
              "user_id": {
                "type": "string",
                "maxLength": 512
              }
            }
          },
          "cache_control": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "container": {},
          "context_management": {
            "type": "object",
            "additionalProperties": true
          },
          "mcp_servers": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "service_tier": {
            "type": "string",
            "enum": [
              "auto",
              "standard_only"
            ]
          },
          "inference_geo": {
            "type": [
              "string",
              "null"
            ]
          },
          "speed": {
            "type": "string"
          },
          "diagnostics": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Message": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "const": "message"
          },
          "role": {
            "const": "assistant"
          },
          "model": {
            "type": "string"
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type"
              ],
              "additionalProperties": true,
              "description": "A content block: text, image, document, tool_use, tool_result, thinking and the other official block types.",
              "properties": {
                "type": {
                  "type": "string"
                }
              }
            }
          },
          "stop_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "stop_sequence": {
            "type": [
              "string",
              "null"
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "input_tokens": {
                "type": "integer"
              },
              "output_tokens": {
                "type": "integer"
              },
              "cache_read_input_tokens": {
                "type": "integer"
              },
              "cache_creation_input_tokens": {
                "type": "integer"
              },
              "cache_creation": {
                "type": "object",
                "properties": {
                  "ephemeral_5m_input_tokens": {
                    "type": "integer"
                  },
                  "ephemeral_1h_input_tokens": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              10001,
              10002,
              20001,
              20002,
              30001,
              30002,
              50001,
              50002,
              50003,
              60001,
              60002,
              60003,
              60004,
              90001
            ]
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}
