{
  "openapi": "3.0.1",
  "info": {
    "title": "Text to Speech – Natural AI Voices, MP3/WAV, No API Key",
    "description": "Text to speech with 54 natural AI voices: turn texts, articles or audiobook chapters into MP3, WAV or OGG. Open-source Kokoro model, no API key or subscription, commercial use OK. 8 languages, speed, bulk, SRT timestamps. $0.10 per 1,000 characters.",
    "version": "0.1",
    "x-build-id": "2Y8gUouwJEN1SEy4G"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~text-to-speech/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-text-to-speech",
        "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/gazidev~text-to-speech/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-text-to-speech",
        "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/gazidev~text-to-speech/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-text-to-speech",
        "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 to convert to speech",
            "type": "array",
            "description": "One audio file per text. Each entry can be a sentence, an article or a whole book chapter (long texts are split into sentence chunks and joined automatically).",
            "default": [
              "Hello! This voice was generated by an open-source AI model, with no API key and no subscription.",
              "Paste your own text, pick a voice and a format, and get a downloadable MP3 in seconds."
            ],
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Read texts from an Apify dataset (ID or name)",
            "type": "string",
            "description": "Optional. Chain after another Actor (e.g. a scraper or an article extractor): every item's text field becomes one audio file."
          },
          "textField": {
            "title": "Dataset field with the text",
            "type": "string",
            "description": "Field name in that dataset (dot notation for nested fields, e.g. `article.body`).",
            "default": "text"
          },
          "voice": {
            "title": "Voice",
            "enum": [
              "af_heart",
              "af_bella",
              "af_nicole",
              "af_aoede",
              "af_kore",
              "af_sarah",
              "af_nova",
              "af_sky",
              "af_alloy",
              "af_jessica",
              "af_river",
              "am_michael",
              "am_fenrir",
              "am_puck",
              "am_echo",
              "am_eric",
              "am_liam",
              "am_onyx",
              "am_adam",
              "am_santa",
              "bf_emma",
              "bf_isabella",
              "bf_alice",
              "bf_lily",
              "bm_george",
              "bm_fable",
              "bm_lewis",
              "bm_daniel",
              "ef_dora",
              "em_alex",
              "em_santa",
              "ff_siwis",
              "if_sara",
              "im_nicola",
              "pf_dora",
              "pm_alex",
              "pm_santa",
              "hf_alpha",
              "hf_beta",
              "hm_omega",
              "hm_psi",
              "zf_xiaobei",
              "zf_xiaoni",
              "zf_xiaoxiao",
              "zf_xiaoyi",
              "zm_yunjian",
              "zm_yunxi",
              "zm_yunxia",
              "zm_yunyang"
            ],
            "type": "string",
            "description": "54 natural neural voices. The voice's language is used automatically unless you set Language.",
            "default": "af_heart"
          },
          "language": {
            "title": "Language (pronunciation)",
            "enum": [
              "auto",
              "en-us",
              "en-gb",
              "es",
              "fr",
              "it",
              "pt-br",
              "hi",
              "zh"
            ],
            "type": "string",
            "description": "How the text is read. Usually leave on Auto and pick a voice in your language. You can mix them, e.g. an American voice reading Spanish gives an accent.",
            "default": "auto"
          },
          "speed": {
            "title": "Speed",
            "minimum": 0.5,
            "maximum": 2,
            "type": "number",
            "description": "0.5 = half speed, 1 = normal, 2 = double speed.",
            "default": 1
          },
          "format": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "wav",
              "ogg"
            ],
            "type": "string",
            "description": "Output file type. Audio is mono, 24 kHz.",
            "default": "mp3"
          },
          "bitrate": {
            "title": "Bitrate (MP3 / OGG)",
            "enum": [
              "48",
              "64",
              "96",
              "128",
              "160"
            ],
            "type": "string",
            "description": "Ignored for WAV. 64–96 kbps is transparent for speech.",
            "default": "96"
          },
          "mergeToOneFile": {
            "title": "Also merge all texts into one file",
            "type": "boolean",
            "description": "Adds one extra audio file with all texts joined in order (e.g. chapters into one audiobook). Free: characters are charged once.",
            "default": false
          },
          "subtitles": {
            "title": "Sentence timestamps (SRT subtitles)",
            "type": "boolean",
            "description": "Also save an .srt file per text with a timestamp for every sentence (chunks of max 200 characters). About 10% slower.",
            "default": false
          },
          "fileNamePrefix": {
            "title": "File name prefix",
            "type": "string",
            "description": "Files are saved as `<prefix>-001.mp3`, `<prefix>-002.mp3`…",
            "default": "speech"
          },
          "splitLongText": {
            "title": "Split long texts into sentence chunks",
            "type": "boolean",
            "description": "Recommended. Long texts are synthesized sentence by sentence and joined with natural pauses.",
            "default": true
          },
          "maxChunkCharacters": {
            "title": "Max characters per chunk",
            "minimum": 100,
            "maximum": 2000,
            "type": "integer",
            "description": "Sentences are grouped into chunks up to this size.",
            "default": 400
          },
          "maxCharacters": {
            "title": "Max characters per run (safety limit)",
            "minimum": 1,
            "type": "integer",
            "description": "The run stops after this many characters (the last text is cut at a sentence end). 100,000 characters ≈ 2 hours of audio.",
            "default": 100000
          },
          "modelVariant": {
            "title": "Model variant",
            "enum": [
              "auto",
              "fp32",
              "int8"
            ],
            "type": "string",
            "description": "Leave on Auto. Auto uses fp32 on x86 servers (Apify) and int8 on ARM. Same voice quality; only speed differs.",
            "default": "auto"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}