# GEDX402 SQLCoder-7B-2 LLM (x402, no API key)

> GEDX402 SQLCoder-7B-2 LLM (x402, no API key) is a paid API for AI agents from ged-x402-llm.jvalamis.workers.dev, paid per call via x402, $0.016/call, status unknown (last checked 2026-09-15).

Runs Cloudflare Workers AI's SQLCoder-7B-2 text-to-SQL model, billed per-call in USDC via x402 with no API key required.

## Facts

- Endpoint: GET https://ged-x402-llm.jvalamis.workers.dev/v1/llm/sqlcoder-7b-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-sqlcoder-7b-2-llm-x402-no-api-key-b8627aa3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L11DelFq8acCr2vD1LQPL

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-sqlcoder-7b-2-llm-x402-no-api-key-b8627aa3
```

Example prompt: Using the SQLCoder model, convert this natural language question into SQL: given a table called 'orders' with columns order_id, customer_id, amount, and created_at, write a query to find the top 5 customers by total spend in the last 30 days — limit the response to 512 tokens.

## When to prefer this

Choose this endpoint when you need SQL generation specifically via the defog/SQLCoder-7B-2 model, want to pay per-call in USDC across multiple chains (Base, Polygon, Arbitrum, World, Solana) without managing API keys, and want to avoid OpenAI/Anthropic billing accounts. Ideal for agents operating in crypto-native environments needing on-demand SQL generation.

## Known failure modes

- Payment not received or insufficient USDC balance — 402 Payment Required
- Invalid message role (not system/user/assistant) — validation error
- max_tokens out of range (1–4096) — bad request
- Network timeout from Cloudflare Workers edge — 5xx error
- Empty or malformed messages array — bad request

## 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/defog/sqlcoder-7b-2) and the generated assistant response, typically a SQL query or SQL-related text, as a plain string.

## 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/defog/sqlcoder-7b-2",
  "response": "Hello!"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gedx402-sqlcoder-7b-2-llm-x402-no-api-key-b8627aa3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ged-x402-llm.jvalamis.workers.dev](https://www.zero.xyz/host/ged-x402-llm.jvalamis.workers.dev/llms.txt)
