Skip to main content
Install the published client from npm:
Source and regeneration workflow: zerogpu/SDK on GitHub.

Chat completions (/v1/chat/completions)

For models that use the chat route, call client.chat.createChatCompletion({ model, messages, metadata? }). See Chat completions.

Responses with metadata

Optional metadata on createResponse is supported for model-specific options (e.g. PII). See Responses.

Raw HTTP (fetch)

If you prefer not to use the SDK, call the endpoint directly.

Using environment variables (Node.js)

Error handling