Skip to main content
POST
/
v1
/
embeddings
Create text embeddings
curl --request POST \
  --url https://{host}/v2/workspaces/slug:llm-gateway/webhooks/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "<string>"
}
'
{
  "object": "list",
  "model": "<string>",
  "data": [
    {
      "object": "embedding",
      "index": 123,
      "embedding": [
        123
      ]
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "total_tokens": 123
  },
  "embedding": [
    123
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

User session JWT or instance API key (iak_*). Send as Authorization: Bearer <token>.

Body

application/json
model
string
required

Embedding model id from the catalogue.

Maximum string length: 256
input
required

Either a single string or an array of strings to embed.

dimensions
any

Requested output dimensionality. Must be one of the model's supported_dimensions when set; otherwise rejected with INVALID_DIMENSIONS.

analytics_context
object

Prisme.ai extension. Caller-supplied analytics context.

Response

Successful embedding response.

OpenAI-compatible embeddings response. When input was a single string, the response also exposes a flat root-level embedding field (Prisme.ai convenience extension) in addition to data[0].embedding.

object
enum<string>
required
Available options:
list
model
string
required
data
object[]
required
usage
object
embedding
number<float>[]

Prisme.ai extension. Convenience copy of data[0].embedding present only when the request input was a single string.