Skip to main content
The Sigmora API is JSON over HTTPS, so any HTTP client works. This page gives you two small, complete clients you can paste into a project — they handle authentication, idempotency keys, retries, job polling and the error envelope — and shows how to generate a fully typed client from the OpenAPI document. Both clients follow the same rules:
  • Read the key from SIGMORA_API_KEY and send it as Authorization: Bearer ....
  • Send an Idempotency-Key on every POST, and reuse it when retrying.
  • Retry only rate_limited and upstream_unavailable, waiting for Retry-After when it is present.
  • Raise an error carrying code, error (the message) and the x-request-id.
  • Poll jobs until status is done, cancelled, failed or qa_failed, and stop at awaiting_review, which needs a person.

TypeScript

Requires Node.js 18 or later (for the built-in fetch).
sigmora.ts
Use it to create a project, render a video into it and collect the file:
main.ts

Python

Requires Python 3.9 or later and requests (pip install requests).
sigmora.py
Use it to create a project, render a video into it and collect the file:
main.py

Generate a typed client

The OpenAPI 3.1 document at https://api.sigmora.org/v1/openapi.json describes every operation, with a stable operationId on each and named component schemas for the objects you work with — Job, JobArtifacts, Project, Brand, Product, Campaign, Capability, Theme, Trend and more. Generators turn those into types and methods.
Generate types with openapi-typescript and call the API through the matching openapi-fetch client:
Pin the document you generate from. Download openapi.json into your repository, generate from that copy, and review the diff when you update it — see Versioning for what can change within v1.
A generated client gives you types, not behavior. Keep the rules above — idempotency keys, retrying only retryable codes, and stopping polls at terminal statuses — in a thin wrapper around it.

Next steps

Errors

Every error code and how to respond.

Jobs & polling

Statuses, artifacts and cancelling work.