Platform

Can I use audio transcription, speech and rerank through Cognocient?

Cognocient proxies /v1/audio/transcriptions, /v1/audio/translations, /v1/audio/speech and /v1/rerank with the same budgets, guardrails, freeze and cost tracking as chat. Available on every plan.

These endpoints follow the OpenAI request format, so the OpenAI SDK works unchanged with base_url="https://api.cognocient.com/v1" and your Cognocient key.

Transcription and translation

from openai import OpenAI
 
client = OpenAI(base_url="https://api.cognocient.com/v1", api_key="<your proxy key>")
 
with open("meeting.mp3", "rb") as f:
    result = client.audio.transcriptions.create(model="whisper-1", file=f)
print(result.text)
ModelProviderBilled by
whisper-1OpenAISecond of audio
gpt-4o-transcribe, gpt-4o-mini-transcribeOpenAITokens reported in the response
whisper-large-v3, whisper-large-v3-turboGroqSecond of audio
  • Files up to 25 MB. Send response_format as usual: json, text, verbose_json, srt or vtt. To meter cost accurately Cognocient asks the provider for the richest format it supports and rebuilds the format you asked for.
  • For SRT and VTT the audio length is read from the last caption timestamp.
  • /v1/audio/translations (to English) works the same way.

Speech

audio = client.audio.speech.create(model="tts-1", voice="alloy", input="Your report is ready.")
audio.write_to_file("out.mp3")

tts-1, tts-1-hd and gpt-4o-mini-tts (OpenAI), playai-tts and canopylabs/orpheus-* (Groq). Input is limited to 5,000 characters. Cost is per character; for gpt-4o-mini-tts (which bills audio output by time) the audio length is estimated from the text and the basis is marked estimated.

Rerank

import httpx
r = httpx.post("https://api.cognocient.com/v1/rerank",
    headers={"Authorization": "Bearer <your proxy key>"},
    json={"model": "rerank-v3.5", "query": "refund policy",
          "documents": ["Returns within 30 days…", "Shipping takes 3-5 days…"], "top_n": 1, "return_documents": True})

The request and response follow Cohere's shape whichever provider serves it. Provider is chosen from the model name: rerank-v3.5, rerank-english-v3.0 and similar go to Cohere; jina-reranker-* to Jina; and Voyage's rerank-2, rerank-2.5, rerank-3 (or an explicit voyage/rerank-2) to Voyage. Up to 1,000 documents per request.

Add the provider key (Cohere, Jina or Voyage) under Settings → AI Providers first. A request for a model whose provider has no key returns a clear 400 naming the provider.

Cost and attribution

Every call is logged with your X-Cost-* attribution tags and appears in the dashboard with the endpoint that served it. The x-cog-cost-basis response header tells you how the cost was derived: seconds, tokens, characters, searches, estimated, fallback (no price on file) or unmetered (the provider returned neither a duration nor usage, so nothing could be honestly charged).

Limits

  • Streaming transcription and realtime audio are not supported.
  • Other providers (Deepgram, ElevenLabs, Azure Speech) are not supported yet.

On this page