# x402engine Text Embeddings API

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

Generates text embeddings using OpenAI text-embedding-3-small for semantic search, clustering, and RAG pipelines, paid per-call via x402 micropayments

## Facts

- Endpoint: POST https://x402engine.app/api/embeddings
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402engine-text-embeddings-api-b3ae60a5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FFzeGGN3RK0LPYgC_P9IN

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 x402engine-text-embeddings-api-b3ae60a5 -d '<json body>'
```

Example prompt: Turn this paragraph into a text embedding vector so I can store it in my vector database for semantic search: 'The quick brown fox jumps over the lazy dog.'

## When to prefer this

Choose this endpoint when you need pay-per-call text embeddings without managing an OpenAI API key or subscription — ideal for AI agents operating autonomously with x402 micropayment wallets. It's a good fit for RAG pipelines, semantic search indexing, and clustering tasks where you want on-demand embedding generation billed at $0.001 USDC per call with no upfront commitment.

## Known failure modes

- Empty or missing input text returns a 400 error
- Text exceeding model token limit (8191 tokens) may be truncated or rejected
- Payment failure or insufficient USDC balance returns HTTP 402
- Service unavailability from upstream OpenAI API causes 503
- Malformed request body returns 422 validation error

## How this service works

Generate text embeddings using OpenAI text-embedding-3-small — for semantic search, clustering, RAG

## Output

A float array (dense vector) representing the semantic content of the input text, produced by OpenAI's text-embedding-3-small model. The vector can be stored in a vector database and used for cosine similarity, nearest-neighbor search, clustering, or as input to a RAG retrieval pipeline.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "anyOf": [
      {
       "required": [
        "text"
       ]
      },
      {
       "required": [
        "texts"
       ]
      }
     ],
     "properties": {
      "text": {
       "type": "string",
       "example": "hello world",
       "description": "Single text to embed"
      },
      "texts": {
       "type": "array",
       "items": {
        "type": "string",
        "example": "hello"
       },
       "example": [
        "hello",
        "world"
       ],
       "maxItems": 100,
       "minItems": 1,
       "description": "Array of texts to embed (1-100)"
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

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