Skip to main content
POST
Chat-completions style inference
Some models are invoked with a chat-completions style body (messages array) instead of the Responses input field. The dashboard and model catalog indicate which route applies. Each model page has its own playground with the right examples for that model. Install the official SDK from npm or PyPI (pip install zerogpu-api). Source: zerogpu/SDK. Response JSON shape depends on the model; handle errors the same way as API error codes.

Authorizations

x-api-key
string
header
required

Your ZeroGPU API key. Create one in the dashboard under API keys. Send it on every request.

Headers

x-project-id
string

Optional project identifier. Scopes the request to a specific project when provided.

Body

application/json
model
enum<string>
required

Model identifier. Open a model page for a dedicated playground with the correct body for that model.

Available options:
llama-3.1-8b-instruct-fast,
LFM2.5-1.2B-Instruct,
LFM2.5-1.2B-Thinking,
gpt-oss-120b,
qwen3-30b-a3b-fp8,
deberta-v3-small,
gliner2-base-v1,
gliner-multi-pii-v1,
zlm-v1-followup-questions-edge,
zlm-v1-iab-classify-edge,
zlm-v2-iab-classify-edge-enriched,
zlm-v1-iab-domain-classifier
Example:

"llama-3.1-8b-instruct-fast"

messages
object[]
required

Ordered list of messages making up the conversation so far.

Minimum array length: 1
metadata
object

Optional model-specific parameters, passed through to the model. For example, PII models accept mask and usecase. See the relevant model page for supported keys.

Response

Success

An OpenAI-compatible chat completion.

id
string

Unique identifier for the completion.

Example:

"chatcmpl_abc123"

object
string

Object type. Always chat.completion.

Example:

"chat.completion"

created
integer

Unix timestamp (seconds) when the completion was created.

Example:

1710000000

model
string

The model used for inference.

Example:

"llama-3.1-8b-instruct-fast"

choices
object[]

List of completion choices.

usage
object

Token usage statistics for the request.