Speko Docs
API Reference

Session recording and end

End a running session, and fetch its transcript and a short-lived recording download URL.

POST
/v1/sessions/{id}/end

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Resource id.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

{
  "ok": true,
  "status": "ended",
  "ended_at": "2026-10-27T12:00:00.000Z"
}

{
  "ok": true,
  "status": "ending"
}
{
  "error": "call has no room to tear down",
  "code": "NO_ROOM"
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
{
  "error": "not found",
  "code": "NOT_FOUND"
}
{
  "error": "failed to record the session end request",
  "code": "END_EVENT_FAILED"
}
{
  "error": "failed to end the session",
  "code": "END_FAILED"
}

{
  "error": "room service is not configured on this server",
  "code": "ROOMS_DISABLED"
}

GET
/v1/sessions/{id}/transcript

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Session id.

Formatuuid

Response Body

application/json

application/json

application/json

{
  "entries": [
    {
      "id": "string",
      "index": 0,
      "source": "user",
      "text": "string",
      "startedAt": "2019-08-24T14:15:22Z",
      "endedAt": "2019-08-24T14:15:22Z",
      "provider": "string",
      "model": "string"
    }
  ]
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
{
  "error": "session not found",
  "code": "SESSION_NOT_FOUND"
}
GET
/v1/sessions/{id}/recording

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Session id.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

{
  "url": "http://example.com",
  "expiresAt": "2019-08-24T14:15:22Z"
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}

{
  "error": "recording not available",
  "code": "RECORDING_NOT_AVAILABLE",
  "status": "uploading"
}

{
  "error": "failed to mint signed URL",
  "code": "SIGNED_URL_FAILED"
}