Quickstart

Get your first response from InferexAI in under 2 minutes.

1

Create an account and get an API key

Sign up at inferexai.cloudvoice.in/signup, then go to Dashboard → API Keys and create a new key. Copy the full key — it starts with sk-live-.

Top up your wallet before making API calls — go to Dashboard and click "Add credits".
2

Install the OpenAI SDK

InferexAI is fully compatible with the official OpenAI SDK. Install it for your language:

Python
pip install openai
Node.js
npm install openai
3

Make your first request

The only change from the standard OpenAI SDK is the base_url and your API key.

Python
Node.js
curl
quickstart.py
from openai import OpenAI

client = OpenAI(
    api_key="sk-live-your-key-here",
    base_url="https://inferexapi.cloudvoice.in/v1",
)

response = client.chat.completions.create(
    model="default",
    messages=[{"role": "user", "content": "Hello!"}],
)

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

const client = new OpenAI({
  apiKey: "sk-live-your-key-here",
  baseURL: "https://inferexapi.cloudvoice.in/v1",
});

const response = await client.chat.completions.create({
  model: "default",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(response.choices[0].message.content);
bash
curl https://inferexapi.cloudvoice.in/v1/chat/completions \
  -H "Authorization: Bearer sk-live-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
4

Enable streaming (optional)

Add stream=True to receive tokens as they are generated:

streaming.py
from openai import OpenAI

client = OpenAI(
    api_key="sk-live-your-key-here",
    base_url="https://inferexapi.cloudvoice.in/v1",
)

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

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

What's next?

API Reference
Full parameters + live playground
Models
Available models and capabilities
Streaming guide
Handle streaming responses
Billing
Understand wallet and pricing