One key. Four live models.

Use two chat models, embeddings and speech transcription through one OpenAI-compatible endpoint. Every example below tracks the catalog available today.

Start with the catalog

Ask the API what is live before choosing a model. The response is authoritative; retired or unavailable services are not advertised.

  1. Export your keyKeep it in a server-side environment variable.
  2. GET /modelsRead the current model IDs and capabilities.
  3. Send an exact model IDEvery generation request requires the model field.
$ export BHARATCODE_API_KEY=bc_live_your_key_here
$ curl https://bharatcode.ai/api/model/v1/models -H "Authorization: Bearer $BHARATCODE_API_KEY"

Models available now

The public surface is deliberately small. Choose the model by the job, then use its matching endpoint. Access requirements are shown alongside each model.

Live catalog
ModelUse it forEndpointAccess
GLM 5.3z-ai/glm-5.3
Long-context reasoning and tool use/chat/completions
BharatCode Qwen3.6 35Bbharatcode:qwen36-35b-awq-200k
Coding, reasoning and tool use/chat/completionsEligible accounts
BharatCode Embed Smallbharatcode:embed-small-v1
Semantic search and retrieval/embeddingsEligible accounts
Parakeet TDT 0.6B v3parakeet-tdt-0.6b-v3
Multilingual speech to text/audio/transcriptionsEligible accounts

Copy a working request

Each example includes the required model field. Expand only the endpoint you need.

POSTGenerate code and call tools/chat/completions

Send OpenAI-compatible messages to Qwen 3.6 or GLM 5.3. The model field is required; GLM 5.3 requires a paid subscription.

$ curl https://bharatcode.ai/api/model/v1/chat/completions -H "Authorization: Bearer $BHARATCODE_API_KEY" -H "Content-Type: application/json" -d '{"model":"bharatcode:qwen36-35b-awq-200k","messages":[{"role":"user","content":"Say hello from BharatCode"}]}'
$ curl https://bharatcode.ai/api/model/v1/chat/completions -H "Authorization: Bearer $BHARATCODE_API_KEY" -H "Content-Type: application/json" -d '{"model":"z-ai/glm-5.3","messages":[{"role":"user","content":"Design a migration plan for this service"}]}'
POSTCreate text embeddings/embeddings

Turn text into vectors for semantic search, retrieval and project matching.

$ curl https://bharatcode.ai/api/model/v1/embeddings -H "Authorization: Bearer $BHARATCODE_API_KEY" -H "Content-Type: application/json" -d '{"model":"bharatcode:embed-small-v1","input":"student project search query"}'
POSTTranscribe an audio file/audio/transcriptions

In Postman, choose Body → form-data. Add model as Text and file as File; do not send this request as JSON.

$ curl https://bharatcode.ai/api/model/v1/audio/transcriptions -H "Authorization: Bearer $BHARATCODE_API_KEY" -F model=parakeet-tdt-0.6b-v3 -F file=@sample.wav

Use the OpenAI SDK

Change only the base URL and model. Keep your BharatCode key in the backend environment.

$ import OpenAI from 'openai'
$ 
$ const client = new OpenAI({
$   apiKey: process.env.BHARATCODE_API_KEY,
$   baseURL: 'https://bharatcode.ai/api/model/v1',
$ })
$ 
$ const completion = await client.chat.completions.create({
$   model: 'bharatcode:qwen36-35b-awq-200k',
$   messages: [{ role: 'user', content: 'Build a study planner schema' }],
$ })

Shared compute, used carefully

The API shares BharatCode serving capacity with Chat, CLI, Desktop and VS Code. Avoid unattended request loops, handle rate and availability errors, and treat your key like a password. GLM 5.3 uses a shared one-request queue; if capacity is temporarily unavailable, retry a 503 Model unavailable. later.