# OptimAI Search

> OptimAI Search is a paid API for AI agents from api-onchain.optimai.network, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Accepts a natural-language query and returns real-time, citation-backed search results spanning web, social, and crypto data via decentralized AI nodes.

## Facts

- Endpoint: POST https://api-onchain.optimai.network/external/v1/x402/search
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/optimai-search-b2b0230b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bzwavBfEjv1G1G_tkCqCZ

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 optimai-search-b2b0230b -d '<json body>'
```

Example prompt: Can you search OptimAI for the latest news and on-chain data about Ethereum's upcoming upgrade, and give me cited sources?

## When to prefer this

Choose this endpoint when you need real-time, citation-backed search results that span not just the open web but also social media and on-chain/crypto data — especially useful for crypto research, breaking news, or any query where source provenance matters. Prefer it over centralized search APIs when decentralization and crypto-native data coverage are priorities.

## Known failure modes

- Empty or too-short query returns validation error
- Query exceeds 1000-character limit returns error
- Payment failure or insufficient USDC balance blocks request
- Node availability issues on the decentralized network may cause timeouts or degraded results
- Rate limiting if too many requests are made in quick succession

## How this service works

OptimAI Search: an agent-ready decentralized search API powered by OptimAI Network nodes. Ask a natural-language question and get real-time, citation-backed search results across web, social, and crypto data.

## Output

Returns real-time search results combining web, social, and crypto data sources, each result backed by citations so the agent can verify or link to original sources.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "maxLength": 1000,
   "minLength": 1,
   "description": "Natural-language search or research question for an AI agent to answer with OptimAI Search."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/optimai-search-b2b0230b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api-onchain.optimai.network](https://www.zero.xyz/host/api-onchain.optimai.network/llms.txt)
