{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Voice Generator & Cloner — 646-language TTS + cloning",
    "description": "Text to speech and voice cloning over HTTP. Design a voice (gender/age/pitch/accent) or clone one from a short sample, in 646 languages. Returns a WAV URL. Pay per request + per 1000 characters.",
    "version": "0.1",
    "x-build-id": "5qrhggs68zKsTjupI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/synthetic.ia~ai-voice-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-synthetic.ia-ai-voice-generator",
        "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/synthetic.ia~ai-voice-generator/runs": {
      "post": {
        "operationId": "runs-sync-synthetic.ia-ai-voice-generator",
        "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/synthetic.ia~ai-voice-generator/run-sync": {
      "post": {
        "operationId": "run-sync-synthetic.ia-ai-voice-generator",
        "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": [
          "text"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "design",
              "clone"
            ],
            "type": "string",
            "description": "Design a voice from scratch, or clone one from a reference sample.",
            "default": "design"
          },
          "text": {
            "title": "Text to speak",
            "type": "string",
            "description": "What the voice should say (max 5000 characters). Supports expressive tags like [laughter], [sigh], [surprise-ah].",
            "default": "Hola, esta voz fue generada con inteligencia artificial en Apify."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "ISO code (es, en, ja, it, pt…) or English name. 646 languages supported.",
            "default": "es"
          },
          "gender": {
            "title": "Gender (design)",
            "enum": [
              "female",
              "male"
            ],
            "type": "string",
            "description": "Design mode only.",
            "default": "male"
          },
          "age": {
            "title": "Age (design)",
            "enum": [
              "child",
              "teenager",
              "young_adult",
              "middle_aged",
              "elderly"
            ],
            "type": "string",
            "description": "Design mode only.",
            "default": "middle_aged"
          },
          "pitch": {
            "title": "Pitch (design)",
            "enum": [
              "very_low",
              "low",
              "moderate",
              "high",
              "very_high"
            ],
            "type": "string",
            "description": "Design mode only.",
            "default": "low"
          },
          "whisper": {
            "title": "Whisper / ASMR (design)",
            "type": "boolean",
            "description": "Design mode only. Whispered, breathy delivery.",
            "default": false
          },
          "accent": {
            "title": "Accent (design, English)",
            "type": "string",
            "description": "Design mode only, English voices: american, british, australian, indian…"
          },
          "referenceAudioUrl": {
            "title": "Reference audio URL (clone)",
            "type": "string",
            "description": "Clone mode: direct http(s) URL to ~10s+ of clean speech (WAV/MP3, max 12 MB)."
          },
          "referenceText": {
            "title": "Reference transcript (clone)",
            "type": "string",
            "description": "Clone mode: transcript of the reference audio (optional; improves the clone)."
          },
          "rightsConfirmed": {
            "title": "I have the right to clone this voice",
            "type": "boolean",
            "description": "Clone mode: you confirm you own this voice or are authorized to use it. Required to clone.",
            "default": false
          },
          "quality": {
            "title": "Quality",
            "enum": [
              "fast",
              "balanced",
              "high"
            ],
            "type": "string",
            "description": "Higher quality uses more inference steps.",
            "default": "high"
          },
          "speed": {
            "title": "Speed",
            "minimum": 0.5,
            "maximum": 2,
            "type": "number",
            "description": "0.5 (slow) to 2.0 (fast).",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}