# CortexCloud Text Embedding API

> CortexCloud Text Embedding API is a paid API for AI agents from api.cortexcloud.org, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Generates vector embeddings for one or more text strings using configurable embedding models, paid per call in USDC via x402

## Facts

- Endpoint: GET https://api.cortexcloud.org/v1/ai/embed
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cortexcloud-text-embedding-api-62adbba2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OAyFJS8TIm0C4_W5jyhw5

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 cortexcloud-text-embedding-api-62adbba2
```

Example prompt: Embed these three sentences for me so I can store them in my vector database: 'The cat sat on the mat', 'Dogs are loyal companions', and 'Birds can fly south for winter' — use the default text-embedding-004 model.

## When to prefer this

Choose this endpoint when you need pay-per-call text embeddings with no API key or account signup, settling payment in USDC on Base via x402. Ideal for autonomous AI agents that need to embed text on demand without managing subscription billing. Prefer this over OpenAI or Cohere direct APIs when operating in a crypto-native, agent-to-agent payment context or when you want cost transparency at the per-call level.

## Known failure modes

- Input array exceeds 128 items — returns error indicating maxItems constraint
- Empty input array (minItems: 1 violation) — returns validation error
- Invalid model name — may return error or fall back to default
- Payment failure via x402 — 402 response if USDC payment not completed
- Oversized individual strings may cause token limit errors from underlying model

## How this service works

One pay-per-call API for AI agents: optimization, AI, research, on-chain data, and automation — all settled in USDC on Base via x402. Discover via MCP and Bazaar, estimate free, pay per call. No API keys, no signup.

## Output

Returns a JSON object containing an array of embedding objects (each with a float array 'embedding'), the model name used (e.g. 'openrouter/google/text-embedding-004'), and the price in USD for the call. Each input string maps to one embedding vector in the data array.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 128,
   "minItems": 1
  },
  "model": {
   "type": "string",
   "default": "text-embedding-004"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "format": "application/json",
 "example": {
  "data": [
   {
    "embedding": [
     0.01,
     0.02,
     -0.03
    ]
   }
  ],
  "model": "openrouter/google/text-embedding-004",
  "price_usd": 0.0001
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cortexcloud-text-embedding-api-62adbba2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.cortexcloud.org](https://www.zero.xyz/host/api.cortexcloud.org/llms.txt)
