# Text Embeddings API (OpenAI-Compatible, x402 USDC)

> Text Embeddings API (OpenAI-Compatible, x402 USDC) is a paid API for AI agents from agent-production-1daa.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Generates text embeddings using OpenAI-compatible models (text-embedding-3-small or text-embedding-3-large), billed per-request in USDC on Base with no API key required and a caching discount for repeated inputs.

## Facts

- Endpoint: POST https://agent-production-1daa.up.railway.app/v1/embeddings
- 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/text-embeddings-api-openai-compatible-x402-usdc-09b7373a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zQPzmXc6pdvFKvgqMsjW0

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 text-embeddings-api-openai-compatible-x402-usdc-09b7373a -d '<json body>'
```

Example prompt: Embed these 10 product descriptions using text-embedding-3-small so I can index them for semantic search — pay with USDC on Base, no API key needed.

## When to prefer this

Choose this endpoint when you need OpenAI-compatible text embeddings but want to avoid managing API keys or monthly billing — particularly useful for AI agents that can pay per-request in USDC on Base. The built-in caching makes it especially cost-efficient when re-embedding a corpus or processing repetitive text. Prefer text-embedding-3-large when embedding quality is paramount; use text-embedding-3-small for lower cost and faster throughput.

## Known failure modes

- Invalid model name (not in enum) returns 400 Bad Request
- Input too long for model context window returns 400
- Payment not included or insufficient USDC returns 402 Payment Required
- Model or dimensions combination unsupported returns 422
- Service unavailable on Railway returns 503

## How this service works

Text embeddings API for AI agents: OpenAI-compatible /v1/embeddings paid per request in USDC on Base — no account or API key. Embed documents for RAG, semantic search, clustering, deduplication with text-embedding-3-small or text-embedding-3-large. Embeddings are deterministic, so repeated texts hit our cache and bill at 55% of provider price — re-embedding a corpus costs roughly half. Misses at cost + 4%, from $0.001/call. Standard OpenAI POST format.

## Output

Returns a JSON object in OpenAI /v1/embeddings format: an array of embedding objects each containing an index and a float-array vector, plus a usage object with prompt_token_count. Repeated inputs are served from cache at 55% of provider price; cache misses are billed at cost plus 4%, starting from $0.001 per call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "description": "String or array of strings to embed"
  },
  "model": {
   "enum": [
    "text-embedding-3-small",
    "text-embedding-3-large"
   ],
   "type": "string",
   "description": "Embedding model"
  },
  "dimensions": {
   "type": "number",
   "description": "Optional output dimensionality (model-dependent)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/text-embeddings-api-openai-compatible-x402-usdc-09b7373a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-production-1daa.up.railway.app](https://www.zero.xyz/host/agent-production-1daa.up.railway.app/llms.txt)
