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 path | What it does |
|---|---|
GET /v1/models | Every model with its kind, price and options |
POST /v1/chat/completions | Chat, OpenAI format, streaming with "stream": true |
POST /v1/embeddings | Vectors for a list of texts |
POST /v1/rerank | Order documents by relevance to a query |
POST /v1/images | Make a picture |
POST /v1/audio/speech | Turn text into speech |
GET /v1/search | Web 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.audioThe answer is the audio itself.
Search
curl "$TARA_BASE_URL/search?q=solar+prices&limit=5" -H "Authorization: Bearer $TARA_API_KEY"See Search for the parameters.