API Reference
Create phone session
POST /v1/sessions/phone — place an outbound PSTN call backed by a Speko voice session.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
{
"sessionId": "string",
"callControlId": "string",
"roomName": "string",
"status": "dialing",
"to": "+12015551234",
"from": "+12015551234"
}{
"error": "Invalid request body",
"code": "VALIDATION_ERROR"
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "not found",
"code": "NOT_FOUND"
}Sessions
Mints browser-safe media transport credentials, persists the pipeline config, and dispatches an agent worker. Use the returned `transportToken` and `transportUrl` with `@spekoai/client` to join from a browser.
Transcribe
Routes the request to the best STT provider for your `(language, region, optimizeFor)` intent, with automatic failover to runner-up providers. Body is binary audio. Routing intent goes in the `x-speko-intent` header (JSON).