beatraDocs

Activate a cloned voice that waits for activation

POST
/v1/voices/{voice_id}/activate

Request Body

application/jsonRequired
metadataMetadata

Caller-supplied metadata; ≤16 keys, key ≤64 chars, value ≤512 chars

callback_urlCallback Url

HTTPS URL Beatra will POST the final Task envelope to when the Task reaches a terminal state

callback_signing_key_idCallback Signing Key Id

Optional standalone callback signing key. Omit for unsigned callback delivery; requires callback_url when provided.

confirmation_tokenConfirmation Token

The confirmation_token from the clone result's activation.quote (or a later quote); valid for 24 hours. Omit it to get a new quote; nothing is charged.

confirm_creditsConfirm Credits

The quoted price_credits, repeated to confirm the user agreed to exactly that price.

Path Parameters

voice_id
Required
Voice Id

Header Parameters

X-Request-Idstring

Optional client request id echoed in the response.

Idempotency-Key
Required
Idempotency-Key
Minimum length: 1Maximum length: 128
Authorization
Required
string

Bearer API key.

curl -X POST "https://api.beatra.ai/v1/voices/string/activate" \
  -H "X-Request-Id: string" \
  -H "Idempotency-Key: string" \
  -H "Authorization: string" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "property1": "string",
      "property2": "string"
    },
    "callback_url": "string",
    "callback_signing_key_id": "string",
    "confirmation_token": "string",
    "confirm_credits": 0
  }'

A quote (no confirmation_token), or a voice that needs no activation; nothing charged

{
  "task_id": "string",
  "status": "string",
  "terminal": true,
  "resolved_model": "string",
  "billing": {
    "charged_credits": "string",
    "refunded_credits": "string",
    "granted_credits": "string",
    "grant_source": "string",
    "net_charged_credits": "string"
  },
  "task": {
    "object": "task",
    "task_id": "string",
    "status": "queued",
    "capability": "string",
    "workload_type": "model",
    "model": "string",
    "resolved_model": "string",
    "model_selection_reason": null,
    "social": {
      "platform": "string",
      "operation_key": "string",
      "operation_name": "string",
      "schema_hash": "string"
    },
    "metadata": {
      "property1": "string",
      "property2": "string"
    },
    "input": {},
    "progress": {
      "percent": 100,
      "stage": "string",
      "message": "string"
    },
    "output": {},
    "warnings": [
      {
        "code": "string",
        "message": "string",
        "field": "string"
      }
    ],
    "error": {
      "code": "string",
      "type": "string",
      "message": "string",
      "retryable": true,
      "param": "string",
      "details": {},
      "request_id": "string"
    },
    "usage": {
      "input_tokens": 0,
      "output_tokens": 0,
      "cache_read_tokens": 0,
      "cache_creation_tokens": 0,
      "reasoning_tokens": 0,
      "image_count": 0,
      "image_pixels": 0,
      "video_seconds": 0,
      "input_video_seconds": 0,
      "output_video_seconds": 0,
      "audio_seconds": 0,
      "characters": 0,
      "lines": [
        {
          "meter": "string",
          "quantity": "string",
          "unit": "string",
          "billed_amount_credits": "string"
        }
      ],
      "credits": "string"
    },
    "billing": {
      "charged_credits": "string",
      "refunded_credits": "string",
      "granted_credits": "string",
      "grant_source": "string",
      "net_charged_credits": "string"
    },
    "callback": {
      "url": "string",
      "status": "pending",
      "attempt_count": 0,
      "delivered_at": "2019-08-24T14:15:22Z",
      "last_error": "string"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "started_at": "2019-08-24T14:15:22Z",
    "deadline_at": "2019-08-24T14:15:22Z",
    "completed_at": "2019-08-24T14:15:22Z",
    "cancel_requested_at": "2019-08-24T14:15:22Z",
    "links": {
      "self": "string",
      "cancel": "string",
      "assets": "string"
    }
  },
  "voice": {
    "voice_id": "string",
    "display_name": "string",
    "category": "preset",
    "language": "string",
    "languages_supported": [
      "string"
    ],
    "gender": "male",
    "age_group": "string",
    "accent": "string",
    "use_case": [
      "string"
    ],
    "persona": "string",
    "preview_url": "string",
    "preview_url_scene": "string",
    "compatible_models": [
      "string"
    ],
    "status": "processing",
    "created_at": "2019-08-24T14:15:22Z",
    "preview": {
      "url": "string",
      "text": "string",
      "language": "string",
      "version": 0
    },
    "activation": {
      "required": true,
      "price_credits": 0,
      "quote": {
        "voice_id": "string",
        "price_credits": 0,
        "balance_credits": "string",
        "sufficient_balance": true,
        "preview": {
          "url": "string",
          "text": "string",
          "language": "string",
          "version": 0
        },
        "confirmation_token": "string",
        "token_expires_at": "2019-08-24T14:15:22Z",
        "terms_version": "string",
        "terms": {
          "property1": [
            "string"
          ],
          "property2": [
            "string"
          ]
        },
        "message": "string"
      }
    },
    "expires_at": "2019-08-24T14:15:22Z",
    "clone_model": "string"
  },
  "charged_credits": "0",
  "quote": {
    "voice_id": "string",
    "price_credits": 0,
    "balance_credits": "string",
    "sufficient_balance": true,
    "preview": {
      "url": "string",
      "text": "string",
      "language": "string",
      "version": 0
    },
    "confirmation_token": "string",
    "token_expires_at": "2019-08-24T14:15:22Z",
    "terms_version": "string",
    "terms": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    },
    "message": "string"
  }
}

Last updated