Documentation

Embeddings

POST /v1/embeddings returns vector embeddings for search, retrieval, ranking, and semantic clustering.

Use it when

  • You are building semantic search
  • You want retrieval-augmented generation
  • You need deduplication or text similarity scoring

Code examples

1curl -X POST https://api.navy/v1/embeddings \
2  -H "Authorization: Bearer sk-navy-YOUR_KEY" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "model": "text-embedding-3-large",
6    "input": ["NavyAI API docs", "Embedding search example"]
7  }'

Parameters

  • model (string, required) — Embedding model ID such as text-embedding-3-large or text-embedding-ada-002
  • input (string or array, required) — Text or array of texts to embed
  • encoding_format (string, optional) — Return format: "float" or "base64"

Notes

  • The response follows the familiar OpenAI embeddings shape
  • Batch inputs are supported through an array in input
Docs Assistant
I’m here to help with NavyAI docs. Ask about endpoints, auth, models, request bodies, or integration details.