Skip to content

Quickstart

Issue a key, point your client at the DI base URL, and send your first request — in about two minutes.

Create a key on the API Keys page. Keys look like llm_live_… and authenticate every surface. Copy it when it is shown — the full value is only displayed once.

DirectInference speaks the OpenAI wire format on this surface, so the stock OpenAI SDK works unchanged. Pick your language:

Terminal window
pip install openai

Set base_url to the DI endpoint and your api_key to the key you just issued. Keep sending whatever model string your application already uses.

from openai import OpenAI
client = OpenAI(
api_key="llm_live_...",
base_url="https://app.directinference.com/di/v1",
)
resp = client.chat.completions.create(
model="gpt-5.5-mini",
messages=[{"role": "user", "content": "In one sentence, what is DirectInference?"}],
)
print(resp.choices[0].message.content)
print("model:", resp.model) # echoes "gpt-5.5-mini"
print("usage:", resp.usage) # prompt / completion / total tokens

Already built on a specific vendor SDK? Each surface is a first-class drop-in — keep your client and just change the base URL.