# PrimeAPI AI Completion

> PrimeAPI AI Completion is a paid API for AI agents from prime-api-seven.vercel.app, paid per call via x402, $0.169561/call, status unknown (last checked 2026-10-21).

Generates AI text completions from a natural language query input, payable per-call in USDC on Base with no API key required.

## Facts

- Endpoint: POST https://prime-api-seven.vercel.app/api/ai/completion?utm_source=zero.xyz
- Price: $0.169561/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/primeapi-ai-completion-ad657e89
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_s6_UKW6106w0R1jAZZ69Q

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 primeapi-ai-completion-ad657e89 -d '<json body>'
```

Example prompt: Can you use the PrimeAPI AI completion endpoint to generate a short explanation of how blockchain consensus mechanisms work — I'll pay per call in USDC, no API key needed.

## When to prefer this

Choose this endpoint when you need AI text completion without managing API keys or subscriptions, and you can pay per-call in USDC on the Base network using the x402 payment protocol. Ideal for agents that need occasional or bursty AI generation without a standing account.

## Known failure modes

- Payment not received or insufficient USDC — 402 Payment Required response
- Malformed or missing query field — likely 400 Bad Request
- Upstream AI model timeout or unavailability — 500 or 503 error
- Query too long or invalid type — schema validation error
- Payment on wrong network (not Base) — payment rejected

## How this service works

Crypto, AI, Social Media, Finance, Weather, Tools &amp; more. Pay per call in USDC on Base. No API keys.

## Output

Returns an AI-generated text completion or response to the submitted query string, wrapped in a generic API response object. The exact structure of the response is loosely typed, but will contain the generated output text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "description": "Search query or input parameter"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "description": "API response data"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/primeapi-ai-completion-ad657e89/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from prime-api-seven.vercel.app](https://www.zero.xyz/host/prime-api-seven.vercel.app/llms.txt)
