{
  "openapi": "3.0.1",
  "info": {
    "title": "Text to Speech API — Batch, 30+ Languages, Pay per Character",
    "description": "Text-to-speech (TTS) API: turn one or many texts into MP3 or WAV voiceover files and get, for each text, a dataset item with the audio URL, duration and character count. English, French, Spanish, German and 30+ languages, auto-detected. No API key, pay per character.",
    "version": "0.1",
    "x-build-id": "a2eYBiwrN76edqjvt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sherwood~text-to-speech-batch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sherwood-text-to-speech-batch",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/sherwood~text-to-speech-batch/runs": {
      "post": {
        "operationId": "runs-sync-sherwood-text-to-speech-batch",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/sherwood~text-to-speech-batch/run-sync": {
      "post": {
        "operationId": "run-sync-sherwood-text-to-speech-batch",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "texts": {
            "title": "Texts",
            "type": "array",
            "description": "Texts to turn into speech, as a list, up to 5,000 characters each. One dataset item is returned per text, with an index matching the input order. For a single text, use text instead. Aliases merged into this list: text, prompts, prompt, sentences.",
            "default": [
              "Welcome to our store. Your order has shipped and should arrive within three business days.",
              "Bienvenue dans notre boutique. Votre commande a été expédiée et arrivera sous trois jours ouvrés."
            ],
            "items": {
              "type": "string"
            }
          },
          "text": {
            "title": "Single text (alias)",
            "type": "string",
            "description": "A single text, voiced as one audio file. Merged with texts."
          },
          "prompts": {
            "title": "prompts (alias)",
            "type": "array",
            "description": "Alias of texts.",
            "items": {
              "type": "string"
            }
          },
          "sentences": {
            "title": "sentences (alias)",
            "type": "array",
            "description": "Alias of texts.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language",
            "enum": [
              "auto",
              "english",
              "french",
              "spanish",
              "german",
              "italian",
              "portuguese",
              "dutch",
              "polish",
              "russian",
              "turkish",
              "arabic",
              "hindi",
              "japanese",
              "korean",
              "chinese",
              "indonesian",
              "vietnamese",
              "thai",
              "swedish",
              "danish",
              "norwegian",
              "finnish",
              "greek",
              "czech",
              "romanian",
              "hungarian",
              "ukrainian",
              "bulgarian",
              "catalan",
              "croatian",
              "slovak",
              "slovenian",
              "hebrew",
              "malay",
              "afrikaans",
              "cantonese"
            ],
            "type": "string",
            "description": "Language of the texts: auto detects it per text (recommended for mixed batches), or force one of 36 languages. English uses the fast model by default; every other language uses the premium multilingual model. Malay and Cantonese must be forced; a detected language outside the list is voiced by the premium model with its own detection.",
            "default": "auto"
          },
          "voice": {
            "title": "Voice",
            "type": "string",
            "description": "female or male picks a natural default voice for the model in use. You can also pass an explicit voice id: Kokoro ids (af_heart, af_bella, am_michael, am_adam…) for English standard quality, MiniMax ids (Wise_Woman, Calm_Woman, Friendly_Person, Deep_Voice_Man, Patient_Man, Casual_Guy, Lively_Girl, Elegant_Man…) for premium.",
            "default": "female"
          },
          "quality": {
            "title": "Quality",
            "enum": [
              "standard",
              "premium"
            ],
            "type": "string",
            "description": "standard: Kokoro, fast and cheap, English only (other languages are automatically switched to premium). premium: MiniMax Speech 2.8, natural voices in 30+ languages, supports pauses like <#1.5#> and tags like (laughs).",
            "default": "standard"
          },
          "speed": {
            "title": "Speed",
            "type": "string",
            "description": "Speech speed multiplier, 0.5 to 2.0. 1.0 is natural.",
            "default": "1.0"
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "mp3",
              "wav"
            ],
            "type": "string",
            "description": "mp3 is the default for premium. The standard model always returns WAV.",
            "default": "mp3"
          },
          "maxTexts": {
            "title": "Max texts per run",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop after this many texts. Protects against oversized lists. Default 200.",
            "default": 200
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}