TheaimartAIx DOCS
Home Get API key

Embeddings

POST /v1/embeddings — vectorize text for search / RAG, using the OpenAI embeddings schema.

Request

curl https://api.aix.theaimart.co/v1/embeddings \
  -H "Authorization: Bearer $AIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "BAAI/bge-large-en-v1.5",
    "input": "vectorize this for code search"
  }'
e = client.embeddings.create(
    model="BAAI/bge-large-en-v1.5",
    input=["chunk one", "chunk two"],
)
vectors = [d.embedding for d in e.data]

input accepts a single string or an array (up to 100 items per request).

Response

{
  "object": "list",
  "model": "BAAI/bge-large-en-v1.5",
  "data": [{ "object": "embedding", "index": 0, "embedding": [0.01, -0.02, ""] }],
  "usage": { "prompt_tokens": 6, "total_tokens": 6 }
}

Billed per token on the model’s per-1M-token price.

Coding tip: pair embeddings (code search over a repo) with a chat model to build a retrieval-augmented coding agent — all on one key and one bill.

Last updated July 18, 2026

Was this page helpful?