{
  "openapi": "3.1.0",
  "info": {
    "title": "SeedRouter Whisper-1",
    "version": "1.0.0",
    "description": "File transcription and English translation with asynchronous task delivery. Live compatibility limitations are listed in /docs/whisper-1."
  },
  "servers": [
    {
      "url": "https://api.seedrouter.ai/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/audio/transcriptions": {
      "post": {
        "operationId": "transcribeWhisperAudio",
        "summary": "Transcribe an audio file",
        "description": "Submit once and retain the accepted task ID. Poll GET /tasks/{task_id} and download output.url after completion. This asynchronous response is not a synchronous OpenAI SDK result. Nondefault chunking has not passed live compatibility verification; omit it for the verified path.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TranscriptionRequest"
              },
              "encoding": {
                "chunking_strategy": {
                  "contentType": "application/json"
                },
                "timestamp_granularities": {
                  "style": "form",
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted; no transcript yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            }
          },
          "400": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/audio/translations": {
      "post": {
        "operationId": "translateWhisperAudio",
        "summary": "Translate an audio file into English",
        "description": "Submit once and retain the accepted task ID. Poll GET /tasks/{task_id} and download output.url after completion. This asynchronous response is not a synchronous OpenAI SDK result. Nondefault chunking has not passed live compatibility verification; omit it for the verified path.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TranslationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted; no transcript yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            }
          },
          "400": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{task_id}": {
      "get": {
        "operationId": "getWhisperTask",
        "summary": "Read an owned audio task",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^task_[A-Za-z0-9]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current task state; output is present only after completion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Public error with a numeric code and safe message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "TranscriptionRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "const": "whisper-1"
          },
          "prompt": {
            "type": "string"
          },
          "response_format": {
            "default": "json",
            "type": "string",
            "enum": [
              "json",
              "text",
              "srt",
              "verbose_json",
              "vtt"
            ]
          },
          "temperature": {
            "default": 0,
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "language": {
            "type": "string"
          },
          "timestamp_granularities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "word",
                "segment"
              ]
            }
          },
          "chunking_strategy": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string",
                    "const": "auto"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "server_vad"
                      },
                      "prefix_padding_ms": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "silence_duration_ms": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "threshold": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "type"
                    ]
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "file": {
            "type": "string",
            "format": "binary",
            "description": "One audio file: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav or webm. Maximum 26214400 bytes. A filename or URL string is not a file."
          },
          "stream": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false,
            "description": "Ignored for whisper-1. No streaming events are produced."
          }
        },
        "required": [
          "file",
          "model"
        ],
        "allOf": [
          {
            "if": {
              "required": [
                "timestamp_granularities"
              ],
              "properties": {
                "timestamp_granularities": {
                  "minItems": 1
                }
              }
            },
            "then": {
              "required": [
                "response_format"
              ],
              "properties": {
                "response_format": {
                  "const": "verbose_json"
                }
              }
            }
          }
        ]
      },
      "TranslationRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "const": "whisper-1"
          },
          "prompt": {
            "type": "string"
          },
          "response_format": {
            "default": "json",
            "type": "string",
            "enum": [
              "json",
              "text",
              "srt",
              "verbose_json",
              "vtt"
            ]
          },
          "temperature": {
            "default": 0,
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "file": {
            "type": "string",
            "format": "binary",
            "description": "One audio file: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav or webm. Maximum 26214400 bytes. A filename or URL string is not a file."
          }
        },
        "required": [
          "file",
          "model"
        ]
      },
      "Accepted": {
        "type": "object",
        "required": [
          "id",
          "model",
          "status",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "model": {
            "const": "whisper-1"
          },
          "status": {
            "const": "processing"
          },
          "created_at": {
            "type": "integer"
          }
        }
      },
      "Task": {
        "type": "object",
        "required": [
          "id",
          "model",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "model": {
            "const": "whisper-1"
          },
          "status": {
            "enum": [
              "processing",
              "completed",
              "failed"
            ]
          },
          "created_at": {
            "type": "integer"
          },
          "output": {
            "$ref": "#/components/schemas/Output"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        }
      },
      "Output": {
        "type": "object",
        "required": [
          "url",
          "format"
        ],
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Owned HTTPS download URL for the selected JSON, text or subtitle artifact."
          },
          "format": {
            "enum": [
              "json",
              "text",
              "srt",
              "verbose_json",
              "vtt"
            ]
          }
        }
      },
      "ErrorDetail": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        }
      }
    }
  }
}
