Quickstart

Get your first response from InferexAI in a few minutes. LLM, TTS and STT, voice agents and Quality all use the same API key and the same INR wallet.

1

Create an account and an API key

Sign up at inferexai.in/signup with your email or Google account (with email, confirm your address from the email we send). Then open Dashboard → API Keys and choose New key. Copy the key: it starts with sk-live- and is shown only once.

Requests are paid from your INR wallet. Add money from the dashboard with Top up; GST is added on top of the amount you choose. A one-time KYC check may be needed before your first top-up. See Billing & Wallet.
2

Install the SDK

The InferexAI SDKs (version 0.2.0) cover chat, speech, agents, Judge and your wallet:

Python
pip install inferexai
Node.js
npm install inferexai

No SDK? Every endpoint is plain HTTPS. The base URL is https://api.inferexai.in/v1, and your key goes in the Authorization: Bearer header.

3

Pick a model

Model ids are InferexAI names such as medha. List the ones open to your account, with their type (llm, stt, tts, embedding and more):

models.py
from inferexai import InferexAI

client = InferexAI(api_key="sk-live-your-key-here")

for model in client.models.list():
    print(model.id)
curl
curl https://api.inferexai.in/v1/models \
  -H "Authorization: Bearer sk-live-your-key-here"
4

Make your first request

Use a chat model from the list. The examples use medha; replace it if your list differs.

quickstart.py
from inferexai import InferexAI

client = InferexAI(api_key="sk-live-your-key-here")

response = client.chat.completions.create(
    model="medha",  # any chat model id from /v1/models
    messages=[{"role": "user", "content": "Namaste! GST kya hai? Ek line mein batao."}],
)

print(response.choices[0].message.content)
quickstart.ts
import InferexAI from "inferexai";

const client = new InferexAI({ apiKey: "sk-live-your-key-here" });

const response = await client.chat.completions.create({
  model: "medha", // any chat model id from /v1/models
  messages: [{ role: "user", content: "Namaste! GST kya hai? Ek line mein batao." }],
});

console.log(response.choices[0].message.content);
curl
curl -i https://api.inferexai.in/v1/chat/completions \
  -H "Authorization: Bearer sk-live-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "medha",
    "messages": [{"role": "user", "content": "Namaste! GST kya hai? Ek line mein batao."}]
  }'
5

See what it cost

A charged response carries X-Inferex-Charge and X-Inferex-Balance, both in rupees (the -i in the curl example prints them). Every charge is also a line in your usage. Your price for every model is on your rate card:

Python
rates = client.wallet.rate_card()   # your price for every model, in rupees per unit
balance = client.wallet.balance()   # includes balance_inr
print(balance["balance_inr"])
Node.js
const rates = await client.wallet.rateCard();
const { balance_inr } = await client.wallet.balance();
6

Stream the reply (optional)

Add stream=True (stream: true in Node) to receive tokens as they are generated:

streaming.py
stream = client.chat.completions.create(
    model="medha",
    messages=[{"role": "user", "content": "Tell me a short story."}],
    stream=True,
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Next steps

Voice agents
Build an agent and connect calls from your telephony
Agent templates
13 ready agents in English and Hindi
Quality
Test calls with simulated callers, analysers, CI gate
Judge
Score any text or images against your questions
Routines
Scheduled or triggered agent work with budgets
Approvals
A person approves sensitive actions first
Custom voices
A voice from a short recording, with consent
Phone numbers
Your own SIP trunk and numbers, answered by your agent
Pricing
Units, your rate card and GST
Models
Model ids, types and what they accept
Streaming
Stream text and audio as it is made