IronStratum

POST /v1/embeddings

Create embeddings (unit-billed, tokens)

Specialty route (route_type: embeddings). JSON passthrough both ways: the body crosses minimally normalized (model mapped to the provider's id for it), the provider's response returns verbatim. Accepted params — model, input (string or string array; token arrays are a 400), encoding_format, dimensions; everything else is unknown_param. Metering: unit_type='tokens' from the response's usage.prompt_tokens (total_tokens fallback, else ceil(runes/4) — approx4 recorded in the ledger's media). Idempotency-Key carries replay semantics on this route (contract §8 route-scope).

Request

Request body fields for createEmbeddings
Field Type Required Description
model string yes An IronStratum alias whose route_type is embeddings.
input any yes A string or an array of strings (token arrays are rejected).
encoding_format string no —
dimensions integer no —

Responses

400 400

400 response fields for createEmbeddings
Field Type Required Description
error object yes —

401 401

401 response fields for createEmbeddings
Field Type Required Description
error object yes —

402 402

402 response fields for createEmbeddings
Field Type Required Description
error object yes —

403 403

403 response fields for createEmbeddings
Field Type Required Description
error object yes —

404 404

404 response fields for createEmbeddings
Field Type Required Description
error object yes —

409 409

409 response fields for createEmbeddings
Field Type Required Description
error object yes —

500 500

500 response fields for createEmbeddings
Field Type Required Description
error object yes —

502 502

502 response fields for createEmbeddings
Field Type Required Description
error object yes —

503 503

503 response fields for createEmbeddings
Field Type Required Description
error object yes —

Status codes

  • 200 — The embeddings response, passed through verbatim.

Example

curl -X POST https://api.ironstratum.com/v1/embeddings \
  -H "Authorization: Bearer $IRONSTRATUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"<model>","input":"<input>"}'

All operations · interactive reference · openapi.yaml