@gekoai/sdk is a thin, typed client for the Geko API. Zero runtime dependencies (built on the global fetch), dual ESM + CommonJS, bundled type declarations. Runs on Node 20+, Deno, Bun, and browsers (via a server-side proxy).
Install
The client
geko.tts; platform-level calls (models, health) sit on the client. Future services (speech-to-text, …) will appear as sibling namespaces — see the roadmap.
Options
new Geko(options?)
geko.tts.create(params)
Synthesize speech. Returns a Promise<ArrayBuffer> of raw WAV bytes (24 kHz, PCM16, mono).
Turn the bytes into a file or a playable blob — see Playing & saving audio.
geko.tts.stream(params)
Stream synthesis sentence-by-sentence to start playback sooner on long text. Returns an async iterable of WAV ArrayBuffers — one per chunk, each independently playable. Same params as create().
signal to cancel and a per-call timeout to bound the whole stream. Under the hood it consumes the framed wav-frames-v1 protocol from POST /v1/tts/stream.
geko.tts.voices(model?, options?)
List the voices for a model. Returns { model, voices: Voice[] }.
geko.models(options?)
List every model on the platform and its voices. Returns { data: Model[] }.
geko.health(options?)
Service probe. Returns { status, models: string[] }.
options object of { signal?, timeout? }.
Types
Response types describe the server contract; like most thin SDKs, JSON bodies are not re-validated at runtime.
Timeouts, cancellation & retries
Covered in depth in Errors & retries. In short: transient failures (network, timeout,5xx) retry with backoff; 429 never does; pass an AbortSignal or a per-call timeout to control individual requests.
Bring your own fetch
Next steps
Playing & saving audio
Turn the WAV bytes into files, playback, or other formats.
Errors & retries
Typed errors, automatic retries, timeouts, and cancellation.
Latency & quality
Tune the
nfe dial and understand cold starts.CLI
Synthesize and browse the catalog from your terminal.