{
  "openapi": "3.1.0",
  "info": {
    "title": "MiniMax-M3.1-Flash text generation",
    "version": "2026-10-20",
    "description": "Official MiniMax request contract, with model-specific guide constraints. Native Chat, Messages and Responses; generated from the linked official OpenAPI schemas. Unsupported top-level fields are discarded by SeedRouter."
  },
  "servers": [
    {
      "url": "https://api.seedrouter.ai"
    }
  ],
  "x-official-sources": [
    "https://platform.minimax.io/docs/api-reference/text/api/openapi-chat-openai.json",
    "https://platform.minimax.io/docs/api-reference/text/api/openapi-chat-anthropic.json",
    "https://platform.minimax.io/docs/api-reference/text/api/openapi-responses.json",
    "https://platform.minimax.io/docs/api-reference/text-openai-api",
    "https://platform.minimax.io/docs/api-reference/text-anthropic-api",
    "https://platform.minimax.io/docs/guides/text-m3-function-call"
  ],
  "paths": {
    "/v1/chat/completions": {
      "post": {
        "summary": "Text Generation OpenAI",
        "operationId": "chatCompletionOpenAI",
        "tags": [
          "Text Generation"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatChatCompletionReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatChatCompletionResp"
                }
              },
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ChatChatCompletionChunk"
                }
              }
            },
            "description": "Successful response"
          }
        }
      }
    },
    "/v1/messages": {
      "post": {
        "summary": "Text Generation Anthropic",
        "operationId": "chatCompletionAnthropic",
        "tags": [
          "Text Generation"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesCreateMessageReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesCreateMessageResp"
                }
              },
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesStreamEvent"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesErrorResponse"
                }
              }
            },
            "description": "API error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesErrorResponse"
                }
              }
            },
            "description": "API error"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesErrorResponse"
                }
              }
            },
            "description": "API error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesErrorResponse"
                }
              }
            },
            "description": "API error"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesErrorResponse"
                }
              }
            },
            "description": "API error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesErrorResponse"
                }
              }
            },
            "description": "API error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesErrorResponse"
                }
              }
            },
            "description": "API error"
          },
          "529": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesErrorResponse"
                }
              }
            },
            "description": "API error"
          }
        },
        "security": [
          {
            "BearerKey": []
          },
          {
            "AnthropicKey": []
          }
        ]
      }
    },
    "/v1/responses": {
      "post": {
        "summary": "Create Response",
        "operationId": "createResponse",
        "tags": [
          "Responses"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponsesCreateResponseReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponsesCreateResponseResp"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ChatChatCompletionReq": {
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "MiniMax-M3.1-Flash"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            },
            "minItems": 1
          },
          "thinking": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "adaptive"
                ],
                "default": "adaptive"
              }
            },
            "required": []
          },
          "reasoning_effort": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "xhigh",
              "max"
            ]
          },
          "reasoning_split": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "stream_options": {
            "type": "object",
            "properties": {
              "include_usage": {
                "type": "boolean",
                "default": false
              }
            }
          },
          "max_completion_tokens": {
            "type": "integer",
            "minimum": 1,
            "maximum": 524288
          },
          "temperature": {
            "type": "number",
            "default": 1
          },
          "top_p": {
            "type": "number",
            "maximum": 1,
            "default": 0.95,
            "exclusiveMinimum": 0
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "function"
                  ]
                },
                "function": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object"
                    },
                    "description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "parameters"
                  ]
                }
              },
              "required": [
                "type",
                "function"
              ]
            }
          },
          "max_tokens": {
            "type": "integer",
            "deprecated": true,
            "minimum": 1,
            "maximum": 524288
          },
          "n": {
            "type": "integer",
            "enum": [
              1
            ]
          }
        }
      },
      "ChatChatCompletionResp": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "type": "string",
                  "enum": [
                    "stop",
                    "length",
                    "content_filter",
                    "tool_calls"
                  ]
                },
                "index": {
                  "type": "integer"
                },
                "message": {
                  "type": "object",
                  "required": [
                    "content",
                    "role"
                  ],
                  "properties": {
                    "content": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ChatToolCall"
                      }
                    }
                  }
                }
              }
            }
          },
          "created": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion",
              "chat.completion.chunk"
            ]
          },
          "usage": {
            "$ref": "#/components/schemas/ChatUsage"
          },
          "input_sensitive": {
            "type": "boolean"
          },
          "input_sensitive_type": {
            "type": "integer"
          },
          "output_sensitive": {
            "type": "boolean"
          },
          "output_sensitive_type": {
            "type": "integer"
          },
          "base_resp": {
            "type": "object",
            "properties": {
              "status_code": {
                "type": "integer"
              },
              "status_msg": {
                "type": "string"
              }
            }
          }
        }
      },
      "ChatMessage": {
        "type": "object",
        "required": [
          "role"
        ],
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "system",
              "user",
              "assistant",
              "tool"
            ]
          },
          "name": {
            "type": "string"
          },
          "content": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ChatMessageContentPart"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatToolCall"
            }
          },
          "tool_call_id": {
            "type": "string"
          },
          "reasoning_content": {
            "type": "string"
          }
        }
      },
      "ChatMessageContentPart": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text",
              "image_url",
              "video_url"
            ]
          },
          "text": {
            "type": "string"
          },
          "image_url": {
            "type": "object",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "detail": {
                "type": "string",
                "enum": [
                  "low",
                  "default",
                  "high"
                ],
                "default": "default"
              },
              "max_long_side_pixel": {
                "type": "integer",
                "minimum": 1
              }
            }
          },
          "video_url": {
            "type": "object",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "detail": {
                "type": "string",
                "enum": [
                  "low",
                  "default",
                  "high"
                ],
                "default": "default"
              },
              "fps": {
                "type": "number",
                "minimum": 0.2,
                "maximum": 5,
                "default": 1
              },
              "max_long_side_pixel": {
                "type": "integer",
                "minimum": 1
              }
            }
          }
        }
      },
      "ChatToolCall": {
        "type": "object",
        "required": [
          "id",
          "type",
          "function"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "function"
            ]
          },
          "function": {
            "type": "object",
            "required": [
              "name",
              "arguments"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "arguments": {
                "type": "string"
              }
            }
          }
        }
      },
      "ChatUsage": {
        "type": "object",
        "properties": {
          "total_tokens": {
            "type": "integer"
          }
        }
      },
      "ChatChatCompletionChunk": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer"
                },
                "delta": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "content": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "type": "string"
                    }
                  }
                },
                "finish_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "created": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion.chunk"
            ]
          },
          "usage": {
            "$ref": "#/components/schemas/ChatUsage"
          },
          "input_sensitive_type": {
            "type": "integer"
          },
          "output_sensitive": {
            "type": "boolean"
          },
          "output_sensitive_type": {
            "type": "integer"
          }
        }
      },
      "MessagesCreateMessageReq": {
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "MiniMax-M3.1-Flash"
            ]
          },
          "system": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "text"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "cache_control": {
                      "$ref": "#/components/schemas/MessagesCacheControl"
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                }
              }
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessagesMessage"
            },
            "minItems": 1
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 1,
            "maximum": 524288
          },
          "temperature": {
            "type": "number",
            "default": 1
          },
          "top_p": {
            "type": "number",
            "maximum": 1,
            "default": 0.95,
            "exclusiveMinimum": 0
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessagesTool"
            }
          },
          "tool_choice": {
            "$ref": "#/components/schemas/MessagesToolChoice"
          },
          "thinking": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "adaptive"
                ]
              }
            },
            "required": []
          },
          "output_config": {
            "type": "object",
            "properties": {
              "effort": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "xhigh",
                  "max"
                ]
              }
            },
            "required": []
          },
          "metadata": {
            "type": "object",
            "properties": {
              "user_id": {
                "type": "string"
              }
            }
          }
        }
      },
      "MessagesCreateMessageResp": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "message"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "assistant"
            ]
          },
          "model": {
            "type": "string"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessagesResponseContentBlock"
            }
          },
          "stop_reason": {
            "type": "string",
            "enum": [
              "end_turn",
              "max_tokens",
              "tool_use"
            ]
          },
          "usage": {
            "$ref": "#/components/schemas/MessagesUsage"
          }
        }
      },
      "MessagesMessage": {
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "user",
              "assistant",
              "user_system",
              "group",
              "sample_message_user",
              "sample_message_ai"
            ]
          },
          "content": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MessagesRequestContentBlock"
                }
              }
            ]
          }
        }
      },
      "MessagesRequestContentBlock": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "video",
              "tool_use",
              "tool_result",
              "thinking",
              "mid_conv_system"
            ]
          },
          "text": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/MessagesMediaSource"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "input": {
            "type": "object"
          },
          "tool_use_id": {
            "type": "string"
          },
          "content": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MessagesRequestContentBlock"
                }
              }
            ]
          },
          "thinking": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          }
        }
      },
      "MessagesResponseContentBlock": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text",
              "tool_use",
              "thinking"
            ]
          },
          "text": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "input": {
            "type": "object"
          },
          "thinking": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          }
        }
      },
      "MessagesUsage": {
        "type": "object",
        "properties": {
          "input_tokens": {
            "type": "integer"
          },
          "output_tokens": {
            "type": "integer"
          },
          "cache_creation_input_tokens": {
            "type": "integer"
          },
          "cache_read_input_tokens": {
            "type": "integer"
          }
        }
      },
      "MessagesStreamEvent": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "message_start",
              "ping",
              "content_block_start",
              "content_block_delta",
              "content_block_stop",
              "message_delta",
              "message_stop"
            ]
          },
          "message": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "message"
                ]
              },
              "role": {
                "type": "string",
                "enum": [
                  "assistant"
                ]
              },
              "content": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MessagesResponseContentBlock"
                }
              },
              "model": {
                "type": "string"
              },
              "stop_reason": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "stop_sequence": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "usage": {
                "$ref": "#/components/schemas/MessagesUsage"
              }
            }
          },
          "index": {
            "type": "integer"
          },
          "content_block": {
            "$ref": "#/components/schemas/MessagesResponseContentBlock"
          },
          "delta": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text_delta",
                  "thinking_delta",
                  "signature_delta"
                ]
              },
              "text": {
                "type": "string"
              },
              "stop_reason": {
                "type": "string",
                "enum": [
                  "end_turn",
                  "max_tokens",
                  "tool_use"
                ]
              }
            }
          },
          "usage": {
            "$ref": "#/components/schemas/MessagesUsage"
          }
        }
      },
      "MessagesCacheControl": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "ephemeral"
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "MessagesMediaSource": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "base64",
              "url"
            ]
          },
          "media_type": {
            "type": "string"
          },
          "data": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "detail": {
            "type": "string",
            "enum": [
              "low",
              "default",
              "high"
            ],
            "default": "default"
          },
          "fps": {
            "type": "number",
            "minimum": 0.2,
            "maximum": 5,
            "default": 1
          },
          "max_long_side_pixel": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "type"
        ]
      },
      "MessagesTool": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "input_schema": {
            "type": "object"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "input_schema"
        ]
      },
      "MessagesToolChoice": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "auto"
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "MessagesErrorResponse": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "request_id": {
            "type": "string"
          },
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "invalid_request_error",
                  "authentication_error",
                  "permission_error",
                  "not_found_error",
                  "request_too_large",
                  "rate_limit_error",
                  "api_error",
                  "overloaded_error"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "ResponsesCreateResponseReq": {
        "type": "object",
        "required": [
          "model",
          "input"
        ],
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "MiniMax-M3.1-Flash"
            ]
          },
          "input": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResponsesInputItem"
                }
              }
            ]
          },
          "instructions": {
            "type": "string"
          },
          "max_output_tokens": {
            "type": "integer",
            "minimum": 1,
            "maximum": 524288
          },
          "temperature": {
            "type": "number",
            "default": 1
          },
          "top_p": {
            "type": "number",
            "default": 0.95,
            "maximum": 1,
            "exclusiveMinimum": 0
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResponsesTool"
            }
          },
          "tool_choice": {
            "type": "string",
            "enum": [
              "auto"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "prompt_cache_key": {
            "type": "string"
          },
          "text": {
            "type": "object",
            "properties": {
              "format": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "text"
                    ],
                    "default": "text"
                  }
                }
              }
            }
          },
          "reasoning": {
            "type": "object",
            "properties": {
              "effort": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "xhigh",
                  "max"
                ]
              }
            },
            "required": []
          }
        }
      },
      "ResponsesInputItem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "message",
              "function_call",
              "function_call_output",
              "reasoning"
            ],
            "default": "message"
          },
          "role": {
            "type": "string",
            "enum": [
              "user",
              "assistant",
              "system",
              "developer",
              "tool"
            ]
          },
          "content": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResponsesContentPart"
                }
              }
            ]
          },
          "call_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "arguments": {
            "type": "string"
          },
          "output": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResponsesContentPart"
                }
              }
            ]
          },
          "summary": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "summary_text"
                  ]
                },
                "text": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ResponsesContentPart": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_text",
              "output_text",
              "input_image",
              "input_video"
            ]
          },
          "text": {
            "type": "string"
          },
          "image_url": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "detail": {
                    "type": "string",
                    "enum": [
                      "low",
                      "default",
                      "high"
                    ],
                    "default": "default"
                  }
                }
              }
            ]
          },
          "video_url": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "fps": {
                    "type": "number",
                    "default": 1,
                    "minimum": 0.2,
                    "maximum": 5
                  },
                  "detail": {
                    "type": "string",
                    "enum": [
                      "low",
                      "default",
                      "high"
                    ],
                    "default": "default"
                  },
                  "max_long_side_pixel": {
                    "type": "integer"
                  }
                }
              }
            ]
          }
        }
      },
      "ResponsesTool": {
        "type": "object",
        "required": [
          "type",
          "name"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "function"
            ]
          },
          "name": {
            "type": "string"
          },
          "parameters": {
            "type": "object"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "ResponsesCreateResponseResp": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "response"
            ]
          },
          "created_at": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "incomplete",
              "failed"
            ]
          },
          "output": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResponsesOutputItem"
            }
          },
          "output_text": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "$ref": "#/components/schemas/ResponsesUsage"
          },
          "error": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "incomplete_details": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "enum": [
                      "max_output_tokens",
                      "content_filter"
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "parallel_tool_calls": {
            "type": "boolean"
          },
          "store": {
            "type": "boolean"
          },
          "truncation": {
            "type": "string",
            "enum": [
              "disabled"
            ]
          },
          "previous_response_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversation": {
            "oneOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "service_tier": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "safety_identifier": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ResponsesOutputItem": {
        "oneOf": [
          {
            "title": "Message",
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "message"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "completed"
                ]
              },
              "role": {
                "type": "string",
                "enum": [
                  "assistant"
                ]
              },
              "content": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "output_text"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "annotations": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          },
          {
            "title": "Reasoning",
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "reasoning"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "completed"
                ]
              },
              "summary": {
                "type": "array"
              },
              "content": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "reasoning_text"
                      ]
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          {
            "title": "Function Call",
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "function_call"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "completed"
                ]
              },
              "call_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "arguments": {
                "type": "string"
              }
            }
          }
        ]
      },
      "ResponsesUsage": {
        "type": "object",
        "properties": {
          "input_tokens": {
            "type": "integer"
          },
          "input_tokens_details": {
            "type": "object",
            "properties": {
              "cached_tokens": {
                "type": "integer"
              }
            }
          },
          "output_tokens": {
            "type": "integer"
          },
          "output_tokens_details": {
            "type": "object",
            "properties": {
              "reasoning_tokens": {
                "type": "integer"
              }
            }
          },
          "total_tokens": {
            "type": "integer"
          }
        }
      }
    },
    "securitySchemes": {
      "BearerKey": {
        "type": "http",
        "scheme": "bearer"
      },
      "AnthropicKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "BearerKey": []
    }
  ]
}
