{
  "openapi": "3.0.1",
  "info": {
    "title": "Kokoro Text to Speech - 54 voices, 9 languages, MP3 output",
    "description": "Turn text into natural speech with the Kokoro-82M model. 54 voices, 9 languages, MP3/WAV/Opus/FLAC.",
    "version": "0.1",
    "x-build-id": "6jpVUfZlrUTGWebeX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/superslowsloth~kokoro-text-to-speech/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-superslowsloth-kokoro-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/superslowsloth~kokoro-text-to-speech/runs": {
      "post": {
        "operationId": "runs-sync-superslowsloth-kokoro-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/superslowsloth~kokoro-text-to-speech/run-sync": {
      "post": {
        "operationId": "run-sync-superslowsloth-kokoro-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",
        "required": [
          "texts"
        ],
        "properties": {
          "texts": {
            "title": "Texts to speak",
            "type": "array",
            "description": "One entry per audio file. Long entries are split at sentence boundaries and joined back into a single file, so a whole article can go in one line. Up to 500,000 characters per run.",
            "items": {
              "type": "string"
            }
          },
          "voice": {
            "title": "Voice",
            "enum": [
              "af_heart",
              "af_bella",
              "af_nicole",
              "af_sarah",
              "af_sky",
              "af_alloy",
              "af_aoede",
              "af_jessica",
              "af_kore",
              "af_nova",
              "af_river",
              "am_adam",
              "am_michael",
              "am_echo",
              "am_eric",
              "am_fenrir",
              "am_liam",
              "am_onyx",
              "am_puck",
              "am_santa",
              "bf_emma",
              "bf_isabella",
              "bf_alice",
              "bf_lily",
              "bm_george",
              "bm_lewis",
              "bm_daniel",
              "bm_fable",
              "ef_dora",
              "em_alex",
              "em_santa",
              "ff_siwis",
              "hf_alpha",
              "hf_beta",
              "hm_omega",
              "hm_psi",
              "if_sara",
              "im_nicola",
              "jf_alpha",
              "jf_gongitsune",
              "jf_nezumi",
              "jf_tebukuro",
              "jm_kumo",
              "pf_dora",
              "pm_alex",
              "pm_santa",
              "zf_xiaobei",
              "zf_xiaoni",
              "zf_xiaoxiao",
              "zf_xiaoyi",
              "zm_yunjian",
              "zm_yunxi",
              "zm_yunxia",
              "zm_yunyang"
            ],
            "type": "string",
            "description": "Voice pack to speak with. The first letter is the accent (a: American, b: British, e: Spanish, f: French, h: Hindi, i: Italian, j: Japanese, p: Portuguese, z: Mandarin), the second is the speaker's gender.",
            "default": "af_heart"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en-us",
              "en-gb",
              "es",
              "fr-fr",
              "hi",
              "it",
              "ja",
              "pt-br",
              "cmn"
            ],
            "type": "string",
            "description": "Which pronunciation rules the text is read with. Match it to the voice: a Japanese voice reading English with American rules sounds wrong in a way no voice choice fixes.",
            "default": "en-us"
          },
          "speed": {
            "title": "Speaking speed",
            "enum": [
              "0.5",
              "0.75",
              "0.9",
              "1.0",
              "1.1",
              "1.25",
              "1.5",
              "2.0"
            ],
            "type": "string",
            "description": "Playback rate the model speaks at. 1.0 is the model's natural pace.",
            "default": "1.0"
          },
          "audioFormat": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "wav",
              "opus",
              "flac",
              "aac"
            ],
            "type": "string",
            "description": "Container the audio is delivered in. MP3 plays everywhere; WAV is uncompressed and much larger; Opus is the smallest at the same quality.",
            "default": "mp3"
          },
          "precision": {
            "title": "Model precision",
            "enum": [
              "int8",
              "fp32"
            ],
            "type": "string",
            "description": "Full precision sounds slightly cleaner on sibilants. Quantised is markedly faster, which on a per-character price is what you are paying for.",
            "default": "int8"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}