POST /v1/embeddings
OpenAI-compatible embeddings against an installed local runtime that serves the embedding modality. Pass a `model` id from `GET /v1/models`. Returns a Problem (503) when no reachable runtime can serve embeddings.

Authentication

Bearer Token (b3iq_local) API Key (header: X-B3IQ-API-Key) Bearer Token API Key (header: X-B3IQ-Router-Signature)

Request Body required

application/json
model string REQUIRED
input string | string[] REQUIRED
A string, or an array of strings, to embed.
One of:
Option 1string
Option 2
Array of: string
runtime_id string
Optional local runtime override.

Responses

200 OpenAI-compatible embeddings response.
application/json
object string
model string
data object[]
Array of:
object string
index integer
embedding number[]
Array of: number
usage object
default B3IQ-native problem response.
curl -X POST 'http://127.0.0.1:8831/v1/embeddings' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{  "model": "string",  "input": "string",  "runtime_id": "string"}'
const response = await fetch('http://127.0.0.1:8831/v1/embeddings', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({    "model": "string",    "input": "string",    "runtime_id": "string"  })});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('http://127.0.0.1:8831/v1/embeddings', headers=headers, json={  "model": "string",  "input": "string",  "runtime_id": "string"})print(response.json())
200 Response
{  "object": "<string>",  "model": "<string>",  "data": [    {      "object": "<string>",      "index": 123,      "embedding": [        123      ]    }  ],  "usage": "<object>"}
Ask a question... ⌘I