API overview
Use the API directly when your application does not use the SDK. All public endpoints are served from:
https://api.teenage.worksAuthentication
Send a project API key as a bearer token on authenticated requests:
Authorization: Bearer tw_live_...GET /health and GET /v1/voices are public. Speech, readiness, model, capability, and usage requests require authentication.
Make a speech request
curl https://api.teenage.works/v1/audio/speech \
-H "Authorization: Bearer tw_live_..." \
-H "Content-Type: application/json" \
-d '{"input":"Hello from Teen V1.","language":"en","voice":"default","response_format":"mp3","stream":false}' \
--output speech.mp3Only input is required. The API defaults to teen-v1, Hindi, the default voice, PCM output, and streaming delivery.
Public endpoints
| Method | Path | Authentication | Purpose |
|---|---|---|---|
GET | /health | None | Check service health |
GET | /ready | Bearer | Inspect runtime readiness |
GET | /v1/models | Bearer | List available models |
GET | /v1/capabilities | Bearer | Inspect supported features and formats |
POST | /v1/audio/speech | Bearer | Generate speech |
GET | /v1/voices | None | List public voices |
GET | /v1/account/usage | Bearer | Read project usage and balance |
WS | /v1/audio/speech/stream-input/{voice_id} | Bearer | Stream text input and receive audio |
