Skip to main content
POST
/
api
/
v1
/
ai
/
embeddings
Generate embeddings from text
curl --request POST \
  --url https://api.oryntai.xyz/api/v1/ai/embeddings \
  --header 'Content-Type: application/json' \
  --header 'X-Network: <x-network>' \
  --data '
{
  "model": "text-embedding-3-small",
  "text": "Hello world",
  "options": {}
}
'
{
  "model": "text-embedding-3-small",
  "embedding": [
    0.01,
    0.05,
    0.23,
    0.56
  ]
}

Headers

X-Network
string
required

Blockchain network to use (e.g., solana, solana-devnet, base, polygon)

X-PAYMENT
string

On-chain payment proof for HTTP 402 requests

Body

application/json
model
string
required

Embedding model to use

Example:

"text-embedding-3-small"

text
string
required

Text to embed

Example:

"Hello world"

options
object

Provider-specific options

Response

Embedding vector