Skip to main content

Documentation Index

Fetch the complete documentation index at: https://student-213fb9fc.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Overview

AJ STUDIOZ Cloud Infra implements the full OpenAI-compatible REST API, which means you can use the official OpenAI Python and Node.js SDKs by simply changing the base_url / baseURL and your API key. No new SDK to install. No code rewrites.

Python

Installation

pip install openai

Setup

from openai import OpenAI

client = OpenAI(
    base_url="https://api.ajstudioz.co.in/v1",
    api_key="YOUR_API_KEY"          # your AJ STUDIOZ API key
)

Chat Completions

Chat
response = client.chat.completions.create(
    model="gemma3:27b",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "What is the speed of light?"}
    ],
    temperature=0.7
)
print(response.choices[0].message.content)

Streaming

Streaming
stream = client.chat.completions.create(
    model="deepseek-v3.2",
    messages=[{"role": "user", "content": "Tell me a short story about robots."}],
    stream=True
)

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

List Models

List Models
models = client.models.list()
for m in models.data:
    print(m.id)

Embeddings

Embeddings
response = client.embeddings.create(
    model="gemma3:4b",
    input="The universe is enormous and full of wonder"
)
print(len(response.data[0].embedding))

Node.js

Installation

npm install openai

Setup

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.ajstudioz.co.in/v1",
  apiKey: process.env.AJSTUDIOZ_API_KEY,
});

Chat Completions

Chat
const response = await client.chat.completions.create({
  model: "gemma3:27b",
  messages: [
    { role: "system", content: "You are a helpful assistant." },
    { role: "user", content: "Explain Docker in simple terms." }
  ],
  temperature: 0.7,
});

console.log(response.choices[0].message.content);

Streaming

Streaming
const stream = await client.chat.completions.create({
  model: "kimi-k2:1t",
  messages: [{ role: "user", content: "List 5 interesting facts about the ocean." }],
  stream: true,
});

for await (const chunk of stream) {
  const text = chunk.choices[0]?.delta?.content || "";
  process.stdout.write(text);
}

Embeddings

Embeddings
const response = await client.embeddings.create({
  model: "gemma3:4b",
  input: "Machine learning enables computers to learn from data",
});

console.log(`Embedding dimensions: ${response.data[0].embedding.length}`);

Environment Setup

AJSTUDIOZ_API_KEY=your_api_key_here

Framework Compatibility

Since AJ STUDIOZ uses the OpenAI-compatible format, it also works directly with:
ToolHow to configure
LangChainSet base_url in ChatOpenAI
LlamaIndexSet api_base in OpenAI LLM
CursorSet custom base URL in settings
Continue (VS Code)Configure in config.json
Vercel AI SDKPass baseURL to createOpenAI
AutoGenSet base_url in OAI_CONFIG_LIST

Next Steps

LangChain Guide

Full LangChain integration examples

Function Calling

Tool use with OpenAI SDK

Vision Guide

Image inputs with vision models

Available Models

Browse all 32 available models