Create embeddings

Exact-model text embeddings. OpenAI text-embedding-3-small: $0.02 per million input tokens. Voyage voyage-4-large: $0.12 per million. Charges round up to the wallet's $0.0001 precision. No cross-model fallback or input truncation by default.

post/embeddings

Request

  • Base URL: https://www.ninjachat.ai/api/v1
  • URL: https://www.ninjachat.ai/api/v1/embeddings
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Safely retry the same logical write without duplicate billing or execution.

Request body

model'text-embedding-3-small' | 'voyage-4-large' required
dimensionsinteger
encoding_format'float' | 'base64'
input_type'query' | 'document'
truncationboolean
userstring

Response

Ordered embeddings and metered token usage.

object'list' required
modelstring required
cost_usdnumber required
request_idstring required

Changes

No recorded changes to this operation across all 1 revision of this API.