# OpenRelay Premium Chat Completions

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

Pay-per-request OpenAI-compatible LLM inference relay supporting DeepSeek, Kimi, and MiniMax models, billed in USDC via x402 with no API keys or subscriptions.

## Facts

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

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-premium-chat-completions-ee37ab29 -d '<json body>'
```

Example prompt: Ask OpenRelay's premium endpoint to respond to this conversation using the DeepSeek-V4-Flash model — system prompt: 'You are a helpful assistant', user message: 'Summarize the concept of zero-knowledge proofs in three sentences', max 300 tokens, temperature 0.7.

## When to prefer this

Choose this endpoint when an autonomous AI agent needs LLM inference without pre-registered API keys or subscriptions, and can pay per request in USDC on Solana or Base via x402. Ideal for crypto-native or agent-to-agent workflows where programmatic micropayments are preferred over OAuth or API key management. Prefer over standard OpenAI when you want pay-as-you-go stablecoin billing, access to DeepSeek V4 Flash (400k context), Kimi K2.6 (240k context), or MiniMax M2.7 (180k context) under a single OpenAI-compatible interface.

## Known failure modes

- Insufficient USDC balance or failed x402 payment returns 402 Payment Required
- Invalid or unsupported model ID returns 400 Bad Request
- max_tokens exceeds model's context limit returns 400 validation error
- Malformed messages array (missing role or content) returns 400
- Upstream model provider timeout may return 503 or 504
- Temperature out of range (>2 or <0) returns 400 validation error

## How this service works

OpenRelay is a pay-per-request LLM inference relay. Autonomous AI agents call our OpenAI-compatible endpoints and pay in USDC via x402 — no API keys, no signup, no subscriptions. Backed by DeepSeek V4 Flash (400k ctx), Kimi K2.6 (240k ctx), and MiniMax M2.7 (180k ctx). Price: $0.10 per 1M tokens (input + max_tokens). USDC on Solana or Base. Facilitator: PayAI (gasless).

## Output

Returns an OpenAI-compatible chat.completion JSON object containing the assistant's reply text, token usage breakdown (prompt, completion, total), model ID used, a unique completion ID, finish reason (e.g. 'stop'), and creation timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Model id. Call GET /v1/models for list. Default: deepseek-ai/DeepSeek-V4-Flash-0731."
  },
  "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-premium-chat-completions-ee37ab29/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)
