POST /api/v1/audio/speech · Operation ID: speechWithTimingsaudio:read. Resource access and effective policy still apply.curl --fail-with-body -X POST 'https://handwrites.io/api/v1/audio/speech' \
-H "Authorization: Bearer $HANDWRITE_API_KEY" \
-H 'Content-Type: application/json' \
--data '{"text":"Hello from Handwrite.","voice":"REPLACE_VOICE_ID","format":"mp3"}'application/json (required).| Field | Required | Meaning |
|---|---|---|
text | No | Send text or documentId, not both. |
documentId | No | string |
voice | Yes | A voice ID from GET /voices. |
format | No | See API schema |
model | No | string |
language | No | A BCP 47 language tag. |
offset | No | Where to start, in UTF-16 code units of the text. |
| Status | Meaning | Body format |
|---|---|---|
| 200 | Base64 audio and word timings. | application/json |
| 400 | invalid_request (the message names the field), validation_failed. | application/json |
| 401 | unauthorized: no token, or it's invalid, revoked or expired. | application/json |
| 403 | insufficient_scope, forbidden (you can see it but not do this), app_test_restricted, account_deleted (the account is scheduled for deletion; any request). | application/json |
| 404 | not_found: it doesn't exist or you can't see it (never 403 for documents you can't see). | application/json |
| 429 | rate_limited (burst or daily cap) or quota_exceeded (no characters left). | application/json |
| 500 | internal_error. | application/json |
| 502 | unavailable: an upstream service failed. | application/json |