Skip to Content
Tara Docs

Models API

OpenAI-compatible endpoints for chat, embeddings, rerank, images, speech and search.

Every endpoint takes Authorization: Bearer <API key> and is paid from your credit. The base address ends in /v1 and is shown in Settings → API keys. Examples use $TARA_BASE_URL and $TARA_API_KEY as set up in First API call.

Method and pathWhat it does
GET /v1/modelsEvery model with its kind, price and options
POST /v1/chat/completionsChat, OpenAI format, streaming with "stream": true
POST /v1/embeddingsVectors for a list of texts
POST /v1/rerankOrder documents by relevance to a query
POST /v1/imagesMake a picture
POST /v1/audio/speechTurn text into speech
GET /v1/searchWeb search

Models

curl "$TARA_BASE_URL/models" -H "Authorization: Bearer $TARA_API_KEY"

Each entry has id, owned_by (the maker), kind, pricing, and where they apply efforts (thinking levels) and voices (for speech).

Chat

curl "$TARA_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $TARA_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "<chat model>", "messages": [{"role": "user", "content": "Hello"}], "stream": true}'

reasoning_effort sets the thinking level, for models whose efforts list it. Any other value is refused with 400.

Embeddings

curl "$TARA_BASE_URL/embeddings" \
  -H "Authorization: Bearer $TARA_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "<embedding model>", "input": ["first text", "second text"]}'

The answer is OpenAI's shape: data[i].embedding. Some models take dimensions.

Rerank

curl "$TARA_BASE_URL/rerank" \
  -H "Authorization: Bearer $TARA_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "<rerank model>", "query": "cheap flights", "documents": ["…", "…"]}'

The answer has results, each with the document's index and its relevance_score.

Images

curl "$TARA_BASE_URL/images" \
  -H "Authorization: Bearer $TARA_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "<image model>", "prompt": "a lighthouse at dawn, watercolour"}'

Other fields are the model's own. The answer has output_format and data[i].b64_json.

Speech

curl "$TARA_BASE_URL/audio/speech" \
  -H "Authorization: Bearer $TARA_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "<speech model>", "input": "Hello there", "voice": "<one of the model voices>"}' \
  --output hello.audio

The answer is the audio itself.

curl "$TARA_BASE_URL/search?q=solar+prices&limit=5" -H "Authorization: Bearer $TARA_API_KEY"

See Search for the parameters.