LLM API
Quickstart
From zero to your first completion in three steps.
1. Get a key
Create an inference key in the Console under Inference API → Keys and export it:
export UPGREAT_API_KEY="sk-..."2. List the models
A quick way to confirm the key works and see what you can call:
curl https://llm.upgreat.ai/v1/models \
-H "Authorization: Bearer $UPGREAT_API_KEY"3. Send a chat completion
Use the official OpenAI SDK, or plain HTTP:
from openai import OpenAI
client = OpenAI(
base_url="https://llm.upgreat.ai/v1",
api_key="$UPGREAT_API_KEY",
)
resp = client.chat.completions.create(
model="qwen3.6-27b",
messages=[
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Give me three uses for embeddings."},
],
max_tokens=300,
)
print(resp.choices[0].message.content)Pip / npm
Install the SDK withpip install openai or npm install openai. Both target the OpenAI wire format the LLM API implements.Where to go next
- Streaming & reasoning — render tokens as they arrive.
- Embeddings — build search and RAG.
- API reference — every endpoint, parameter and schema.