# GEDX402 Phi-2 LLM Chat

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

Runs inference on Microsoft Phi-2 via Cloudflare Workers AI, billed per-call in USDC with no API key required

## Facts

- Endpoint: GET https://ged-x402-chat.jvalamis.workers.dev/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-chat-4cfc26be
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AMaU7Onz_bBriiqbXrPpd

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-chat-4cfc26be
```

Example prompt: Ask Phi-2 to explain the difference between supervised and unsupervised learning in 3 sentences — use up to 200 tokens and pay with USDC.

## When to prefer this

Choose this endpoint when you need lightweight text generation from Microsoft Phi-2 without registering for any API key, and you can pay $0.016 USDC per call via x402 on Base, Polygon, Arbitrum, World, or Solana. Ideal for agents operating in crypto-native environments needing on-demand, pay-as-you-go LLM inference with no subscription overhead.

## Known failure modes

- Payment not received or insufficient USDC balance — 402 Payment Required returned
- Invalid message array structure or missing role/content fields — 400 Bad Request
- max_tokens exceeds 4096 — validation error
- Model unavailable on Cloudflare Workers AI infrastructure — 503 or 500 error
- Network timeout if Workers AI inference takes too long

## 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 name '@cf/microsoft/phi-2' and the generated assistant reply string, e.g. {"model":"@cf/microsoft/phi-2","response":"..."}

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "messages": {
   "type": "array",
   "items": {
    "type": "object"
   }
  },
  "max_tokens": {
   "type": "integer"
  }
 }
}
```

## 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-chat-4cfc26be/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ged-x402-chat.jvalamis.workers.dev](https://www.zero.xyz/host/ged-x402-chat.jvalamis.workers.dev/llms.txt)
