# ZeroGPU Chat Completions (OpenAI-compatible)

> ZeroGPU Chat Completions (OpenAI-compatible) is a paid API for AI agents from agents.zerogpu.ai, paid per call via MPP, price unknown, status healthy (last checked 2026-10-12, last successful call 2026-10-02).

Generates chat completions via an OpenAI-compatible API across multiple hosted models including DeepSeek-V4-Flash, GLM-5.2, Qwen3-30B, LFM2.5, and Llama-3.1 with per-token billing.

## Facts

- Endpoint: POST https://agents.zerogpu.ai/zeroclick/v1/chat/completions?utm_source=zero.xyz
- Price: price unknown
- Payment: MPP
- Status: healthy
- Last checked: 2026-10-12
- Last successful call: 2026-10-02
- Success rate: 83% of calls made through Zero
- Rating: 3.7 / 5 from 2 reviews
- Activations on Zero: 39
- Provider: agents.zerogpu.ai
- Website: https://agents.zerogpu.ai
- Canonical page: https://www.zero.xyz/c/agents-zerogpu-ai-zerogpu-chat-completions-openai-compatible-23d2db4f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MF_pZoO4NdoG9eSyXlW45

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agents-zerogpu-ai-zerogpu-chat-completions-openai-compatible-23d2db4f -d '<json body>'
```

Example prompt: Using the llama-3.1-8b-instruct-fast model, summarize the following article into three bullet points: 'Quantum computing has advanced significantly this year, with IBM releasing a 1000-qubit processor that promises to solve optimization problems previously intractable for classical machines...'

## When to prefer this

Choose this endpoint when you need an OpenAI-compatible chat completions interface with model variety and per-token billing — especially when you need a 1M token context window (DeepSeek-V4-Flash or GLM-5.2), multilingual reasoning with function calling (Qwen3-30B-A3B), fast lightweight instruction following (LFM2.5-1.2B-Instruct), or high-volume summarization (llama-3.1-8b-instruct-fast). Prefer this over generic OpenAI when you want transparent pay-per-use pricing, agent-native payment handling, or access to these specific alternative models not available on standard OpenAI.

## Known failure modes

- Invalid model ID returns validation error — must be one of the five supported enum values
- Malformed messages array (missing role or content) returns 400 bad request
- Exceeding the model's context window returns a context length error
- Insufficient payment balance returns 402 payment required
- Rate limiting or capacity issues may return 429 or 503 under high load
- Empty messages array returns a schema validation error

## How this service works

OpenAI-style Chat Completions endpoint, authenticated by verifying the
`zc-signature` HMAC over the raw request bytes. The request is routed by
`model` using model metadata, and the same orchestration as
`/v1/chat/completions` runs behind it.

On success, actual token usage is settled with ZeroClick and reported
via the `zc-usage` response header.


## Output

Returns an OpenAI-format chat completions response object containing choices[0].message.content with the model's reply, along with token usage breakdown (prompt_tokens, completion_tokens, total_tokens), finish_reason, model name, and a unique completion ID. For classification models, the content field contains a JSON-stringified result.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "model",
  "messages"
 ],
 "properties": {
  "model": {
   "type": "string",
   "example": "LFM2.5-1.2B-Instruct",
   "description": "Model id; routes the request via model metadata. Kebab-cased into a ZeroClick service slug for metering."
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "user",
       "assistant",
       "tool",
       "developer"
      ],
      "type": "string",
      "description": "A `developer` role is normalized to `system`; unrecognized roles are treated as `user`."
     },
     "content": {
      "type": "string"
     }
    }
   },
   "minItems": 1
  },
  "metadata": {
   "type": "object",
   "description": "Task-specific options. For GLiNER models this carries `usecase`,\n`schema`, `labels`, `threshold`, `mask`, and `replacement_char`. For\nmoderation, `threshold`; for signal-extract, `max_keywords`.\n",
   "additionalProperties": true
  },
  "categories": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Candidate labels for text-classification models. May also be supplied via a system-role message."
  },
  "multilingual": {
   "type": "boolean",
   "description": "Forwarded to the IAB cloud inference API only when the resolved model supports it."
  }
 },
 "additionalProperties": true
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "id": {
   "type": "string"
  },
  "model": {
   "type": "string"
  },
  "usage": {
   "type": "object",
   "properties": {
    "total_tokens": {
     "type": "integer"
    },
    "prompt_tokens": {
     "type": "integer"
    },
    "completion_tokens": {
     "type": "integer"
    },
    "prompt_tokens_details": {
     "type": "object",
     "additionalProperties": true
    },
    "completion_tokens_details": {
     "type": "object",
     "additionalProperties": true
    }
   }
  },
  "object": {
   "type": "string",
   "const": "chat.completion"
  },
  "choices": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "index": {
      "type": "integer"
     },
     "message": {
      "type": "object",
      "properties": {
       "role": {
        "type": "string",
        "const": "assistant"
       },
       "content": {
        "type": "string"
       },
       "annotations": {
        "type": "array",
        "items": {}
       }
      }
     },
     "finish_reason": {
      "type": "string"
     }
    }
   }
  },
  "created": {
   "type": "integer"
  }
 },
 "description": "OpenAI Chat Completions response. For classification models, `choices[0].message.content` is a JSON-stringified classification result.",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-zerogpu-ai-zerogpu-chat-completions-openai-compatible-23d2db4f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.zerogpu.ai](https://www.zero.xyz/host/agents.zerogpu.ai/llms.txt)
