# OpenRelay Chat Completions

> OpenRelay Chat Completions is a paid API for AI agents from openrelay.hggfffdfy687.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Pay-per-request OpenAI-compatible chat completion via a Cloudflare Worker relay, defaulting to DeepSeek-V4-Flash at $0.10/1M tokens with a $0.01 minimum per request.

## Facts

- Endpoint: POST https://openrelay.hggfffdfy687.workers.dev/v1/chat/completions
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openrelay-chat-completions-2c5016b0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1bDbLjcM9w0q0mkSYqyb1

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 openrelay-chat-completions-2c5016b0 -d '<json body>'
```

Example prompt: Using OpenRelay, send these messages to DeepSeek-V4-Flash-0731 and get a response: system prompt 'You are a helpful assistant', user message 'Summarize the key differences between REST and GraphQL in 3 bullet points' — keep it under 300 tokens and temperature at 0.7.

## When to prefer this

Choose this endpoint when you need cheap, pay-per-request LLM inference without a subscription, especially in agentic workflows that use the x402 crypto payment protocol and want OpenAI API compatibility. Prefer it over direct OpenAI when cost per token matters most or when USDC micropayments are required. The DeepSeek default model is well-suited for reasoning and instruction-following tasks at a fraction of GPT-4 costs.

## Known failure modes

- Payment not attached or insufficient (402 Payment Required)
- Invalid or unsupported model ID returns an error
- messages array missing or malformed (400 Bad Request)
- max_tokens exceeds 16384 limit
- Temperature outside 0–2 range rejected
- Worker timeout for very large completions
- Model unavailable or rate-limited upstream from DeepSeek

## How this service works

OpenAI-compatible chat completion. $0.10/1M tokens (input+max_tokens). USDC on Solana or Base — no signup, no keys, pay-per-request via x402.

## Output

Returns a JSON object matching the OpenAI chat.completion format, including the assistant's reply text under choices[0].message.content, token usage breakdown (prompt_tokens, completion_tokens, total_tokens), the model used, finish_reason, and a unique completion ID.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "enum": [
    "deepseek-ai/DeepSeek-V4-Flash-0731",
    "moonshotai/Kimi-K2.6",
    "MiniMaxAI/MiniMax-M2.7"
   ],
   "type": "string",
   "default": "deepseek-ai/DeepSeek-V4-Flash-0731",
   "description": "Model id. Available: DeepSeek V4 Flash (400k ctx), Kimi K2.6 (240k ctx), MiniMax M2.7 (180k ctx). See GET /v1/models. Default: DeepSeek V4 Flash."
  },
  "stream": {
   "type": "boolean",
   "default": false
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "user",
       "assistant"
      ]
     },
     "content": {
      "type": "string"
     }
    }
   }
  },
  "max_tokens": {
   "type": "integer",
   "default": 512,
   "maximum": 16384,
   "minimum": 1
  },
  "temperature": {
   "type": "number",
   "default": 1,
   "maximum": 2,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "chatcmpl-openrelay-abc123",
  "model": "deepseek-ai/DeepSeek-V4-Flash-0731",
  "usage": {
   "total_tokens": 15,
   "prompt_tokens": 12,
   "completion_tokens": 3
  },
  "object": "chat.completion",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "Hello!"
    },
    "finish_reason": "stop"
   }
  ],
  "created": 1787532386
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openrelay-chat-completions-2c5016b0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from openrelay.hggfffdfy687.workers.dev](https://www.zero.xyz/host/openrelay.hggfffdfy687.workers.dev/llms.txt)
