Skip to main content
Use Node.js 22.20 or later and keep your key server-side. The examples target the published SDK contract in version 0.1.1.

Create a client

Set the production origin to https://dreamtune-api.fly.dev. HTTPS is required except for loopback development addresses.

Available operations

The observability and prompt methods in this table are on client.observability. Inputs and return types ship with the package.

Deadlines and errors

Operations accept an optional AbortSignal as documented by their types. For a read-only request:
The SDK does not automatically retry paid requests or poll pending jobs. A transport failure can happen after a request was accepted. Persist an idempotency key before creation and reuse it with identical input to recover the original run. Catch DreamtuneError and inspect its status. See errors and the domain guides for recovery.