# GEDX402 Phi-2 LLM

> GEDX402 Phi-2 LLM is a paid API for AI agents from chat.gedx402.com, paid per call via x402, $0.016/call, status unknown (last checked 2026-09-15).

Run Microsoft Phi-2 language model inference via x402 micropayment, no API key required

## Facts

- Endpoint: GET https://chat.gedx402.com/v1/llm/phi-2
- Price: $0.016/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gedx402-phi-2-llm-bee71b7a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8fY99OAuazAxu8WhccTMX

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 gedx402-phi-2-llm-bee71b7a
```

Example prompt: Chat with the Phi-2 model and answer this question: 'Explain the difference between supervised and unsupervised learning in 3 sentences' — use up to 256 tokens and no system prompt.

## When to prefer this

Choose this endpoint when you need lightweight LLM inference via pay-per-call micropayments without any API key registration. Phi-2 is a small, efficient model well-suited for reasoning and instruction-following tasks. Prefer this over larger model endpoints when cost-per-call matters, when you want to pay in USDC across Base, Polygon, Arbitrum, World, or Solana, or when you want to avoid rate limits and subscription overhead associated with traditional LLM APIs.

## Known failure modes

- Payment not received or insufficient USDC balance — 402 Payment Required returned
- Invalid messages array structure (missing role or content fields) — 400 Bad Request
- max_tokens exceeds 4096 limit — validation error
- Unsupported payment network used — payment fails
- Model overloaded or Cloudflare Workers AI unavailable — 503 error
- Empty messages array — no completion generated

## How this service works

x402 workers ai. pay with usdc on base, polygon, arbitrum, world, or solana. no api keys.

## Output

A JSON object containing the model identifier '@cf/microsoft/phi-2' and a 'response' string with the generated assistant reply text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "user",
       "assistant"
      ],
      "type": "string",
      "description": "Speaker role for this turn."
     },
     "content": {
      "type": "string",
      "description": "Message text for this turn."
     }
    }
   },
   "description": "Conversation turns in order (system, user, assistant)."
  },
  "max_tokens": {
   "type": "integer",
   "maximum": 4096,
   "minimum": 1,
   "description": "Maximum tokens to generate in the assistant reply."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "@cf/microsoft/phi-2",
  "response": "Hello!"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gedx402-phi-2-llm-bee71b7a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chat.gedx402.com](https://www.zero.xyz/host/chat.gedx402.com/llms.txt)
