Graine AI

Fetch a transcript

The conversation transcript for an execution.

The conversation transcript for an execution.

A call that has not produced a transcript yet — because it is still ringing, or because it never connected — answers 200 with status: "unavailable" and format: "none", not a 404. A 404 here would be indistinguishable from "no such call", and the difference matters to a client that is polling.

format is one of:

raw The transcript as stored. format in the response is turns when the transcript is structured, text when it is a flat string, and none when there is nothing yet.

english Machine-translated to English. The first request for a non-English call pays for the translation and the result is persisted, so subsequent reads are immediate. source reports what happened: cached, already_english, translated, translation_in_progress (another reader is translating right now — the original is returned meanwhile), translation_failed (the original is returned), or no_transcript.

Rate limit: 600 requests per minute per organization (bucket executions.list). Exceeding it returns 429 with Retry-After; the X-RateLimit-* response headers report your remaining allowance on every call.

GET
/v2/calls/{execution_id}/transcript
/v2/calls/dbcffa37-92a1-4ae7-9814-71ca7b8ab3d3/transcript?format=raw

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

Your Graine API key. Create one in the dashboard under Developers, or via POST /v2/api-keys. Send it as Authorization: Bearer <key>.

In: header

Path Parameters

execution_id
Required
Execution Id

The call's id, as returned by POST /v2/calls or GET /v2/calls.

Query Parameters

formatFormat

raw = the conversation as it happened. english = machine-translated to English, translated on first request and cached thereafter.

Default: "raw"

organization_idOrganization Id

Optional. Must equal your key's organization.

Response Body

200

The transcript, or format 'none' when the call has not produced one yet.

execution_idExecution Id | null

The call this transcript belongs to.

statusStatus | null

The call's status, or 'unavailable' when there is no transcript yet.

format
Required
Format

'turns' when the transcript is structured, 'text' when it is a flat string, 'none' when there is nothing yet.

turnsTurns | null

Set when format is 'turns'.

textText | null

Set when format is 'text'; null for every other format.

languageLanguage | null

Language the call was conducted in.

sourceSource | null

Where this text came from: call_record, cached, already_english, translated, translation_in_progress, translation_failed, no_transcript or not_started.

400

1000 — malformed or contradictory input. 1002 — a required parameter is missing.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

401

1100 — missing, unknown or inactive API key. 1101 — a browser session token was presented instead of an API key.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

403

1102 — the key is valid but lacks the scope this endpoint requires, or names another organization. GET /v2/scopes reports what a key holds.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

404

1200 — no such resource in your organization. A resource belonging to another organization answers 404, never 403.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

422

1001 — the body or query failed validation; the message names the first offending field.

error
Required
integer

Stable integer code from the error table. Branch on this, not on the message.

message
Required
string

One human-readable sentence. Wording may change; the code will not.

429

1300 — the per-organization request rate or concurrent-call limit was reached. Carries Retry-After.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

503

1501 — a service this endpoint depends on is unreachable or returned a 5xx.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

curl -X GET "https://api.graine.ai/v2/calls/dbcffa37-92a1-4ae7-9814-71ca7b8ab3d3/transcript?format=raw&organization_id=string" \
  -H "Authorization: Bearer <token>"

The transcript, or format 'none' when the call has not produced one yet.

{
  "execution_id": "dbcffa37-92a1-4ae7-9814-71ca7b8ab3d3",
  "status": "completed",
  "format": "turns",
  "turns": [
    {
      "role": "assistant",
      "content": "Hello, this is Kavya calling about the Bullet campaign.",
      "text": "Namaste, main Kavya bol rahi hoon."
    }
  ],
  "text": "Agent: Hello, this is Kavya calling about the Bullet campaign.",
  "language": "hi",
  "source": "call_record"
}