# OmniAPI AI Code Explain

> OmniAPI AI Code Explain is a paid API for AI agents from omni-api-cyan.vercel.app, paid per call via x402, $0.084731/call, status unknown (last checked 2026-09-15).

Accepts a code snippet or query and returns a natural-language explanation of what the code does

## Facts

- Endpoint: POST https://omni-api-cyan.vercel.app/api/ai/code/explain
- Price: $0.084731/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/omniapi-ai-code-explain-bdd67e28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_c5XYqBQ2fLoRlyILl70LA

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 omniapi-ai-code-explain-bdd67e28 -d '<json body>'
```

Example prompt: Can you explain what this code does in plain English? Here's the snippet: `function debounce(fn, delay) { let timer; return function(...args) { clearTimeout(timer); timer = setTimeout(() => fn.apply(this, args), delay); }; }`

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call AI-powered explanation of a code snippet without managing your own LLM infrastructure. It is well-suited for agents that occasionally need to interpret code on behalf of users and want to pay per use in USDC rather than maintain API keys or model subscriptions.

## Known failure modes

- Missing required 'query' field returns a 400 or error response
- Malformed or empty code input may return a generic or unhelpful explanation
- Payment failure via x402 results in 402 Payment Required with no explanation returned
- Very large code snippets may be truncated or cause timeout
- Ambiguous input without sufficient code context may yield inaccurate explanation

## How this service works

444 endpoints across 9+ chains. Crypto, AI, Social, Finance, Weather, Tools. Pay per call in USDC via x402 with 4 facilitators: Dexter, Meridian, FluxA, GoPlausible.

## Output

Returns a natural-language explanation of the submitted code or query, describing what the code does, how it works, and any notable logic or patterns — formatted as a human-readable text response.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "input": {
   "type": "string",
   "description": "Input data for the endpoint"
  },
  "query": {
   "type": "string",
   "description": "Search query or input text"
  },
  "params": {
   "type": "object",
   "description": "Additional parameters"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/omniapi-ai-code-explain-bdd67e28/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from omni-api-cyan.vercel.app](https://www.zero.xyz/host/omni-api-cyan.vercel.app/llms.txt)
