LlamaIndex integrates with AJ STUDIOZ Cloud Infra through the OpenAI-compatible API. All models are cloud-hosted — no GPU or local Ollama instance required. Use any model for chat, completions, and embeddings in your LlamaIndex pipelines.
from llama_index.llms.openai import OpenAIfrom llama_index.core import Settingsllm = OpenAI( model="gemma3:27b", api_base="https://api.ajstudioz.co.in/v1", api_key="YOUR_API_KEY", temperature=0.7)# Set as global defaultSettings.llm = llm
from llama_index.llms.openai import OpenAIfrom llama_index.core.llms import ChatMessagellm = OpenAI( model="deepseek-v3.2", api_base="https://api.ajstudioz.co.in/v1", api_key="YOUR_API_KEY")messages = [ ChatMessage(role="system", content="You are a helpful assistant."), ChatMessage(role="user", content="Summarize the benefits of AI in education."),]response = llm.chat(messages)print(response.message.content)
from llama_index.llms.openai import OpenAIfrom llama_index.core.llms import ChatMessagellm = OpenAI( model="gemma3:27b", api_base="https://api.ajstudioz.co.in/v1", api_key="YOUR_API_KEY")messages = [ChatMessage(role="user", content="Write a brief history of the internet.")]for delta in llm.stream_chat(messages): print(delta.delta, end="", flush=True)