{
  "openapi": "3.1.0",
  "info": {
    "description": "时序科技公开 API，提供异步语音合成、音频编排、音色设计、图片和视频生成，以及任务、素材上传和 Webhook 接口。文本模型通过 OpenAI 兼容接口提供。",
    "title": "时序科技 API",
    "version": "0.1.0"
  },
  "servers": [
    {
      "description": "API Base URL",
      "url": "/api"
    }
  ],
  "paths": {
    "/voice-presets": {
      "get": {
        "operationId": "list_voice_presets_voice_presets_get",
        "parameters": [
          {
            "in": "query",
            "name": "search",
            "schema": {
              "maxLength": 100,
              "title": "Search",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "language",
            "schema": {
              "maxLength": 40,
              "title": "Language",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoicePresetListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "503": {
            "description": "Voice preset catalog unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          }
        },
        "summary": "List preset voices",
        "tags": [
          "generation"
        ]
      }
    },
    "/voice-presets/{preset_id}/playback": {
      "get": {
        "operationId": "voice_preset_playback_voice_presets_preset_id_playback_get",
        "parameters": [
          {
            "in": "path",
            "name": "preset_id",
            "required": true,
            "schema": {
              "pattern": "^vp_[a-f0-9]{24}$",
              "title": "Preset Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAssetPlaybackResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "description": "Voice preset not found",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "503": {
            "description": "Voice preset audio temporarily unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          }
        },
        "summary": "Get a preset voice preview",
        "tags": [
          "generation"
        ]
      }
    },
    "/voice-presets/{preset_id}/use": {
      "post": {
        "summary": "Use a preset voice",
        "description": "Return a voice asset for the preset voice in the current account. Generation requests can reference it through voice_asset_id. This does not create a generation job or charge credits.",
        "operationId": "voice_preset_use_on_canvas",
        "parameters": [
          {
            "in": "path",
            "name": "preset_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^vp_[a-f0-9]{24}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Voice sample ready for use",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAssetRecord"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "headers": {}
          },
          "404": {
            "description": "Voice preset not found"
          },
          "409": {
            "description": "Credentials do not match the account"
          },
          "410": {
            "description": "Voice asset preparation expired; call this endpoint again"
          },
          "422": {
            "description": "Invalid voice preset identifier"
          },
          "503": {
            "description": "Service temporarily unavailable; try again later"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "tags": [
          "generation"
        ]
      }
    },
    "/voice-presets/{preset_id}/icon": {
      "get": {
        "operationId": "get_voice_preset_icon",
        "parameters": [
          {
            "in": "path",
            "name": "preset_id",
            "required": true,
            "schema": {
              "pattern": "^vp_[a-f0-9]{24}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to a 96px WebP thumbnail URL that is valid for 15 minutes",
            "headers": {
              "Location": {
                "description": "Temporary thumbnail URL",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Voice preset icon not found",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "503": {
            "description": "Voice preset icon temporarily unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          }
        },
        "summary": "Get a preset voice icon",
        "tags": [
          "generation"
        ]
      }
    },
    "/voice-assets": {
      "get": {
        "operationId": "list_voice_assets_voice_assets_get",
        "parameters": [
          {
            "in": "query",
            "name": "search",
            "schema": {
              "maxLength": 100,
              "title": "Search",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 18,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAssetListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List voice assets",
        "tags": [
          "assets"
        ]
      }
    },
    "/voice-assets/{asset_id}": {
      "get": {
        "operationId": "get_voice_asset_voice_assets_asset_id_get",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "title": "Asset Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAssetRecord"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "description": "Voice asset not found",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Voice asset expired",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a voice asset",
        "tags": [
          "assets"
        ]
      },
      "patch": {
        "operationId": "rename_voice_asset_voice_assets_asset_id_patch",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "title": "Asset Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameVoiceAssetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAssetRecord"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "description": "Voice asset not found",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Voice asset expired",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Rename a voice asset",
        "tags": [
          "assets"
        ]
      },
      "delete": {
        "operationId": "delete_voice_asset_voice_assets_asset_id_delete",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "title": "Asset Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "404": {
            "description": "Voice asset not found",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Voice asset is in use",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Voice asset expired",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a voice asset",
        "tags": [
          "assets"
        ]
      }
    },
    "/voice-assets/{asset_id}/playback": {
      "get": {
        "operationId": "voice_asset_playback_voice_assets_asset_id_playback_get",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "title": "Asset Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAssetPlaybackResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "description": "Voice asset not found",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Voice asset expired",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a voice asset preview",
        "tags": [
          "assets"
        ]
      }
    },
    "/capabilities": {
      "get": {
        "operationId": "get_capabilities_capabilities_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapabilitiesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "detail": {
                      "title": "Detail",
                      "type": "string"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "title": "ErrorDetail",
                  "type": "object"
                }
              }
            },
            "description": "Feature Configuration Unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "summary": "Get available capabilities",
        "tags": [
          "capabilities"
        ]
      }
    },
    "/keys": {
      "get": {
        "operationId": "list_keys_keys_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  },
                  "title": "Response List Keys Keys Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List API Keys",
        "tags": [
          "api-keys"
        ]
      },
      "post": {
        "operationId": "create_key_keys_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDisabledResponse"
                }
              }
            },
            "description": "Feature Temporarily Unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create an API Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/keys/{key_id}": {
      "delete": {
        "operationId": "revoke_key_keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "title": "Key Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Revoke an API Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/v1/avatar": {
      "post": {
        "operationId": "create_avatar_v1_avatar_post",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvatarRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAcceptedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "409": {
            "description": "Idempotency-Key was already used for a different request",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          },
          "429": {
            "description": "Concurrent job limit (MAX_CONCURRENT_JOBS) or request rate limit (RATE_LIMITED) reached.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDisabledResponse"
                }
              }
            },
            "description": "Feature Temporarily Unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          }
        ],
        "summary": "Create an asynchronous audio-driven avatar video",
        "description": "Submit an owned driving-audio asset reference to the avatar video service. Optionally provide a portrait image, prompt, resolution and segment count. The response contains a job ID; retrieve its result through the shared job endpoints.",
        "tags": [
          "generation"
        ]
      }
    },
    "/v1/avatar/from-text": {
      "post": {
        "description": "Submit 1–5000 characters and an optional voice reference to the text-to-avatar service. The service synthesizes the driving audio with indextts-2, then renders an avatar video. Billing is recorded as one avatar job and the response contains a shared job ID.",
        "operationId": "create_avatar_from_text_v1_avatar_from_text_post",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvatarFromTextRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAcceptedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "409": {
            "description": "Idempotency-Key was already used for a different request",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Selected voice reference has expired",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          },
          "429": {
            "description": "Concurrent job limit (MAX_CONCURRENT_JOBS) or request rate limit (RATE_LIMITED) reached.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDisabledResponse"
                }
              }
            },
            "description": "Feature Temporarily Unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          }
        ],
        "summary": "Create an asynchronous avatar video from text",
        "tags": [
          "generation"
        ]
      }
    },
    "/v1/models": {
      "get": {
        "operationId": "list_models_v1_models_get",
        "tags": [
          "llm"
        ],
        "summary": "List text models",
        "description": "OpenAI-compatible list of the text models you can call, with the context window, output limit and credits per million tokens.",
        "security": [
          {
            "APIKeyBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMModelList"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "operationId": "create_chat_completion_v1_chat_completions_post",
        "tags": [
          "llm"
        ],
        "summary": "Create chat completion",
        "description": "OpenAI-compatible chat completion. Set stream=true to receive server-sent events. Credits are reserved from max_tokens and settled against the usage reported by the model. API Keys only.",
        "security": [
          {
            "APIKeyBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LLMChatCompletionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMChatCompletion"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "Server-sent events. Each data line is a chat.completion.chunk JSON object; the stream ends with data: [DONE]."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Model not found",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request too large",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate or concurrency limit reached",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Model service error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Feature disabled or service unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "Model service timed out",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/jobs": {
      "get": {
        "operationId": "list_jobs_v1_jobs_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional comma-separated job types: tts, video, image, voice_design, audio_composition."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "idempotency_key",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/JobResponse"
                  },
                  "title": "Response List Jobs V1 Jobs Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Next-Cursor": {
                "description": "Opaque cursor for the next page. Absent on the last page.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List jobs",
        "tags": [
          "jobs"
        ]
      }
    },
    "/v1/jobs/{job_id}": {
      "get": {
        "operationId": "get_job_v1_jobs__job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a job",
        "tags": [
          "jobs"
        ]
      }
    },
    "/v1/jobs/{job_id}/result": {
      "get": {
        "operationId": "get_job_result_v1_jobs__job_id__result_get",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResultResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResultExpiredResponse"
                }
              }
            },
            "description": "Generated result is unavailable or expired",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a job result",
        "tags": [
          "jobs"
        ]
      }
    },
    "/v1/tts": {
      "post": {
        "operationId": "create_tts_v1_tts_post",
        "description": "Submit text for asynchronous speech synthesis. model selects indextts-2 (default) or indextts-2.5. indextts-2 accepts up to 2048 characters and exactly one voice selector, and supports an emotion reference or eight-dimensional emotion vector. indextts-2.5 requires language, accepts up to 2000 characters, an optional speed and an emo_text description, and uses a preset voice, saved voice or voice reference. Use Idempotency-Key for safe retries.",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TTSRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAcceptedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication required.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Selected voice preset was not found",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key was already used for a different request (IDEMPOTENCY_CONFLICT).",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Selected user voice asset has expired",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          },
          "429": {
            "description": "Concurrent job limit (MAX_CONCURRENT_JOBS) or request rate limit (RATE_LIMITED) reached.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/FeatureDisabledResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailableResponse"
                    }
                  ]
                }
              }
            },
            "description": "Feature disabled or service temporarily unavailable; try again later",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create an asynchronous speech job",
        "tags": [
          "generation"
        ]
      }
    },
    "/v1/uploads": {
      "post": {
        "description": "Issue an upload URL valid for 300 seconds. PUT the file with every returned header, then call POST /v1/uploads/{asset_id}/complete before referencing the asset_id in a generation request. Each account can request up to 30 uploads per minute and upload up to 500 MiB in any rolling 24 hours; all API Keys of the account share this allowance.",
        "operationId": "create_upload_url_v1_uploads_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadUrlRequest"
              }
            }
          },
          "required": true
        },
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadUrlResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication required.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The credentials do not match the account.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          },
          "429": {
            "description": "UPLOAD_RATE_LIMITED (more than 30 upload requests per minute) or UPLOAD_QUOTA_EXCEEDED (more than 500 MiB in 24 hours). quota gives the current limit and usage.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds until enough rolling quota expires for this request. Omitted when no retry time can be promised. Concurrent uploads may delay availability."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "detail"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "feature": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": "The upload service is unavailable; try again later.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Request an upload URL",
        "tags": [
          "generation"
        ]
      }
    },
    "/v1/uploads/{asset_id}/complete": {
      "post": {
        "operationId": "complete_upload_v1_uploads_asset_id_complete_post",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "title": "Asset Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadCompleteResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication required.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Upload not found",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The credentials do not match the account.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Upload completion window expired",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Upload incomplete or invalid",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/APIErrorResponse"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDisabledResponse"
                }
              }
            },
            "description": "Feature Temporarily Unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Complete an upload",
        "tags": [
          "generation"
        ]
      }
    },
    "/v1/webhook-endpoints": {
      "get": {
        "operationId": "list_webhook_endpoints_v1_webhook_endpoints_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookEndpointResponse"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List webhook endpoints",
        "tags": [
          "webhooks"
        ]
      },
      "post": {
        "operationId": "create_webhook_endpoint_v1_webhook_endpoints_post",
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointCreatedResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookEndpointRequest"
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints/{endpoint_id}": {
      "get": {
        "operationId": "get_webhook_endpoint_v1_webhook_endpoints_endpoint_id_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "operationId": "update_webhook_endpoint_v1_webhook_endpoints_endpoint_id_patch",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookEndpointRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "operationId": "delete_webhook_endpoint_v1_webhook_endpoints_endpoint_id_delete",
        "responses": {
          "204": {
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete webhook endpoint",
        "tags": [
          "webhooks"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/webhook-endpoints/{endpoint_id}/rotate-secret": {
      "post": {
        "operationId": "rotate_webhook_endpoint_secret_v1_webhook_endpoints_endpoint_id_rotate_secret_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointCreatedResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Rotate webhook signing secret",
        "tags": [
          "webhooks"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/webhook-endpoints/{endpoint_id}/test": {
      "post": {
        "operationId": "test_webhook_endpoint_v1_webhook_endpoints_endpoint_id_test_post",
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookActionResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send webhook test event",
        "tags": [
          "webhooks"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/webhook-endpoints/{endpoint_id}/deliveries": {
      "get": {
        "operationId": "list_webhook_deliveries_v1_webhook_endpoints_endpoint_id_deliveries_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryPage"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List webhook deliveries",
        "tags": [
          "webhooks"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/webhook-deliveries/{delivery_id}/redeliver": {
      "post": {
        "operationId": "redeliver_webhook_v1_webhook_deliveries_delivery_id_redeliver_post",
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookActionResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Redeliver failed webhook",
        "tags": [
          "webhooks"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/video/config": {
      "get": {
        "operationId": "video_get_v1_video_config",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoConfiguration"
                }
              }
            },
            "description": "Successful Response"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "detail": {
                      "title": "Detail",
                      "type": "string"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "title": "ErrorDetail",
                  "type": "object"
                }
              }
            },
            "description": "Feature Configuration Unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "summary": "Read video model capabilities and billing",
        "tags": [
          "capabilities"
        ],
        "description": "Read live video model availability, generation modes, duration and reference limits, supported resolutions, and billing rates. Use this response to choose a model before POST /v1/video/quote or /v1/video/generate."
      }
    },
    "/v1/video/generate": {
      "post": {
        "operationId": "video_post_v1_video_generate",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAcceptedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication required.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key was already used for a different request (IDEMPOTENCY_CONFLICT).",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Reference asset expired; upload the reference again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/APIErrorResponse"
                    }
                  ]
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          },
          "429": {
            "description": "Concurrent job limit (MAX_CONCURRENT_JOBS) or request rate limit (RATE_LIMITED) reached.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/FeatureDisabledResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailableResponse"
                    }
                  ]
                }
              }
            },
            "description": "Feature disabled or service temporarily unavailable; try again later",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create an asynchronous video generation job",
        "tags": [
          "generation"
        ],
        "description": "Create a video generation job with the selected model. Read GET /v1/video/config first, quote the request with POST /v1/video/quote, then submit the unchanged request with quote_id, quote_version and an Idempotency-Key."
      }
    },
    "/v1/jobs/{job_id}/cancel": {
      "post": {
        "operationId": "video_post_v1_jobs_job_id_cancel",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "title": "Job Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "queued_only",
            "description": "Stop the job only while it is still queued. If generation has started, return 409 and leave the job running.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobCancellationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "description": "Job not found or not owned by this account",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The job cannot be stopped, or generation started before a queued_only request took effect",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "summary": "Stop a generation job",
        "tags": [
          "jobs"
        ],
        "description": "Stopping a job before generation starts refunds its reserved credits. Stopping a job after generation has started keeps the reservation. Repeated requests do not add a charge.",
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/image/config": {
      "get": {
        "description": "Read enabled image models, supported sizes, reference-image limits and surcharges, and the current rate version. Use this response to build an ImageRequest and submit its rate_version unchanged.",
        "operationId": "image_get_v1_image_config",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageConfiguration"
                }
              }
            },
            "description": "Successful Response"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "detail": {
                      "title": "Detail",
                      "type": "string"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "title": "ErrorDetail",
                  "type": "object"
                }
              }
            },
            "description": "Feature Configuration Unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Read image model capabilities and billing",
        "tags": [
          "capabilities"
        ]
      }
    },
    "/v1/image/generate": {
      "post": {
        "description": "Create one PNG image with an available image model, using text-to-image or image-to-image. Submit the current rate_version and a stable Idempotency-Key. If no response arrives, use POST /v1/image/submissions/resolve to confirm the outcome.",
        "operationId": "image_post_v1_image_generate",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAcceptedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication required",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            },
            "description": "Idempotency-Key was already used for a different request, or the rate has changed; read the current rate before submitting again.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            },
            "description": "Reference asset expired; upload the reference again."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/APIErrorResponse"
                    }
                  ]
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Concurrent job limit (MAX_CONCURRENT_JOBS), request rate limit (RATE_LIMITED) or upload allowance (UPLOAD_RATE_LIMITED, UPLOAD_QUOTA_EXCEEDED) reached.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds until enough rolling quota expires for this request. Omitted when no retry time can be promised. Concurrent uploads may delay availability."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/FeatureDisabledResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailableResponse"
                    }
                  ]
                }
              }
            },
            "description": "Feature disabled or service temporarily unavailable; try again later",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create an asynchronous image generation job",
        "tags": [
          "generation"
        ]
      }
    },
    "/v1/image/submissions/resolve": {
      "post": {
        "description": "Confirm the outcome of an image submission that received no response, using the original request and Idempotency-Key. If the original request was accepted, its job is returned; otherwise an uncharged failed job is returned and the original request can no longer be accepted. This endpoint never generates an image.",
        "operationId": "resolve_image_submission",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request"
                ],
                "properties": {
                  "request": {
                    "$ref": "#/components/schemas/ImageSubmissionRequest"
                  },
                  "expected_job_id": {
                    "type": "string",
                    "description": "Job ID returned earlier for this submission, or an empty string if none was returned."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The original job or an uncharged failed job",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAcceptedResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The Idempotency-Key belongs to a different request (IDEMPOTENCY_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable; retry this endpoint later instead of submitting a new image",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Resolve an uncertain image submission without generating",
        "tags": [
          "generation"
        ]
      }
    },
    "/v1/video/quote": {
      "post": {
        "operationId": "video_post_v1_video_quote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoQuoteInput"
              }
            }
          }
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Video quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoQuote"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key was already used for a different request (IDEMPOTENCY_CONFLICT).",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Reference asset expired; upload the reference again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/APIErrorResponse"
                    }
                  ]
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/FeatureDisabledResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailableResponse"
                    }
                  ]
                }
              }
            },
            "description": "Feature disabled or service temporarily unavailable; try again later",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Quote a video generation",
        "tags": [
          "generation"
        ],
        "description": "Validate the video request and return the billable duration, credits, rate_version and, when applicable, quote_id. Quoting does not create a job or reserve credits. Submit the unchanged request with quote_id, and rate_version as quote_version."
      }
    },
    "/v1/voice-design/config": {
      "get": {
        "description": "Read whether voice design is available, its current model, the per-candidate credit price and the billing version. Check this endpoint before POST /v1/voice-designs.",
        "operationId": "voice_design_configuration",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDesignConfiguration"
                }
              }
            },
            "description": "Successful Response"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "detail": {
                      "title": "Detail",
                      "type": "string"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "title": "ErrorDetail",
                  "type": "object"
                }
              }
            },
            "description": "Feature Configuration Unavailable",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Read voice design availability and per-candidate price",
        "tags": [
          "capabilities"
        ]
      }
    },
    "/v1/voice-designs": {
      "post": {
        "description": "Create a voice_design job that generates one new voice from a description. No recording is required. Credits are reserved at the current per-candidate rate and refunded if no result is produced.",
        "operationId": "voice_design_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceDesignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAcceptedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication required.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            },
            "description": "Idempotency-Key was already used for a different request, or the rate has changed; read the current rate before submitting again.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            },
            "description": "Reference asset expired; upload the reference again."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/APIErrorResponse"
                    }
                  ]
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Concurrent job limit (MAX_CONCURRENT_JOBS) or request rate limit (RATE_LIMITED) reached.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/FeatureDisabledResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailableResponse"
                    }
                  ]
                }
              }
            },
            "description": "Feature disabled or service temporarily unavailable; try again later",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Design one original voice from a description",
        "tags": [
          "generation"
        ]
      }
    },
    "/v1/voice-designs/{job_id}/save": {
      "post": {
        "description": "Save a successful candidate to the account voice library. Use the returned id as voice_asset_id. Saving again returns the same voice and charges no additional credits.",
        "operationId": "voice_design_save",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved voice",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAssetRecord"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            },
            "description": "Idempotency-Key was already used for a different request, or the rate has changed; read the current rate before submitting again.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            },
            "description": "Reference asset expired; upload the reference again."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/APIErrorResponse"
                    }
                  ]
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Concurrent job limit (MAX_CONCURRENT_JOBS), request rate limit (RATE_LIMITED) or upload allowance (UPLOAD_RATE_LIMITED, UPLOAD_QUOTA_EXCEEDED) reached.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds until enough rolling quota expires for this request. Omitted when no retry time can be promised. Concurrent uploads may delay availability."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/FeatureDisabledResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailableResponse"
                    }
                  ]
                }
              }
            },
            "description": "Feature disabled or service temporarily unavailable; try again later",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Save a designed voice to the account voice library",
        "tags": [
          "generation"
        ]
      }
    },
    "/v1/audio/compositions/quote": {
      "post": {
        "operationId": "audioCompositionQuote",
        "description": "Parse the v1 prompt_document or plain text, validate voice and audio references, and return the estimated credits and the number of speech segments. Quoting does not create a job or reserve credits.",
        "summary": "Quote an audio composition",
        "tags": [
          "generation"
        ],
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioCompositionQuote"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The credentials do not match the account.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AudioCompositionRequest"
              }
            }
          }
        }
      }
    },
    "/v1/audio/compositions": {
      "post": {
        "operationId": "createAudioComposition",
        "description": "Create an audio composition job: each speech line is synthesized once, sound effects are trimmed to their ranges, music is looped, and the timeline is mixed into one WAV. An Idempotency-Key is required. A v1 prompt_document is recommended; text-only requests are parsed as a simple timeline. model selects the speech model for every speech line: indextts-2 (default) or indextts-2.5.",
        "summary": "Create an asynchronous audio composition job",
        "tags": [
          "generation"
        ],
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "description": "Stable key for retries of the same composition request. Reusing it with different content returns 409.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAcceptedResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The credentials do not match the account.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "UPLOAD_RATE_LIMITED (more than 30 upload requests per minute) or UPLOAD_QUOTA_EXCEEDED (more than 500 MiB in 24 hours). quota gives the current limit and usage.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds until enough rolling quota expires for this request. Omitted when no retry time can be promised. Concurrent uploads may delay availability."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AudioCompositionRequest"
              }
            }
          }
        }
      }
    },
    "/v1/audio/compositions/{job_id}/retry": {
      "post": {
        "operationId": "retryAudioComposition",
        "description": "Resume a failed or cancelled composition while retaining completed speech segments. Only unfinished segments or the final mix are retried.",
        "summary": "Resume an audio composition",
        "tags": [],
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAcceptedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/video/upscale/config": {
      "get": {
        "operationId": "video_upscale_configuration",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoUpscaleConfiguration"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "detail": {
                      "title": "Detail",
                      "type": "string"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "title": "ErrorDetail",
                  "type": "object"
                }
              }
            },
            "description": "Feature Configuration Unavailable",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "summary": "Enabled video upscale tiers and live service readiness",
        "tags": [
          "capabilities"
        ],
        "description": "Enabled video upscale tiers and live service readiness"
      }
    },
    "/v1/video/upscale": {
      "post": {
        "operationId": "create_video_upscale",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoUpscaleRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAcceptedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication required.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key was already used for a different request (IDEMPOTENCY_CONFLICT).",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Reference asset expired; upload the reference again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/APIErrorResponse"
                    }
                  ]
                }
              }
            },
            "description": "Validation Error",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          },
          "429": {
            "description": "Concurrent job limit (MAX_CONCURRENT_JOBS) or request rate limit (RATE_LIMITED) reached.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID. Include it when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/FeatureDisabledResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailableResponse"
                    }
                  ]
                }
              }
            },
            "description": "Feature disabled or service temporarily unavailable; try again later",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                },
                "description": "Request ID. Include it when contacting support."
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Upscale an owned MP4 as an independent recoverable job",
        "tags": [
          "generation"
        ],
        "description": "Requires a stable Idempotency-Key. Original video and audio are retained. Results are checked before credit settlement. No remote cancellation is supported."
      }
    }
  },
  "components": {
    "schemas": {
      "VoicePresetListResponse": {
        "properties": {
          "catalog_version": {
            "title": "Catalog Version",
            "type": "string"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/VoicePresetRecord"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "title": "Offset",
            "type": "integer"
          }
        },
        "required": [
          "catalog_version",
          "generated_at",
          "items",
          "total",
          "limit",
          "offset"
        ],
        "title": "VoicePresetListResponse",
        "type": "object"
      },
      "VoicePresetRecord": {
        "properties": {
          "icon_url": {
            "description": "Icon path relative to the API Base URL. Requesting it redirects to a temporary thumbnail URL, so it can be loaded lazily.",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string",
            "pattern": "^vp_[a-f0-9]{24}$"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "language": {
            "title": "Language",
            "type": "string"
          },
          "locale": {
            "title": "Locale",
            "type": "string"
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "integer",
            "minimum": 1
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer",
            "minimum": 1
          },
          "usage_count": {
            "description": "Number of speech synthesis jobs completed successfully with this preset.",
            "minimum": 0,
            "title": "Usage Count",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "display_name",
          "language",
          "locale",
          "duration_ms",
          "size_bytes",
          "usage_count"
        ],
        "title": "VoicePresetRecord",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          },
          "code": {
            "type": "string",
            "const": "VALIDATION_ERROR"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "APIErrorResponse": {
        "type": "object",
        "required": [
          "detail"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable machine-readable error code. Clients translate this code for display."
          },
          "detail": {
            "type": "string",
            "description": "Diagnostic description; user interfaces should display a localized message using the code and request context."
          },
          "reference_audio_duration": {
            "type": "object",
            "description": "Present for VIDEO_INPUT_INVALID when reference audio fails a duration check. Without min_seconds, the duration is the sum of the reference audio clips.",
            "required": [
              "seconds",
              "max_seconds"
            ],
            "properties": {
              "seconds": {
                "type": "number"
              },
              "min_seconds": {
                "type": "integer"
              },
              "max_seconds": {
                "type": "integer"
              }
            }
          },
          "quota": {
            "$ref": "#/components/schemas/UploadQuota"
          }
        }
      },
      "UploadQuota": {
        "type": "object",
        "description": "The upload allowance that blocked this request, for the authenticated account only. Counts are integers and capacities are bytes. Copies created by the service, such as saved voices, do not use this allowance. There is no daily limit on the number of uploads.",
        "required": [
          "kind",
          "limit",
          "used",
          "requested"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "rate",
              "daily_bytes"
            ]
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "used": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "requested": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "retry_at": {
            "type": "string",
            "format": "date-time",
            "description": "Estimated earliest time this request can succeed, assuming no new uploads. Omitted when no estimate is available or the request is larger than the entire allowance."
          }
        }
      },
      "VoiceAssetPlaybackResponse": {
        "properties": {
          "url": {
            "title": "Url",
            "type": "string"
          },
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          }
        },
        "required": [
          "url",
          "expires_in"
        ],
        "title": "VoiceAssetPlaybackResponse",
        "type": "object"
      },
      "VoiceAssetRecord": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "original_filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Original Filename"
          },
          "size_bytes": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          },
          "uploaded_at": {
            "format": "date-time",
            "title": "Uploaded At",
            "type": "string"
          },
          "retained_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Media retention deadline, or null for permanent retention. Signed URL lifetime is independent."
          },
          "permanent": {
            "type": "boolean"
          },
          "source": {
            "type": "string",
            "enum": [
              "uploaded",
              "designed",
              "preset"
            ]
          },
          "preset_id": {
            "type": "string",
            "description": "ID of the preset voice this voice comes from, when applicable."
          },
          "description": {
            "type": "string"
          },
          "duration_seconds": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "display_name",
          "original_filename",
          "size_bytes",
          "uploaded_at",
          "retained_until"
        ],
        "title": "VoiceAssetRecord",
        "type": "object"
      },
      "VoiceAssetListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VoiceAssetRecord"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "title": "Offset",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "title": "VoiceAssetListResponse",
        "type": "object"
      },
      "RenameVoiceAssetRequest": {
        "properties": {
          "display_name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Display Name",
            "type": "string"
          }
        },
        "required": [
          "display_name"
        ],
        "title": "RenameVoiceAssetRequest",
        "type": "object"
      },
      "CapabilitiesResponse": {
        "properties": {
          "features": {
            "additionalProperties": {
              "$ref": "#/components/schemas/PublicFeatureCapability"
            },
            "title": "Features",
            "type": "object"
          },
          "read_only": {
            "title": "Read Only",
            "type": "boolean"
          },
          "audio": {
            "$ref": "#/components/schemas/AudioGenerationCapability"
          }
        },
        "required": [
          "read_only",
          "features",
          "audio"
        ],
        "title": "CapabilitiesResponse",
        "type": "object"
      },
      "PublicFeatureCapability": {
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "message"
        ],
        "title": "PublicFeatureCapability",
        "type": "object"
      },
      "AudioGenerationCapability": {
        "type": "object",
        "properties": {
          "max_text_length": {
            "type": "integer"
          },
          "chars_per_second": {
            "type": "number"
          },
          "credits_per_second": {
            "type": "number"
          },
          "minimum_credits": {
            "type": "number"
          },
          "emotion_text_supported": {
            "type": "boolean"
          },
          "emotion_weight_max": {
            "type": "number"
          }
        },
        "required": [
          "max_text_length",
          "chars_per_second",
          "credits_per_second",
          "minimum_credits",
          "emotion_text_supported",
          "emotion_weight_max"
        ]
      },
      "ApiKeyResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "public_prefix": {
            "title": "Public Prefix",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "public_prefix",
          "is_active",
          "last_used_at",
          "created_at"
        ],
        "title": "ApiKeyResponse",
        "type": "object"
      },
      "CreateApiKeyRequest": {
        "properties": {
          "name": {
            "default": "default",
            "maxLength": 120,
            "title": "Name",
            "type": "string"
          }
        },
        "title": "CreateApiKeyRequest",
        "type": "object"
      },
      "ApiKeyCreatedResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "public_prefix": {
            "title": "Public Prefix",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "public_prefix",
          "is_active",
          "last_used_at",
          "created_at",
          "key"
        ],
        "title": "ApiKeyCreatedResponse",
        "type": "object"
      },
      "FeatureDisabledResponse": {
        "properties": {
          "code": {
            "const": "feature_disabled",
            "title": "Code",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "feature": {
            "title": "Feature",
            "type": "string"
          }
        },
        "required": [
          "detail",
          "code",
          "feature"
        ],
        "title": "FeatureDisabledResponse",
        "type": "object"
      },
      "AvatarRequest": {
        "properties": {
          "audio_ref_key": {
            "description": "Driving audio asset references",
            "title": "Audio Ref Key",
            "type": "string"
          },
          "image_ref_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference portrait image asset references",
            "title": "Image Ref Key"
          },
          "prompt": {
            "default": "",
            "maxLength": 2000,
            "description": "可选的视频提示词，最多 2000 个字符。",
            "title": "Prompt",
            "type": "string"
          },
          "resolution": {
            "$ref": "#/components/schemas/Resolution",
            "default": "480p"
          },
          "webhook_endpoint_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^whe_[a-f0-9]{32}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registered webhook endpoint to notify when the job succeeds or fails.",
            "title": "Webhook Endpoint Id"
          }
        },
        "required": [
          "audio_ref_key"
        ],
        "title": "AvatarRequest",
        "type": "object"
      },
      "Resolution": {
        "enum": [
          "480p",
          "720p"
        ],
        "title": "Resolution",
        "type": "string"
      },
      "JobAcceptedResponse": {
        "properties": {
          "estimate_detail": {
            "additionalProperties": true,
            "title": "Estimate Detail",
            "type": "object"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "reserved_credits": {
            "title": "Reserved Credits",
            "type": "number"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "type": {
            "$ref": "#/components/schemas/JobType"
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "reserved_credits",
          "estimate_detail"
        ],
        "title": "JobAcceptedResponse",
        "type": "object"
      },
      "JobStatus": {
        "enum": [
          "queued",
          "processing",
          "succeeded",
          "failed",
          "cancelled"
        ],
        "title": "JobStatus",
        "type": "string"
      },
      "JobType": {
        "enum": [
          "tts",
          "avatar",
          "video",
          "video_analysis",
          "image",
          "voice_design",
          "audio_composition"
        ],
        "title": "JobType",
        "type": "string"
      },
      "AvatarFromTextRequest": {
        "description": "One call: text -> (service indextts-2) -> the avatar video service.",
        "properties": {
          "image_ref_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Ref Key",
            "description": "可选的人物图像资源引用。"
          },
          "prompt": {
            "default": "",
            "maxLength": 2000,
            "description": "可选的视频提示词，最多 2000 个字符。",
            "title": "Prompt",
            "type": "string"
          },
          "resolution": {
            "$ref": "#/components/schemas/Resolution",
            "default": "480p"
          },
          "text": {
            "maxLength": 5000,
            "minLength": 1,
            "description": "要合成的台词，1–5000 个字符。",
            "title": "Text",
            "type": "string"
          },
          "voice_ref_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Ref Key",
            "description": "可选的声音参考资源引用。"
          },
          "webhook_endpoint_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^whe_[a-f0-9]{32}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registered webhook endpoint to notify when the job succeeds or fails.",
            "title": "Webhook Endpoint Id"
          }
        },
        "required": [
          "text"
        ],
        "title": "AvatarFromTextRequest",
        "type": "object"
      },
      "LLMModelList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LLMModel"
            }
          }
        },
        "required": [
          "object",
          "data"
        ],
        "additionalProperties": false
      },
      "LLMModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "model"
          },
          "created": {
            "type": "integer"
          },
          "display_name": {
            "type": "string"
          },
          "context_window": {
            "type": "integer"
          },
          "max_output_tokens": {
            "type": "integer"
          },
          "supports_stream": {
            "type": "boolean"
          },
          "supports_thinking": {
            "type": "boolean"
          },
          "pricing": {
            "$ref": "#/components/schemas/LLMModelPricing"
          }
        },
        "required": [
          "id",
          "object",
          "created",
          "display_name",
          "context_window",
          "max_output_tokens",
          "supports_stream",
          "supports_thinking",
          "pricing"
        ],
        "additionalProperties": false
      },
      "LLMModelPricing": {
        "type": "object",
        "properties": {
          "input_credits_per_million": {
            "type": "string"
          },
          "cached_input_credits_per_million": {
            "type": "string"
          },
          "output_credits_per_million": {
            "type": "string"
          }
        },
        "required": [
          "input_credits_per_million",
          "cached_input_credits_per_million",
          "output_credits_per_million"
        ],
        "additionalProperties": false,
        "description": "Credits per million tokens as decimal strings with four decimals."
      },
      "OpenAIErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "param": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "message",
              "type",
              "code",
              "param"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false,
        "description": "Error body used by the OpenAI-compatible routes."
      },
      "LLMChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "A model id from GET /v1/models."
          },
          "messages": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/LLMChatMessage"
            }
          },
          "stream": {
            "type": "boolean"
          },
          "stream_options": {
            "type": "object",
            "properties": {
              "include_usage": {
                "type": "boolean"
              }
            }
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 1
          },
          "max_completion_tokens": {
            "type": "integer",
            "minimum": 1
          },
          "temperature": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          },
          "presence_penalty": {
            "type": "number"
          },
          "frequency_penalty": {
            "type": "number"
          },
          "seed": {
            "type": "integer"
          },
          "stop": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 4
              }
            ]
          },
          "response_format": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "json_object"
                ]
              }
            }
          },
          "reasoning_effort": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "user": {
            "type": "string"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "description": "OpenAI chat completion request. Unknown fields are ignored. n greater than 1, tools and non-text content are not supported."
      },
      "LLMChatMessage": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "system",
              "user",
              "assistant"
            ]
          },
          "content": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "role",
          "content"
        ]
      },
      "LLMChatCompletion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "chat.completion"
          },
          "created": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer"
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string"
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reasoning_content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "usage": {
            "$ref": "#/components/schemas/LLMUsage"
          }
        },
        "required": [
          "id",
          "object",
          "created",
          "model",
          "choices"
        ]
      },
      "LLMUsage": {
        "type": "object",
        "properties": {
          "prompt_tokens": {
            "type": "integer"
          },
          "completion_tokens": {
            "type": "integer"
          },
          "total_tokens": {
            "type": "integer"
          },
          "prompt_tokens_details": {
            "type": "object",
            "properties": {
              "cached_tokens": {
                "type": "integer"
              }
            }
          },
          "completion_tokens_details": {
            "type": "object",
            "properties": {
              "reasoning_tokens": {
                "type": "integer"
              }
            }
          }
        },
        "required": [
          "prompt_tokens",
          "completion_tokens",
          "total_tokens"
        ]
      },
      "JobResponse": {
        "properties": {
          "provider_failure": {
            "description": "User-facing reason and recovery action derived from a failed video generation receipt. Includes only safe service identifiers. Portrait enrollment is indicated only when explicitly requested in the receipt.",
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "stage": {
                "type": "string",
                "enum": [
                  "submission",
                  "generation"
                ]
              },
              "reason": {
                "type": "string"
              },
              "reason_en": {
                "type": "string"
              },
              "action": {
                "type": "string"
              },
              "action_en": {
                "type": "string"
              }
            },
            "required": [
              "stage",
              "reason",
              "reason_en",
              "action",
              "action_en"
            ]
          },
          "actual_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Credits"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error_code": {
            "description": "Failure reason code. IMAGE_REFERENCE_COPYRIGHT, IMAGE_PROMPT_COPYRIGHT and IMAGE_OUTPUT_COPYRIGHT mean the reference image, prompt or generated image was rejected in copyright review. IMAGE_PROVIDER_INVALID_PARAMETERS means the image model rejected the request parameters. In these cases reserved credits are refunded. IMAGE_PROVIDER_NO_RESULT means the job ended without a result and any remaining reserved credits were refunded. IMAGE_SUBMISSION_NOT_ACCEPTED means the image submission was closed before it was accepted, and no credits were charged.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "reserved_credits": {
            "title": "Reserved Credits",
            "type": "number"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "type": {
            "$ref": "#/components/schemas/JobType"
          },
          "webhook_endpoint_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^whe_[a-f0-9]{32}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Endpoint Id"
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "reserved_credits",
          "actual_credits",
          "error_code",
          "error_message",
          "created_at",
          "started_at",
          "finished_at"
        ],
        "title": "JobResponse",
        "type": "object"
      },
      "JobResultResponse": {
        "properties": {
          "expires_in": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires In"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "result_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Url"
          },
          "retained_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Media retention deadline, or null for permanent retention. Signed URL lifetime is independent."
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "preview_url": {
            "type": "string"
          },
          "preview_status": {
            "type": "string",
            "enum": [
              "pending",
              "ready",
              "expired"
            ]
          },
          "thumbnail_url": {
            "type": "string",
            "description": "Optional signed, aspect-preserving image thumbnail for canvas display."
          }
        },
        "required": [
          "id",
          "status"
        ],
        "title": "JobResultResponse",
        "type": "object"
      },
      "JobResultExpiredResponse": {
        "properties": {
          "code": {
            "enum": [
              "JOB_RESULT_EXPIRED"
            ],
            "title": "Code",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          }
        },
        "required": [
          "code",
          "detail"
        ],
        "title": "JobResultExpiredResponse",
        "type": "object"
      },
      "TTSRequest": {
        "properties": {
          "emo_alpha": {
            "default": 1,
            "maximum": 1,
            "minimum": 0,
            "description": "情绪参考或情绪向量的强度，范围 0–1。当前只有情绪向量允许使用非 1 值。",
            "title": "Emo Alpha",
            "type": "number"
          },
          "emo_ref_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Emo Ref Key",
            "description": "情绪参考 WAV 的引用值，与 emo_asset_id、emo_vector 互斥。通过上传接口登记的情绪参考请使用 emo_asset_id。"
          },
          "model": {
            "type": "string",
            "enum": [
              "indextts-2",
              "indextts-2.5"
            ],
            "default": "indextts-2",
            "description": "语音模型 ID。省略时使用 indextts-2。indextts-2.5 需要同时提供 language，并用 emo_text 控制情绪。",
            "title": "Model"
          },
          "language": {
            "type": "string",
            "enum": [
              "ZH",
              "EN",
              "JA"
            ],
            "description": "文本语言，仅 model 为 indextts-2.5 时可用，且必须提供。",
            "title": "Language"
          },
          "speed": {
            "type": "number",
            "minimum": 0.5,
            "maximum": 2,
            "default": 1,
            "description": "语速倍率，仅 model 为 indextts-2.5 时可用，范围 0.5–2。",
            "title": "Speed"
          },
          "emo_vector": {
            "anyOf": [
              {
                "items": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1.4
                },
                "type": "array",
                "minItems": 8,
                "maxItems": 8
              },
              {
                "type": "null"
              }
            ],
            "description": "八维情绪向量，顺序为 happy、angry、sad、afraid、disgusted、melancholic、surprised、calm，每项范围 0–1.4。",
            "title": "Emo Vector"
          },
          "text": {
            "maxLength": 2048,
            "minLength": 1,
            "description": "要合成的文本。indextts-2 最多 2048 个字符，indextts-2.5 最多 2000 个字符，且必须包含文字或数字。",
            "title": "Text",
            "type": "string"
          },
          "voice_asset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Asset Id",
            "description": "当前账号拥有的音色资产 ID。与 voice_preset_id、voice_ref_key 互斥。"
          },
          "voice_preset_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^vp_[a-f0-9]{24}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Preset voice ID from GET /voice-presets. Mutually exclusive with voice_asset_id and voice_ref_key.",
            "title": "Voice Preset Id"
          },
          "voice_ref_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Ref Key",
            "description": "声音参考 WAV 的引用值，与 voice_preset_id、voice_asset_id 互斥。通过上传接口登记的声音参考请使用 voice_asset_id。"
          },
          "webhook_endpoint_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^whe_[a-f0-9]{32}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registered webhook endpoint to notify when the job succeeds or fails.",
            "title": "Webhook Endpoint Id"
          },
          "emo_asset_id": {
            "type": "string",
            "format": "uuid",
            "description": "Emotion reference asset ID, uploaded with purpose emotion_reference. Mutually exclusive with emo_ref_key."
          }
        },
        "required": [
          "text"
        ],
        "title": "TTSRequest",
        "type": "object"
      },
      "ServiceUnavailableResponse": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          }
        },
        "required": [
          "code",
          "detail"
        ],
        "title": "ServiceUnavailableResponse",
        "type": "object"
      },
      "UploadUrlRequest": {
        "properties": {
          "content_type": {
            "title": "Content Type",
            "type": "string",
            "description": "Must match the filename extension. Supported formats include WAV, MP3, FLAC, M4A, OGG, PNG, JPEG, WebP and MP4, subject to the selected purpose. Video references are limited to 50 MiB, video audio references to 15 MiB, and images and voice WAV files to 20 MiB."
          },
          "filename": {
            "title": "Filename",
            "type": "string",
            "maxLength": 255
          },
          "display_name": {
            "maxLength": 80,
            "title": "Display Name",
            "type": "string"
          },
          "purpose": {
            "default": "input",
            "pattern": "^(input|api_input|voice_reference|emotion_reference|audio_material|image_reference|video_image|video_clip|video_audio)$",
            "title": "Purpose",
            "type": "string",
            "description": "Intended use of the asset: voice_reference, emotion_reference, audio_material, image_reference, video_image, video_clip or video_audio. Generation endpoints accept only assets whose purpose matches the use."
          },
          "rights_confirmed": {
            "default": false,
            "description": "Optional explicit rights confirmation. A confirmation timestamp is recorded only when this is supplied as true.",
            "title": "Rights Confirmed",
            "type": "boolean"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 104857600,
            "description": "Actual file size in bytes, required for every upload. The uploaded file must match it. Per-purpose limits also apply; audio_material accepts WAV or MP3 up to 100 MiB.",
            "title": "Size Bytes"
          }
        },
        "required": [
          "filename",
          "content_type",
          "size_bytes"
        ],
        "title": "UploadUrlRequest",
        "type": "object"
      },
      "UploadUrlResponse": {
        "properties": {
          "asset_id": {
            "type": "string",
            "title": "Asset Id"
          },
          "delete_after": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delete After",
            "description": "When this upload is deleted if it has not been confirmed."
          },
          "expires_in": {
            "title": "Expires In",
            "type": "integer",
            "description": "Upload authorization expires after 300 seconds. Complete the upload within one hour."
          },
          "upload_url": {
            "title": "Upload Url",
            "type": "string"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Send every returned header unchanged with the PUT request. Content-Length is the declared size; browsers set it automatically."
          }
        },
        "required": [
          "upload_url",
          "expires_in",
          "asset_id",
          "headers",
          "delete_after"
        ],
        "title": "UploadUrlResponse",
        "type": "object"
      },
      "UploadCompleteResponse": {
        "properties": {
          "asset_id": {
            "title": "Asset Id",
            "type": "string"
          },
          "uploaded_at": {
            "format": "date-time",
            "title": "Uploaded At",
            "type": "string"
          },
          "retained_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Media retention deadline, or null for permanent retention. Signed URL lifetime is independent."
          }
        },
        "required": [
          "asset_id",
          "uploaded_at",
          "retained_until"
        ],
        "title": "UploadCompleteResponse",
        "type": "object"
      },
      "WebhookEndpointResponse": {
        "type": "object",
        "title": "WebhookEndpointResponse",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^whe_[a-f0-9]{32}$"
          },
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2083
          },
          "enabled": {
            "type": "boolean"
          },
          "secret_version": {
            "type": "integer",
            "minimum": 1
          },
          "last_delivery_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_failure_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "enabled",
          "secret_version",
          "created_at",
          "updated_at"
        ]
      },
      "WebhookEndpointCreatedResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEndpointResponse"
          },
          {
            "type": "object",
            "properties": {
              "signing_secret": {
                "type": "string",
                "pattern": "^whsec_"
              }
            },
            "required": [
              "signing_secret"
            ]
          }
        ],
        "title": "WebhookEndpointCreatedResponse"
      },
      "CreateWebhookEndpointRequest": {
        "type": "object",
        "title": "CreateWebhookEndpointRequest",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "maxLength": 2083
          }
        },
        "required": [
          "name",
          "url"
        ]
      },
      "UpdateWebhookEndpointRequest": {
        "type": "object",
        "title": "UpdateWebhookEndpointRequest",
        "additionalProperties": false,
        "minProperties": 1,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "maxLength": 2083
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "WebhookActionResponse": {
        "type": "object",
        "title": "WebhookActionResponse",
        "properties": {
          "delivery_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "const": "pending"
          }
        },
        "required": [
          "delivery_id",
          "status"
        ]
      },
      "WebhookDeliveryPage": {
        "type": "object",
        "title": "WebhookDeliveryPage",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryResponse"
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items"
        ]
      },
      "WebhookDeliveryResponse": {
        "type": "object",
        "title": "WebhookDeliveryResponse",
        "properties": {
          "id": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "job.succeeded",
              "job.failed",
              "endpoint.test"
            ]
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "delivered",
              "failed",
              "suppressed"
            ]
          },
          "attempt_count": {
            "type": "integer",
            "minimum": 0
          },
          "last_http_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "event_id",
          "event_type",
          "status",
          "attempt_count",
          "created_at"
        ]
      },
      "VideoConfiguration": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "available": {
            "type": "boolean"
          },
          "available_resolutions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "768p",
                "2k"
              ]
            }
          },
          "message": {
            "type": "string"
          },
          "billing": {
            "$ref": "#/components/schemas/VideoBillingSettings"
          },
          "available_modes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "t2va",
                "fl2va",
                "ref2va"
              ]
            }
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VideoModel"
            }
          }
        },
        "required": [
          "enabled",
          "available",
          "available_resolutions",
          "message",
          "billing",
          "available_modes"
        ]
      },
      "VideoBillingSettings": {
        "type": "object",
        "properties": {
          "credits_per_second": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VideoRate"
            }
          },
          "official_enabled": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          }
        },
        "required": [
          "credits_per_second",
          "version",
          "updated_at"
        ]
      },
      "VideoRate": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "模型 ID。",
            "enum": [
              "minmax-h3-flash",
              "minmax-h3-pro",
              "wan3.0-video",
              "seedance-2.0",
              "seedance-2.5",
              "seedance-2.5-flash",
              "kling-4.0",
              "seedance-2.0-mini",
              "seedance-2.0-fast"
            ]
          },
          "resolution": {
            "type": "string",
            "description": "该模型的输出清晰度。",
            "enum": [
              "768p",
              "2k",
              "480p",
              "720p",
              "1080p",
              "4k"
            ]
          },
          "credits_per_second": {
            "description": "按输出秒数计费的积分。Token 计费模型返回 null。",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "input_video_credits_per_second": {
            "description": "带参考视频时按输入视频秒数计费的积分。",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "credits_per_million_tokens": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Credits per million generated video tokens for requests without video input."
          },
          "credits_per_million_tokens_with_video": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Credits per million billable tokens for requests with video input."
          }
        },
        "required": [
          "model",
          "resolution",
          "credits_per_second"
        ]
      },
      "VideoModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "模型 ID，用于 VideoRequest.model。"
          },
          "name": {
            "type": "string",
            "description": "模型显示名称。"
          },
          "modes": {
            "type": "array",
            "description": "模型支持的生成模式。",
            "items": {
              "type": "string",
              "enum": [
                "t2va",
                "fl2va",
                "ref2va"
              ]
            }
          },
          "ratios": {
            "type": "array",
            "description": "模型支持的输出画幅。",
            "items": {
              "type": "string"
            }
          },
          "min_duration": {
            "type": "integer",
            "description": "单个输出允许的最短时长，单位为秒。"
          },
          "max_duration": {
            "type": "integer",
            "description": "单个输出允许的最长时长，单位为秒。"
          },
          "max_prompt_chars": {
            "type": "integer",
            "description": "提示词最大字符数。"
          },
          "supports_seed": {
            "type": "boolean",
            "description": "是否接受 VideoRequest.seed。"
          },
          "style_presets": {
            "type": "array",
            "description": "模型允许提交的风格预设值。",
            "items": {
              "type": "string"
            }
          },
          "available": {
            "type": "boolean",
            "description": "模型当前是否可以提交。"
          },
          "available_resolutions": {
            "type": "array",
            "description": "当前可以提交的清晰度。",
            "items": {
              "type": "string"
            }
          },
          "rates": {
            "type": "array",
            "description": "该模型的费率列表。列表中的规格不一定都可提交，以 available_resolutions 为准。",
            "items": {
              "$ref": "#/components/schemas/VideoRate"
            }
          },
          "max_images": {
            "type": "integer",
            "description": "最多可提交的图片参考数量。",
            "minimum": 0
          },
          "max_videos": {
            "type": "integer",
            "description": "最多可提交的视频参考数量。",
            "minimum": 0
          },
          "max_audios": {
            "type": "integer",
            "description": "最多可提交的音频参考数量。",
            "minimum": 0
          },
          "max_references": {
            "type": "integer",
            "description": "参考素材总数上限。",
            "minimum": 0
          },
          "resolutions": {
            "type": "array",
            "description": "模型支持的全部清晰度；当前可以提交的清晰度见 available_resolutions。",
            "items": {
              "type": "string"
            }
          },
          "supports_generate_audio": {
            "type": "boolean",
            "description": "是否支持请求中控制生成音频。"
          },
          "supports_audio_only": {
            "type": "boolean",
            "description": "是否允许仅使用音频参考素材。"
          },
          "keyframe_adaptive_only": {
            "type": "boolean",
            "description": "首尾帧模式是否必须使用 adaptive 画幅。"
          },
          "min_clip_seconds": {
            "type": "integer",
            "description": "参考视频片段的最短时长，单位为秒。"
          },
          "max_clip_seconds": {
            "type": "integer",
            "description": "参考视频片段的最长时长，单位为秒。"
          },
          "max_combined_seconds": {
            "type": "integer",
            "description": "多个参考视频合计时长上限，单位为秒。"
          }
        },
        "required": [
          "id",
          "name",
          "modes",
          "ratios",
          "min_duration",
          "max_duration",
          "max_prompt_chars",
          "supports_seed",
          "style_presets",
          "available",
          "available_resolutions",
          "rates",
          "max_images",
          "max_videos",
          "max_audios",
          "max_references"
        ]
      },
      "VideoRequest": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "description": "生成模式。t2va 为文生视频，fl2va 使用首帧和尾帧，ref2va 使用多模态参考素材。",
            "enum": [
              "t2va",
              "fl2va",
              "ref2va"
            ]
          },
          "prompt": {
            "type": "string",
            "description": "视频提示词。可使用请求中已登记的 Picture、Video 和 Audio 引用标记。",
            "minLength": 1,
            "maxLength": 20000
          },
          "duration": {
            "type": "integer",
            "description": "输出时长，具体范围由 GET /v1/video/config 返回的模型能力决定。",
            "minimum": 1,
            "maximum": 30,
            "default": 5
          },
          "ratio": {
            "type": "string",
            "description": "输出画幅。部分模型的首尾帧请求必须使用 adaptive，以 GET /v1/video/config 为准。",
            "enum": [
              "16:9",
              "9:16",
              "1:1",
              "4:3",
              "3:4",
              "21:9",
              "adaptive"
            ]
          },
          "seed": {
            "type": "integer",
            "description": "可选的非负随机种子，用于需要稳定结果的请求。",
            "minimum": 0,
            "maximum": 2147483647
          },
          "references": {
            "type": "array",
            "description": "有序参考素材。kind 为 image、video 或 audio，role 为 reference、first 或 last。",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/VideoReference"
            }
          },
          "resolution": {
            "type": "string",
            "description": "输出清晰度。模型支持的实际选项以 GET /v1/video/config 返回为准。",
            "enum": [
              "768p",
              "2k",
              "480p",
              "720p",
              "1080p",
              "4k"
            ],
            "default": "768p",
            "title": "Resolution"
          },
          "model": {
            "type": "string",
            "description": "视频模型 ID。省略时使用默认模型。提交前应先读取 GET /v1/video/config 并报价。",
            "enum": [
              "minmax-h3-flash",
              "minmax-h3-pro",
              "wan3.0-video",
              "seedance-2.0",
              "seedance-2.5",
              "seedance-2.5-flash",
              "kling-4.0",
              "seedance-2.0-mini",
              "seedance-2.0-fast"
            ]
          },
          "quote_version": {
            "type": "integer",
            "description": "报价配置版本。必须与 POST /v1/video/quote 返回的版本一致。",
            "minimum": 1
          },
          "style_preset": {
            "type": "string",
            "description": "风格预设，仅可传入 GET /v1/video/config 为所选模型返回的 style_presets 中的值；没有可用预设时省略。"
          },
          "voice_bindings": {
            "type": "array",
            "description": "将图片素材与声音素材绑定，用于指定角色的画面和声音。",
            "maxItems": 30,
            "items": {
              "$ref": "#/components/schemas/VideoVoiceBinding"
            }
          },
          "generate_audio": {
            "type": "boolean",
            "description": "Whether to generate audio with the video, for models whose supports_generate_audio is true. Defaults to true."
          },
          "quote_id": {
            "type": "string",
            "description": "POST /v1/video/quote 返回的报价 ID，绑定本次模型、素材、提示词、时长和清晰度。"
          }
        },
        "required": [
          "mode",
          "prompt",
          "duration",
          "ratio",
          "references",
          "resolution"
        ]
      },
      "VideoReference": {
        "type": "object",
        "properties": {
          "asset_id": {
            "description": "当前账号拥有且已完成上传的素材 ID。",
            "type": "string"
          },
          "kind": {
            "description": "素材类型。image、video 或 audio。",
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio"
            ]
          },
          "role": {
            "description": "素材用途。reference 为普通参考，first 和 last 仅用于首尾帧模式。",
            "type": "string",
            "enum": [
              "reference",
              "first",
              "last"
            ]
          }
        },
        "required": [
          "asset_id",
          "kind",
          "role"
        ]
      },
      "VideoVoiceBinding": {
        "type": "object",
        "properties": {
          "image_asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "audio_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "image_asset_id",
          "audio_asset_id"
        ]
      },
      "JobCancellationResponse": {
        "properties": {
          "job_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JobStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "ok": {
            "default": true,
            "title": "Ok",
            "type": "boolean"
          }
        },
        "title": "JobCancellationResponse",
        "type": "object"
      },
      "ImageConfiguration": {
        "properties": {
          "reference_rates": {
            "type": "object",
            "description": "Per-model reference image surcharge in credits. Models absent from this map do not charge for reference images.",
            "additionalProperties": {
              "type": "object",
              "required": [
                "credits",
                "free_images"
              ],
              "properties": {
                "credits": {
                  "type": "number",
                  "minimum": 0
                },
                "free_images": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "max_reference_images": {
            "type": "object",
            "description": "Maximum number of input images per model.",
            "additionalProperties": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          },
          "available": {
            "type": "boolean"
          },
          "billing": {
            "$ref": "#/components/schemas/ImageBillingSettings"
          },
          "enabled": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "models": {
            "items": {
              "enum": [
                "doubao-seedream-5-0-pro-260628",
                "doubao-seedream-5-0-flash-260915",
                "doubao-seedream-5-5-261028",
                "sx-image-2.6-sunburst"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "sizes": {
            "items": {
              "enum": [
                "1024x1024",
                "1536x1024",
                "1024x1536",
                "2048x2048",
                "2048x1152",
                "1152x2048",
                "1776x2368",
                "2368x1776"
              ],
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "enabled",
          "available",
          "message",
          "models",
          "sizes",
          "billing"
        ],
        "type": "object"
      },
      "ImageBillingSettings": {
        "properties": {
          "rates": {
            "items": {
              "$ref": "#/components/schemas/ImageRate"
            },
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "required": [
          "rates",
          "version",
          "updated_at"
        ],
        "type": "object"
      },
      "ImageRate": {
        "properties": {
          "credits": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "maximum": 1000000,
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "enum": [
              "doubao-seedream-5-0-pro-260628",
              "doubao-seedream-5-0-flash-260915",
              "doubao-seedream-5-5-261028",
              "sx-image-2.6-sunburst"
            ],
            "type": "string"
          },
          "size": {
            "enum": [
              "1024x1024",
              "1536x1024",
              "1024x1536",
              "2048x2048",
              "2048x1152",
              "1152x2048"
            ],
            "type": "string"
          }
        },
        "required": [
          "model",
          "size",
          "credits"
        ],
        "type": "object"
      },
      "ImageRequest": {
        "properties": {
          "reference_asset_ids": {
            "type": "array",
            "description": "按顺序排列的参考图片素材 ID，与 reference_asset_id 二选一，最多 10 张。",
            "maxItems": 10,
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "enum": [
              "text-to-image",
              "image-to-image"
            ],
            "description": "生成模式。text-to-image 不接受参考图，image-to-image 至少需要一张参考图。",
            "type": "string"
          },
          "model": {
            "enum": [
              "doubao-seedream-5-0-pro-260628",
              "doubao-seedream-5-0-flash-260915",
              "doubao-seedream-5-5-261028",
              "sx-image-2.6-sunburst"
            ],
            "type": "string",
            "description": "图片模型 ID。可用模型以 GET /v1/image/config 返回为准。"
          },
          "prompt": {
            "maxLength": 32000,
            "minLength": 1,
            "description": "图片提示词，长度为 1–32000 个字符。",
            "type": "string"
          },
          "rate_version": {
            "minimum": 1,
            "description": "GET /v1/image/config 返回的费率版本，提交时必须保持一致。",
            "type": "integer"
          },
          "reference_asset_id": {
            "type": "string",
            "description": "Asset ID of a single reference image. Use either this field or reference_asset_ids."
          },
          "size": {
            "enum": [
              "1024x1024",
              "1536x1024",
              "1024x1536",
              "2048x2048",
              "2048x1152",
              "1152x2048",
              "1776x2368",
              "2368x1776"
            ],
            "type": "string",
            "description": "Output dimensions. 1776x2368 and 2368x1776 use the reported 1024x1536 and 1536x1024 rates respectively."
          }
        },
        "required": [
          "mode",
          "model",
          "prompt",
          "size",
          "rate_version"
        ],
        "type": "object"
      },
      "ImageSubmissionRequest": {
        "properties": {
          "reference_asset_ids": {
            "type": "array",
            "description": "Ordered original reference images for image-to-image. Use either this field or reference_asset_id.",
            "maxItems": 16,
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "enum": [
              "text-to-image",
              "image-to-image"
            ],
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "prompt": {
            "maxLength": 32000,
            "minLength": 1,
            "type": "string"
          },
          "quality": {
            "type": "string"
          },
          "rate_version": {
            "minimum": 1,
            "type": "integer"
          },
          "reference_asset_id": {
            "type": "string"
          },
          "size": {
            "type": "string"
          }
        },
        "required": [
          "mode",
          "model",
          "prompt",
          "size",
          "rate_version"
        ],
        "type": "object",
        "description": "The original image request that received no response. It must match the original request body."
      },
      "VideoQuoteInput": {
        "type": "object",
        "properties": {
          "estimated_reference_seconds": {
            "type": "number",
            "minimum": 0,
            "maximum": 30,
            "description": "Optional estimate of the reference media length, for an early cost estimate. A quote that uses this field has no quote_id and cannot be used to submit a generation."
          },
          "operation": {
            "type": "string",
            "enum": [
              "generate"
            ]
          },
          "request": {
            "$ref": "#/components/schemas/VideoRequest"
          }
        },
        "required": [
          "operation",
          "request"
        ]
      },
      "VideoQuote": {
        "type": "object",
        "properties": {
          "estimated_tokens": {
            "type": "integer",
            "description": "Estimated total billable video tokens for a token-priced model."
          },
          "credits_per_million_tokens": {
            "type": "number",
            "description": "The token rate selected for this request, in credits per million tokens."
          },
          "model": {
            "type": "string"
          },
          "resolution": {
            "type": "string"
          },
          "billable_seconds": {
            "type": "number"
          },
          "credits_per_second": {
            "type": "number"
          },
          "credits": {
            "type": "number"
          },
          "rate_version": {
            "type": "integer"
          },
          "quote_id": {
            "type": "string"
          },
          "input_video_seconds": {
            "type": "number"
          },
          "output_credits": {
            "type": "number"
          },
          "input_video_credits": {
            "type": "number"
          }
        },
        "required": [
          "model",
          "resolution",
          "billable_seconds",
          "credits_per_second",
          "credits",
          "rate_version"
        ]
      },
      "VoiceDesignConfiguration": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "available": {
            "type": "boolean"
          },
          "model": {
            "type": "string",
            "description": "百炼音色设计和试听合成使用的模型。"
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "zh",
                "en",
                "ja",
                "ko"
              ]
            },
            "description": "当前已配置并可连接的音色设计语种。提交前同时检查 available。"
          },
          "message": {
            "type": "string"
          },
          "billing": {
            "$ref": "#/components/schemas/VoiceDesignBilling"
          }
        },
        "required": [
          "enabled",
          "available",
          "model",
          "billing"
        ]
      },
      "VoiceDesignBilling": {
        "type": "object",
        "properties": {
          "credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "credits",
          "version",
          "updated_at"
        ]
      },
      "VoiceDesignRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "description": "候选音色名称，1–80 个字符。"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "声音特征描述，1–500 个字符。"
          },
          "preview_text": {
            "type": "string",
            "minLength": 15,
            "maxLength": 200,
            "description": "用于试听候选音色的文本，15–200 个字符。"
          },
          "language": {
            "type": "string",
            "enum": [
              "zh",
              "en",
              "ja",
              "ko"
            ],
            "description": "候选音色语言。可用语种以音色设计配置返回的 languages 为准。"
          },
          "quote_version": {
            "type": "integer",
            "format": "int64",
            "description": "Billing version from GET /v1/voice-design/config. A mismatch returns 409 before any credits are reserved."
          }
        },
        "required": [
          "name",
          "description",
          "preview_text",
          "language"
        ]
      },
      "AudioCompositionQuote": {
        "type": "object",
        "properties": {
          "credits": {
            "type": "number"
          },
          "estimated": {
            "type": "boolean"
          },
          "segments": {
            "type": "integer"
          }
        },
        "additionalProperties": false,
        "required": [
          "credits",
          "estimated",
          "segments"
        ]
      },
      "AudioCompositionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "indextts-2",
              "indextts-2.5"
            ],
            "default": "indextts-2",
            "description": "语音模型 ID。省略时使用 indextts-2。indextts-2.5 需要同时提供 language，使用 voice_preset_id 或 voice_asset_id 选择音色，并用 emo_text 控制情绪。"
          },
          "speed": {
            "type": "number",
            "minimum": 0.5,
            "maximum": 2,
            "default": 1,
            "description": "语速倍率，仅 model 为 indextts-2.5 时可用，范围 0.5–2。"
          },
          "prompt_document": {
            "$ref": "#/components/schemas/PromptDocument",
            "description": "可选的 v1 结构化时间轴文档。省略时根据 text 解析简单时间轴。"
          },
          "text": {
            "type": "string",
            "description": "台词文本。使用 prompt_document 时，建议同时提供与文档一致的文本。"
          },
          "voice_preset_id": {
            "type": "string",
            "description": "默认人声音色预置 ID，与 voice_asset_id、voice_ref_key 互斥。"
          },
          "voice_asset_id": {
            "type": "string",
            "description": "默认人声音色资产 ID，与 voice_preset_id、voice_ref_key 互斥。"
          },
          "emo_asset_id": {
            "type": "string",
            "description": "默认情绪参考素材 ID，与 emo_ref_key、emo_vector 互斥。"
          },
          "voice_ref_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Ref Key",
            "description": "默认人声的声音参考引用值。model 为 indextts-2.5 时不支持该字段，请使用 voice_asset_id。"
          },
          "emo_ref_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Emo Ref Key",
            "description": "默认人声的情绪参考 WAV 引用值，与 emo_asset_id、emo_vector 互斥。"
          },
          "emo_alpha": {
            "default": 1,
            "maximum": 1,
            "minimum": 0,
            "description": "情绪参考或向量强度，范围 0–1。",
            "title": "Emo Alpha",
            "type": "number"
          },
          "emo_vector": {
            "anyOf": [
              {
                "items": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1.4
                },
                "type": "array",
                "minItems": 8,
                "maxItems": 8
              },
              {
                "type": "null"
              }
            ],
            "description": "八维情绪向量，顺序为 happy、angry、sad、afraid、disgusted、melancholic、surprised、calm。",
            "title": "Emo Vector"
          }
        },
        "additionalProperties": false,
        "required": [
          "text"
        ]
      },
      "PromptDocument": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "const": 1
          },
          "parts": {
            "type": "array",
            "maxItems": 2048,
            "items": {
              "$ref": "#/components/schemas/PromptPart"
            }
          }
        },
        "additionalProperties": false,
        "required": [
          "version",
          "parts"
        ]
      },
      "PromptPart": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "text"
              },
              "text": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "type",
              "text"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "reference"
              },
              "reference_id": {
                "type": "string",
                "format": "uuid"
              },
              "label": {
                "type": "string",
                "maxLength": 240
              }
            },
            "additionalProperties": false,
            "required": [
              "type",
              "reference_id",
              "label"
            ]
          }
        ]
      },
      "VideoUpscaleConfiguration": {
        "type": "object",
        "required": [
          "available",
          "presets",
          "reason"
        ],
        "properties": {
          "available": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          },
          "presets": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "credits_per_second"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "enum": [
                    "1080p",
                    "2k",
                    "4k"
                  ]
                },
                "credits_per_second": {
                  "type": "number"
                }
              }
            }
          }
        }
      },
      "VideoUpscaleRequest": {
        "type": "object",
        "required": [
          "preset"
        ],
        "properties": {
          "source_job_id": {
            "type": "string"
          },
          "source_asset_id": {
            "type": "string"
          },
          "preset": {
            "type": "string",
            "enum": [
              "1080p",
              "2k",
              "4k"
            ]
          }
        },
        "description": "Exactly one owned generated job or uploaded MP4 source; immutable source and tier are bound to Idempotency-Key."
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      },
      "APIKeyBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "APIKey",
        "description": "API Key sent as Authorization: Bearer. This is not a console login credential."
      },
      "HTTPBearer": {
        "scheme": "bearer",
        "type": "http",
        "description": "Console login credential sent as Authorization: Bearer."
      }
    }
  }
}
