Embeddings, Rerank and Speech-to-Text
Vector, reranking and transcription endpoints
Three endpoints for RAG and search: text embeddings (OpenAI-compatible), reranking documents against a query (rerank, Cohere/Jina style) and transcribing an audio file (transcriptions, OpenAI-compatible multipart form). Models ending in :tr are hosted in Türkiye; see the Türkiye models section for their limits.
Embeddings
/v1/embeddings
OpenAI-compatible body: model, input (a string or an array of up to 128 strings) and optional encoding_format (float by default, or base64).
curl https://api.onysoft.com/v1/embeddings \
-H "Authorization: Bearer $ONYSOFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "openai/text-embedding-3-small", "input": ["Merhaba dünya", "Yapay zeka API"]}'
emb = client.embeddings.create(model="qwen/qwen3-embedding-8b:tr", input="Merhaba dünya")
print(len(emb.data[0].embedding))
Only input tokens are charged. Models: openai/text-embedding-3-small, openai/text-embedding-3-large and qwen/qwen3-embedding-8b:tr. The client in the Python example is the client from the OpenAI SDK section; the SDK's default encoding_format: "base64" request is supported.
Rerank
/v1/rerank
Body: model, query, documents (an array of strings or {"text": …} objects), optional top_n and return_documents.
curl https://api.onysoft.com/v1/rerank \
-H "Authorization: Bearer $ONYSOFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3-reranker-8b:tr",
"query": "İade süresi kaç gün?",
"documents": ["İade 14 gün içinde yapılır.", "Kargo ücreti alıcıya aittir."],
"top_n": 1
}'
The response is top-level (as the Cohere/Jina SDKs expect): each entry of the results array carries the document position (index) and score (relevance_score); usage is returned too. Model: qwen/qwen3-reranker-8b:tr. Up to 100 documents can be sent per request.
Speech-to-Text (Transcriptions)
/v1/audio/transcriptions
OpenAI-compatible multipart form: file (required), model, optional language (e.g. tr), prompt, response_format (json or text) and temperature.
curl https://api.onysoft.com/v1/audio/transcriptions \
-H "Authorization: Bearer $ONYSOFT_API_KEY" \
-F file=@kayit.mp3 \
-F model=qwen/qwen3-asr-1.7b:tr \
-F language=tr
The response is {"text": "…"}. Model: qwen/qwen3-asr-1.7b:tr. A request with a model that is not :tr gets a 400 that explains the correct usage; other audio models run through the asynchronous Audio API. File size and duration limits are in the Türkiye models section.