Skip to main content

Getting started

Follow these three steps to send your first API request.

1. Create an account and API key

Sign up at the Open Inference console and create an API key from the dashboard. Store it somewhere safe — you won’t be able to see it again. Set it as an environment variable:
export OPENINFERENCE_API_KEY="your-api-key"

2. Set up your dev environment

Install the OpenAI SDK for your language. The Open Inference API is fully compatible with the OpenAI client libraries.
pip install openai

3. Send a test request

from openai import OpenAI

client = OpenAI(
    base_url="https://api.openinference.xyz/v1",
    api_key="your-api-key",  # or use OPENINFERENCE_API_KEY env var
)

response = client.chat.completions.create(
    model="openai/gpt-oss-120b",
    messages=[
        {"role": "user", "content": "What is Open Inference?"}
    ],
)

print(response.choices[0].message.content)
You should see a response from the model. You’re all set.

Next steps

Streaming

Stream responses token by token in real time.

API reference

Full reference for all available endpoints.

Browse models

See all models available for inference.