Calling the Sume API from Kotlin: no SDK, so write the poll loop
Sume publishes a TypeScript SDK and no Kotlin package. The documented submit, poll, fetch loop works from OkHttp or Ktor; the deadline lives in your client.

There is no official Kotlin client for the Sume API. The only published SDK is @sume-com/sdk for TypeScript, and the Sume docs say a Kotlin integration with OkHttp or Ktor follows the same three steps as any HTTP client. Hand-written is fine because the contract is small: submit with an idempotency key, poll status, fetch the result.
The three steps
The docs mark their Kotlin snippet as an illustrative sketch, not a package. Treat the steps as the contract.
| Step | Call | Stop condition |
|---|---|---|
| 1 Submit | POST /v1/{product}/generate with mode async and an Idempotency-Key | 202 with a job id |
| 2 Poll | GET /v1/jobs/{id}/status | terminal is true |
| 3 Fetch | GET /v1/jobs/{id}/result | Only when result_ready or completed |
Deadlines belong to the client
wait_timeout_seconds never exceeds 30 and bounds one HTTP request, not the job. Pick your own overall deadline; the docs call 20 minutes reasonable for video. Sleep next_poll_after_seconds when present and use exponential backoff otherwise. When your deadline passes, the job keeps running and billing, so persist the job id and either resume later from status_url or call cancel.
Typed models
Generate your data classes from the live OpenAPI at https://api.sume.com/reference/json rather than copying field tables from the docs; the docs themselves say the schema is the source of truth. Send exactly one credential header, either x-api-key or Authorization: Bearer, because sending both returns 401.
Sources
Related posts
More in Developers
- Latin American Spanish text to speech: es or es-MX on Sume?
Sume's TTS language is a free string and its voice library tags voices with plain es. What that means for Mexican, Argentine or Spain Spanish, and how to test.
- Live AI avatar API: a Tavus conversation vs a Sume job
A live avatar API creates a room you join. Sume's Avatar API creates a job you poll. Field-by-field map of Tavus create conversation and Sume talking-video.
- MAI-Transcribe-2-Streaming Realtime API: events vs Sume job URLs
Microsoft's streaming transcriber uses a WebSocket with delta, intermediate and commit events. Sume STT takes a file URL and returns a job. A side-by-side.
- Migrate Video 1.0 to sume/auto on POST /v1/videos, field by field
Video 1.0 is retiring soon. Which fields move, which are ignored or rejected, and the request to send on POST /v1/videos with sume/auto.
Written by Sume