Skip to main content
The SDKs are open source at github.com/sf-voice/sf-voice-core. These docs cover SDK version 0.1.1. We are iterating quickly, so pin your SDK version and expect breaking changes between versions until the API settles. The SDKs cover the core operations: ingest, getTask, pollTask, listAssets, getAsset, deleteAsset, search. Method names follow the naming convention of each language.

TypeScript

@sf-voice/media — Node.js, Bun, Deno, browser

Elixir

:sf_voiceReq-based, returns {:ok, _} or {:error, _}

Go

sfvoice — idiomatic Go with context.Context

Rust

sf_voice_media — async with tokio, builder pattern

Java

sh.sf-voice:sf-voice-media-java — synchronous, Java 17+

Kotlin

sh.sf-voice:sf-voice-media-kotlin — coroutine-native with Ktor
Building in C++? There’s no published package — see the C++ example for a single-header helper you can copy into your project.

Authentication

SDKs send your API key as the X-API-Key request header. Keep it in an environment variable and avoid committing it to source control.

Error handling

SDKs use three error categories:
ErrorWhen it’s thrown
API errorThe server returned a non-2xx response. Carries code, message, and status.
Request timeoutA single HTTP request exceeded the configured timeout.
Poll timeoutpollTask ran out of time before the task reached ready or failed.
Error codes from the API:
CodeMeaning
unauthorizedInvalid or missing API key.
not_foundAsset or task ID doesn’t exist.
bucket_not_connectedS3 source used before bucket is configured.
s3_access_deniedSDK can’t read from the specified S3 key.
unsupported_formatFile type isn’t supported for indexing.
file_too_largeUpload exceeds the size limit.
rate_limitedToo many requests. Back off and retry.