Skip to content
DikoAPI
API keys

Get the text of a library transcript

Open as Markdown

Returns the segments of a library transcript as paged JSON, or the whole text as text, srt or vtt.

GET/library/transcripts/{transcript_id}/transcript
Required scope
library:read
Authentication
Authorization: Bearer
Rate-limit policy
readaccountexport

It works like the meeting transcript; segments have speaker.id set to null.

Parameters

Parameters
NameInTypeRequiredDefaultConstraintsDescription
transcript_idpathstringrequired–6–64 characters · pattern: ^trn_[A-Za-z0-9_-]+$Public library transcript ID (trn_ prefix).
formatquerystringnojson–Response format: paged JSON, plain text, SubRip or WebVTT. Allowed values: jsontextsrtvtt
limitqueryintegerno2001–1000 · format: int32Page size, from 1 to 1000. Default 200. Follow has_more, not the page size.
cursorquerystringno–≤ 1024 charactersOpaque cursor from next_cursor of the previous page. Cursors are tied to the user, route, sort order and filters.

Response

200

Transcript segments, or the whole transcript as text, SubRip or WebVTT.

  • RateLimit The most restrictive policy that applied: "name";r=<requests left>;t=<seconds>, where t is the number of seconds until one more request is allowed (0 when the quota is full). Absent when no rate limiter ran for the request.
  • RateLimit-Policy The rate-limit policies that applied to the request, one "name";q=<burst>;w=<seconds> item per policy, for example "read";q=10;w=2, "account";q=20;w=2: q is the burst quota and w the seconds in which an empty quota refills. Sent on every authenticated response; absent when no rate limiter ran for the request, for example when it was rejected before the key was checked.
  • Request-Id ID of this request (req_ prefix), the same as request_id in an error body. It is also sent as X-Request-ID. Quote it when you contact support.
  • X-Client-Request-Id Your own X-Client-Request-Id request header, echoed back. It is sent only when the value you sent has 1-128 characters from A-Z a-z 0-9 . _ : -.
  • X-RateLimit-Limit Burst quota of the most restrictive policy (q in RateLimit-Policy). Absent when no rate limiter ran.
  • X-RateLimit-Remaining Requests left in the most restrictive policy (r in RateLimit). Absent when no rate limiter ran.
  • X-RateLimit-Reset Seconds until one more request is allowed in the most restrictive policy (t in RateLimit; 0 when the quota is full). It is a number of seconds, not a timestamp. Absent when no rate limiter ran.

Content type: application/json

  • objectstringrequired

    Always list.

  • dataarray<object>required

    The items of this page.

    8 fields
    • objectstringrequired

      Always transcript_segment.

    • indexintegerrequired

      Zero-based position of the segment in the transcript.

      0–2147483647 · format: int32

    • start_msintegerrequired

      Start in milliseconds from the beginning of the recording.

      0–9007199254740991 · format: int64

    • end_msintegerrequired

      End in milliseconds from the beginning of the recording.

      0–9007199254740991 · format: int64

    • speakerobject | nullrequired

      Who spoke, or null when unknown.

      3 fields
      • idstring | nullrequired

        Speaker ID. Null for library transcripts, which have no speaker records.

        26–26 characters · pattern: ^spk_[0-9A-Za-z]{22}$

      • labelstring | nullrequired

        Automatic speaker label.

      • namestring | nullrequired

        Speaker name, if assigned.

    • textstringrequired

      Approved text. A pending grammar suggestion is never included.

    • editedbooleanrequired

      Whether the text was edited after transcription.

    • has_pending_editbooleanrequired

      Whether a grammar suggestion waits for approval in Diko.

  • has_morebooleanrequired

    Whether more items follow. Keep paging while this is true.

  • next_cursorstring | nullrequired

    Cursor for the next page, or null when has_more is false.

    ≤ 1024 characters

  • revisionstringrequired

    Revision of the transcript. Paging is tied to it; a change returns 409 transcript_changed.

Content type: application/x-subrip

Content type: text/plain

Content type: text/vtt

Examples

Request

cURL
curl "https://api.diko.app/api/v1/library/transcripts/trn_ZFF3NHc5V2dYY1E/transcript?format=json&limit=200" \
  -H "Authorization: Bearer $DIKO_API_KEY"

Example response · 200 · application/json

JSON
{
  "object": "list",
  "data": [
    {
      "object": "transcript_segment",
      "index": 0,
      "start_ms": 1200,
      "end_ms": 5400,
      "speaker": {
        "id": "spk_0deCHcpckGv0OnXkWw7nUx",
        "label": "SPEAKER_00",
        "name": "Jonas"
      },
      "text": "Labas rytas.",
      "edited": false,
      "has_pending_edit": false
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "revision": "r_1bedcb71b3a1fdc6bfeeb92054fc6f92"
}

Example response · 200 · application/x-subrip

Text
1
00:00:01,200 --> 00:00:05,400
Labas rytas.

Example response · 200 · text/plain

Text
[00:00:01] Labas rytas.
[00:00:05] Pradėkime.

Example response · 200 · text/vtt

Text
WEBVTT

00:00:01.200 --> 00:00:05.400
Labas rytas.

Errors

This endpoint can return these errors. Every code is described in the error catalog.

HTTPCodeMeaningRetry?
400invalid_parameterA path, query or body parameter has an invalid value, a required field is missing or a field is unknown (unknown fields are rejected). `error.param` names the parameter.no
400invalid_cursorThe `cursor` is corrupted or was issued for another user, route, sort order or set of filters.no
401missing_api_keyThe request has no `Authorization` header.no
401invalid_api_keyThe header is unusable (a scheme other than `Bearer`, an empty key or more than one `Authorization` header) or the key is unknown or malformed (wrong structure or checksum). The response is identical in all these cases.no
401api_key_expiredThe key has expired.no
401api_key_revokedThe key was revoked: manually, after a rotation grace period ended, because of a leak or because the account was disabled.no
401api_key_disabledThe key is temporarily disabled.no
402subscription_requiredThe account has no active paid access.no
403ip_not_allowedThe key has an IP allowlist and the request IP is not on it, or it cannot be determined reliably.no
403account_disabledThe account is disabled.no
403email_not_verifiedThe account e-mail address is not verified.no
403api_access_suspendedA Diko administrator suspended API access for this account.no
403plan_requiredThe plan does not include the API. `error.details.required_plans` lists `verslas`.no
403insufficient_scopeThe key lacks the scope this endpoint needs. `error.details` contains `required_scopes` and `granted_scopes`.no
404not_foundThe resource does not exist, does not belong to your account or its ID is encoded incorrectly.no
409transcript_changedThe transcript changed while you were paging: its `revision` changed.conditionally
429rate_limit_exceededA rate-limit policy was exceeded. `error.details.policy` names it.yes, after Retry-After
500internal_errorAn internal server error.conditionally
503service_unavailableThe service is temporarily busy, for example because of database load.yes, after Retry-After

Search for a topic, an endpoint or an error code.

Search across all documentation pagesesc close