Skip to content
Search Documentation
Search across all documentation pages
SDKs & Libraries

SDKs

Transcodely ships three official server-side SDKs over the same Connect-RPC + custom JSON wire format. Each SDK gives you typed resource namespaces, auto-pagination, auto-idempotency on write calls, typed error classes, and Watch streams that auto-reconnect on transient failures.

The SDKs are thin transports — wire-format codec parity is enforced by a port of internal/connect/codec.go in each repo. The behavior you read about elsewhere in these docs (HLS path templates, codec compatibility, pricing, etc.) is identical whether you call the API by SDK or by raw HTTP.

Available SDKs

LanguagePackageMin runtimeVersion
JavaScript / TypeScript@transcodely/sdkNode.js 20+0.3.27
PythontranscodelyPython 3.10+0.3.26
Gogithub.com/transcodely/transcodely-goGo 1.23+0.3.26

These are pre-1.0 SemVer releases — minor versions may include breaking changes until 1.0.

A PHP client, transcodely-php, is in beta and is not yet on a par with the three SDKs above: it is installed with Composer from its GitHub repository (a VCS repository entry; it is not on Packagist), and it has not yet been exercised against the live API.

The public API surface is 127 RPCs across 15 services (Job, Video, Preset, Origin, App, APIKey, Organization, Membership, User, Health, Webhook, Billing, IngestRule, Import, PlaybackSigningKey). Each SDK exposes the full surface from the release noted in its changelog, with native idioms rather than a reduced subset — check an SDK’s changelog for the version that first carries a service you need. A new call can reach the API before an SDK release carries it. The newest ones are in the current releases: PlaybackSigningKeyService (playbackSigningKeys in JavaScript, playback_signing_keys in Python, PlaybackSigningKeys in Go), the seven VideoService calls for playback tokens and viewer progress (CreatePlaybackToken, GetViewerProgress, ListViewerProgress, DeleteViewerData, SummarizeViewerProgress, CreateProgressExport, GetProgressExport) and the three newest ImportService calls (Preview, UpdateSourceCredentials, ExportMapping) ship from @transcodely/sdk 0.3.27 and from 0.3.26 of the Python and Go SDKs. The same releases add a helper that signs a playback token on your own server with no network call: signPlaybackToken in JavaScript, sign_playback_token in Python and SignPlaybackToken in Go. See Protected Playback, the Playback Signing Keys reference and Viewer progress. VideoService.TranslateCaptions translates a hosted video’s existing AI captions into up to ten languages without transcribing again, billed at €0.02 per source minute per delivered language (minimum €0.05 per video per language) (no captions fee, no processing fee). A language an earlier call is still translating comes back under in_flight with that job’s ID instead of being requested again, and a call refused with unavailable / translation_busy created and billed nothing and can be retried after a few seconds. See Translate captions. VideoService.RestyleCaptions re-cuts a hosted video’s existing AI captions into another cue style (compact, standard or long, or explicit limits) without transcribing again, and is free; every SDK exposes it next to translation (Videos.RestyleCaptions in Go, videos.restyleCaptions in JavaScript, videos.restyle_captions in Python), along with the CueStyle and CueStylePreset types. See Restyle captions. Since 0.3.21 every SDK also exposes SetDefaultCaptionStyle and DeleteCaptionStyle (Go Videos.SetDefaultCaptionStyle / Videos.DeleteCaptionStyle, JavaScript videos.setDefaultCaptionStyle / videos.deleteCaptionStyle, Python videos.set_default_caption_style / videos.delete_caption_style), which keep several caption styles of a language side by side; both return the updated video. Since 0.3.22 every SDK also exposes VideoService.GetFreeTrial (Go Videos.GetFreeTrial, JavaScript videos.getFreeTrial, Python videos.get_free_trial), a free read-only check of whether the organization can still take its free captions trial; the trial is taken by setting free_trial on an upload or CreateFromUrl call, and API-key callers get status unavailable with reason user_required. Since 0.3.23 every SDK carries JobFee.minimum_per_language, the per-language floor of a translation fee. Since 0.3.24 every SDK also carries the delivery regions of an app’s hosting configuration (HostingConfig.delivery_regions, set through UpdateHostingConfig) and the per-region delivery usage of VideoService.GetUsage (egress_by_region). See Delivery regions.

Billing is the one namespace an API key cannot reach. Invoices, budgets and the outstanding balance settle a whole organization, while a key is scoped to a single app, so BillingService refuses API keys outright and requires a dashboard session token belonging to an organization owner, plus the X-Organization-ID header. The SDKs expose the namespace either way — construct the client with the session token instead of a key.

Install and authenticate

Each SDK takes the API key explicitly so the calling code stays in control. The conventional environment variable is TRANSCODELY_API_KEY — read it once at startup and pass it in.

// $ npm install @transcodely/sdk

import { Transcodely } from "@transcodely/sdk";

const client = new Transcodely({
  apiKey: process.env.TRANSCODELY_API_KEY!,
});
# $ pip install transcodely

import os
from transcodely import Transcodely

with Transcodely(api_key=os.environ["TRANSCODELY_API_KEY"]) as client:
    ...
// $ go get github.com/transcodely/transcodely-go

package main

import (
    "log"
    "os"

    "github.com/transcodely/transcodely-go"
)

func main() {
    client, err := transcodely.New(os.Getenv("TRANSCODELY_API_KEY"))
    if err != nil {
        log.Fatal(err)
    }
    _ = client
}

See Authentication for the full key lifecycle and API Keys for details.

Your first job

The same Create-Job call in four ways. Each SDK accepts native types; everything is serialized to the snake_case JSON the API expects. It points at a public sample clip and delivers to Transcodely hosting (managed: true), so it runs before you own any storage. It asks for standard quality, which the free tier includes; only premium needs a payment method.

curl -X POST https://api.transcodely.com/transcodely.v1.JobService/Create 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "Content-Type: application/json" 
  -d '{
    "input_url": "https://www.transcodely.com/samples/transcodely-sample-30s.mp4",
    "managed": true,
    "outputs": [
      {
        "type": "hls",
        "video": [{ "codec": "h264", "resolution": "1080p", "quality": "standard" }]
      }
    ]
  }'
import { Transcodely, OutputFormat, VideoCodec, Resolution, QualityTier } from "@transcodely/sdk";

const client = new Transcodely({ apiKey: process.env.TRANSCODELY_API_KEY! });

const job = await client.jobs.create({
  inputUrl: "https://www.transcodely.com/samples/transcodely-sample-30s.mp4",
  managed: true,
  outputs: [
    {
      type: OutputFormat.HLS,
      video: [
        { codec: VideoCodec.H264, resolution: Resolution.RESOLUTION_1080P, quality: QualityTier.STANDARD },
      ],
    },
  ],
});

console.log(job.id, job.status);
// "job_a1b2c3d4e5f6" 1 (JOB_STATUS_PENDING)
import os
from transcodely import Transcodely

with Transcodely(api_key=os.environ["TRANSCODELY_API_KEY"]) as client:
    job = client.jobs.create(
        input_url="https://www.transcodely.com/samples/transcodely-sample-30s.mp4",
        managed=True,
        outputs=[
            {
                "type": "hls",
                "video": [{"codec": "h264", "resolution": "1080p", "quality": "standard"}],
            }
        ],
    )
    print(job.id, job.status)
    # "job_a1b2c3d4e5f6" 1
import (
    "context"
    "log"
    "os"

    "github.com/transcodely/transcodely-go"
    "google.golang.org/protobuf/proto"
)

client, err := transcodely.New(os.Getenv("TRANSCODELY_API_KEY"))
if err != nil {
    log.Fatal(err)
}

job, err := client.Jobs.Create(context.Background(), &transcodely.JobCreateParams{
    InputUrl: "https://www.transcodely.com/samples/transcodely-sample-30s.mp4",
    Managed:  proto.Bool(true),
    Outputs: []*transcodely.OutputSpec{{
        Type: transcodely.OutputFormatHLS,
        Video: []*transcodely.VideoVariant{
            {Codec: transcodely.VideoCodecH264, Resolution: transcodely.Resolution1080P, Quality: transcodely.QualityTierStandard},
        },
    }},
})
if err != nil {
    log.Fatal(err)
}
log.Printf("%s %s", job.GetId(), job.GetStatus())

The "hls", "h264", "1080p" strings are the API’s wire format. Each SDK accepts its native enum type and serializes to the lowercase string for you.

Calendar API versioning

Every SDK pins a calendar-versioned API and sends Transcodely-Version: 2026-05-03 on every request. Non-breaking changes ship under the same date; a breaking change would ship under a new one, with requests pinned to an earlier date keeping the behavior they were written against.

Currently supported: 2026-05-03. That is the only version in the registry, and every released SDK pins it. Released versions are never removed from the registry — a client pinned to a date that worked keeps working.

Pinning is optional. Omit the header and the request is served under the current version. That is what the dashboard does, and it is a supported way to call the API rather than an oversight.

Pinning something unlisted is an error. The version you send is validated against the registry: an unknown or malformed value is rejected with invalid_argument and an error-code of invalid_api_version, naming both the value you sent and the versions that exist. Every response — including that one — carries a Transcodely-Supported-Versions header, so a client that guessed wrong can discover the right value without reading this page.

Upgrading the SDK is the cleanest way to move forward, but you can set the version per client:

curl -X POST https://api.transcodely.com/transcodely.v1.JobService/Create 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "Content-Type: application/json" 
  -H "Transcodely-Version: 2026-05-03" 
  -d '{ "input_url": "...", "output_origin_id": "ori_...", "outputs": [...] }'
new Transcodely({ apiKey, apiVersion: "2026-05-03" });
Transcodely(api_key=..., api_version="2026-05-03")
transcodely.New(apiKey, transcodely.WithAPIVersion("2026-05-03"))

Hand-rolled clients predating the header rename may send X-API-Version instead; it is still accepted as a fallback. New clients should send Transcodely-Version.

What you get

Every SDK exposes the same Stripe-style facade:

  • Lazy resource namespaces — client.jobs, client.videos, client.presets, client.origins, client.apps, client.webhookEndpoints, client.events, client.apiKeys, client.organizations, client.memberships, client.users, client.health. Unused namespaces don’t load their generated types.
  • Auto-pagination — every list returns an iterable that walks pages for you. See Pagination.
  • Auto-idempotency — write methods get an auto-generated UUID v4 Idempotency-Key. The Go SDK scopes this to Create calls; the JS and Python SDKs cover most writes (Update, Delete, Cancel, and more). Override per-call when you need cross-process safety. See Idempotency.
  • Typed errors — 1 base class plus 12 concrete error types you match with instanceof / isinstance / errors.As. See Errors.
  • Watch streams — client.jobs.watch(id) returns an iterator that auto-reconnects on transient failures and filters heartbeats by default.
  • Signed webhooks — a one-call verifier (constructEvent / construct_event / ConstructEvent) checks a delivery’s signature and timestamp and decodes it into a typed event. See Webhook Integration.

Per-language guides

Pick your language for install, authentication, and end-to-end task patterns:

Direct HTTP access

If the SDK doesn’t fit your stack, every endpoint is reachable over HTTP. All endpoints accept JSON via POST at https://api.transcodely.com/transcodely.v1.{Service}/{Method}:

curl -X POST https://api.transcodely.com/transcodely.v1.JobService/Create 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "Content-Type: application/json" 
  -H "Transcodely-Version: 2026-05-03" 
  -d '{ "input_url": "...", "output_origin_id": "ori_...", "outputs": [...] }'

See the API Reference for the full surface.

Run this against your own file

A free account runs standard-quality encodes up to 2 minutes, one at a time (a longer upload is shortened to its first 2 minutes), so the Quickstart runs with nothing set up but an API key.