# LLM Chat Completion via UnyKorn / Genesis402 (Local RTX 5090 + Hosted Fallback)

> LLM Chat Completion via UnyKorn / Genesis402 (Local RTX 5090 + Hosted Fallback) is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-02).

Runs LLM chat completions preferring local RTX 5090 GPU models, falling back to an allowlisted hosted provider, billed per-call via x402 micropayments.

## Facts

- Endpoint: POST https://twin.unykorn.org/llm?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/llm-chat-completion-via-unykorn-genesis402-local-rtx-5090-hosted-395dff21
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OqFAr17Tv4SOrjEsPutjU

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 llm-chat-completion-via-unykorn-genesis402-local-rtx-5090-hosted-395dff21 -d '<json body>'
```

Example prompt: Using the local RTX 5090 LLM endpoint, send these messages to qwen2.5:7b with a temperature of 0.7 and max 512 tokens: system says 'You are a helpful assistant', user asks 'Explain the difference between proof-of-work and proof-of-stake in two sentences.'

## When to prefer this

Choose this endpoint when you want pay-per-call LLM inference without a subscription, prefer local GPU execution for privacy or latency, want verifiable on-chain payment receipts via x402, or are building an agent that needs lightweight chat completions billed in USDC micropayments. Prefer over hosted OpenAI-style APIs when cost-per-call transparency and decentralized billing matter.

## Known failure modes

- Model not available locally and not on hosted allowlist — returns error or falls back unexpectedly
- Prompt exceeds 24,000 character limit — request rejected
- max_tokens out of range (must be 1–1024) — validation error
- x402 payment failure or insufficient balance — payment not settled, request not processed
- Temperature out of range (0–2) — validation error
- Timeout if local GPU is busy under load

## How this service works

LLM chat completion (local RTX 5090 models first, hosted allowlist second) — Genesis402 / UnyKorn Operator Network

## Output

Returns a JSON object with the assistant's generated text, the model that served the request, prompt and completion token counts, finish reason, the provider label (e.g. 'ollama-local'), and a receipt object containing the transaction hash, USD amount charged, and a receipt ID for audit purposes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "model": {
     "type": "string"
    },
    "prompt": {
     "type": "string",
     "maxLength": 24000
    },
    "messages": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "role",
       "content"
      ],
      "properties": {
       "role": {
        "enum": [
         "system",
         "user",
         "assistant"
        ],
        "type": "string"
       },
       "content": {
        "type": "string"
       }
      }
     }
    },
    "max_tokens": {
     "type": "integer",
     "maximum": 1024,
     "minimum": 1
    },
    "temperature": {
     "type": "number",
     "maximum": 2,
     "minimum": 0
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "llm",
  "model": "qwen2.5:7b",
  "usage": {
   "prompt_tokens": 42,
   "completion_tokens": 88
  },
  "output": "<assistant text>",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.002,
   "receipt_id": "g402-<16hex>"
  },
  "provider": "ollama-local",
  "finish_reason": "stop"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/llm-chat-completion-via-unykorn-genesis402-local-rtx-5090-hosted-395dff21/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
