# Synap gpt-oss-20b Chat Completions

> Synap gpt-oss-20b Chat Completions is a paid API for AI agents from synap.linkrra.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-21).

Runs chat completions against the gpt-oss-20b open-weight model via an OpenAI-compatible API, billed per call with USDC via x402.

## Facts

- Endpoint: POST https://synap.linkrra.com/api/billing/x402/models/gpt-oss-20b/chat/completions?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/synap-gpt-oss-20b-chat-completions-bfa3f815
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4F1DgJMmH1nKHB4o-eUFv

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 synap-gpt-oss-20b-chat-completions-bfa3f815 -d '<json body>'
```

Example prompt: Ask the gpt-oss-20b model on Synap to write me a Python function that reverses a string, and cap the response at 512 tokens.

## When to prefer this

Choose this endpoint when you need a cheap, pay-per-call (~$0.001 USDC) OpenAI-compatible chat completion API backed by a 20B open-weight model, without committing to a subscription. It's ideal for agents that need crypto-native (x402/USDC) billing on Base, want to avoid proprietary model lock-in, or are comparing open-model outputs against GPT/Claude. Prefer it over OpenAI's API when cost per call is paramount and the gpt-oss-20b quality tier is sufficient.

## Known failure modes

- Payment failure or insufficient USDC balance returns a 402 Payment Required error
- Exceeding max_tokens limit of 4096 returns a validation error
- Invalid or missing messages array causes a 400 Bad Request
- Model field mismatch (not gpt-oss-20b) may be ignored or cause an error
- Network timeout during streaming if stream=true and connection drops

## How this service works

Explore open models with Synap's OpenAI-compatible API. Start with a free API key or try a model in chat. Compare models, pricing and free-tier limits.

## Output

Returns an OpenAI-format chat.completion JSON object containing the assistant's reply text, token usage breakdown (prompt, completion, total), model name, a unique completion ID, and a payment field showing the USDC amount paid, the Base network transaction hash, and chain ID.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "enum": [
    "gpt-oss-20b"
   ],
   "type": "string",
   "description": "Optional: this endpoint always runs gpt-oss-20b."
  },
  "stream": {
   "type": "boolean",
   "default": false,
   "description": "true = stream OpenAI-format Server-Sent Events."
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "user",
       "assistant",
       "tool"
      ],
      "type": "string"
     },
     "content": {
      "description": "Text, or an array of OpenAI content parts."
     }
    }
   },
   "examples": [
    [
     {
      "role": "user",
      "content": ""
     }
    ]
   ],
   "minItems": 1,
   "description": "OpenAI-format chat history, oldest first: [{role, content}]."
  },
  "max_tokens": {
   "type": "integer",
   "default": 4096,
   "maximum": 4096,
   "minimum": 1,
   "description": "Completion token cap. The price is quoted for the prompt plus this cap."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "chatcmpl-...",
  "model": "gpt-oss-20b",
  "usage": {
   "total_tokens": 28,
   "prompt_tokens": 16,
   "completion_tokens": 12
  },
  "object": "chat.completion",
  "choices": [
   {
    "message": {
     "role": "assistant",
     "content": "def reverse(s):\n    return s[::-1]"
    }
   }
  ],
  "payment": {
   "network": "eip155:8453",
   "paidUsd": 0.001,
   "transaction": "0x..."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/synap-gpt-oss-20b-chat-completions-bfa3f815/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from synap.linkrra.com](https://www.zero.xyz/host/synap.linkrra.com/llms.txt)
