Quickstart
Get your first response from InferexAI in under 2 minutes.
1
Create an account and get an API key
Sign up at inferexai.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 InferexAI SDK
Install the official InferexAI SDK for your language:
3
Make your first request
Pass your API key and start making calls — no extra configuration needed:
from inferexai import InferexAI
client = InferexAI(api_key="sk-live-your-key-here")
response = client.chat.completions.create(
model="default",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
import InferexAI from "inferexai";
const client = new InferexAI({ apiKey: "sk-live-your-key-here" });
const response = await client.chat.completions.create({
model: "default",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);
curl https://api.inferexai.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:
from inferexai import InferexAI
client = InferexAI(api_key="sk-live-your-key-here")
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)