Skip to main content
Each section below is one short example per endpoint. A language is missing from a section when its SDK has no wrapper for that endpoint; the method table shows the alternative. The endpoint pages in this section list every parameter.

Setup

Chat completions

Only TypeScript and Python have a parsed chat stream. Chat completions shows the Java raw-stream alternative.

Responses

Responses covers streaming in C#, PHP and Java, and reading the output text in Rust.

Messages (Anthropic-compatible)

Python: stream_message yields parsed chunks; stream_messages yields the raw SSE lines. Go, C#, PHP, Ruby and Java have createAnthropicMessage in their naming style.

Images

See Image generations and Image edits.

Audio

Transcriptions and translations take a multipart upload. TypeScript sends a FormData body as multipart. The Python, Go, C#, PHP and Ruby methods send JSON, so transcription works only with a URL passed to a model that accepts file_url, and translation needs a multipart upload. To upload an audio file from those SDKs, see STT (Speech to Text) and Translations.
See Translations for generateTranslation(). Java: createSpeech expects JSON and can’t decode binary audio, so use rawClient().requestBytes for speech; send transcription and translation uploads with Java’s standard HTTP client, as the STT and Translations pages show.

Video

Go, C#, PHP, Ruby and Java create the job and return it without waiting; see the method table.

Embeddings, rerank and moderations

Batches and files

Go, C#, PHP, Ruby and Java have createBatch and retrieveBatch in their naming style; Files covers uploads in each SDK.

Async job WebSocket URLs

Models, health and account

Credits and activity need a management API key.

Handle errors

PhaseoError (Rust) has an HTTP status and parsed JSON body when the Gateway returned an error; transport and configuration failures have no status. The overview lists the error fields in each SDK.

Add a request header

Rust: with_header adds a header to every later request.
Rust
Last modified on November 5, 2026