# agent402.tools Text Embeddings

> agent402.tools Text Embeddings is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Generates OpenAI-compatible text embeddings via x402 micropayment, no API key required, supporting up to 64 inputs per batch using text-embedding-3-small, text-embedding-3-large, or text-embedding-ada-002.

## Facts

- Endpoint: POST https://agent402.tools/v1/embeddings
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-text-embeddings-73ed7389
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ab0NTPN2KlgVjPtMm7Kh8

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 agent402-tools-text-embeddings-73ed7389 -d '<json body>'
```

Example prompt: Convert these three product descriptions into embeddings so I can use them in a semantic search index: 'wireless noise-cancelling headphones', 'over-ear bluetooth headphones with ANC', 'premium studio monitor headphones' — use the text-embedding-3-small model.

## When to prefer this

Choose this endpoint when you need OpenAI-compatible embeddings without managing API keys or subscriptions, especially in autonomous agent contexts that support x402 micropayments. Ideal for pay-per-use pipelines, RAG systems, or prototyping where you want drop-in OpenAI SDK compatibility and batch embedding of up to 64 strings per call.

## Known failure modes

- Payment not received or insufficient USDC — returns 402 Payment Required
- Input exceeds 64 strings or 16k total characters — returns 400 Bad Request
- Unsupported model name specified — returns 400 or model not found error
- Network timeout if payload is large
- Invalid JSON body — returns 400

## How this service works

OpenAI-compatible text embeddings (text-embedding-3-small by default; 3-large and ada-002 supported), up to 64 inputs or 16k chars per call, returned in the standard OpenAI shape. Identical inputs repeated within 10 minutes are served free from cache. Use it for semantic search, clustering and retrieval from any OpenAI SDK by changing base_url.

## Output

Returns an OpenAI-compatible embeddings response containing one float vector per input string, plus token usage counts. The vectors can be used directly with OpenAI-SDK-compatible downstream tooling for semantic search, clustering, or similarity ranking.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "Text to embed - a string or an array of up to 64 strings (16k chars total)"
  },
  "model": {
   "type": "string",
   "description": "Optional - text-embedding-3-small (default), text-embedding-3-large, or text-embedding-ada-002"
  },
  "dimensions": {
   "type": "number",
   "description": "Optional output dimensions (3-small/3-large only)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "index": 0,
    "object": "embedding",
    "embedding": [
     0.0023,
     -0.0091,
     0.0152
    ]
   }
  ],
  "model": "text-embedding-3-small",
  "usage": {
   "total_tokens": 12,
   "prompt_tokens": 12
  },
  "object": "list"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-text-embeddings-73ed7389/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
