Skip to main content

Try our API

Use one of the Tinfoil SDKs to make some inference requests to an AI model. It’s as easy as getting an API key and running one of our examples.

Get an API key

You’ll need a Tinfoil API key to make inference requests. Create one here.

Installation

Install the SDK for your language.
pip install tinfoil

Inference

Make your first inference request with the gpt-oss-120b model.
import os
from tinfoil import TinfoilAI

client = TinfoilAI(
    api_key=os.getenv("TINFOIL_API_KEY")
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "Hello!",
        }
    ],
    model="gpt-oss-120b",
)
print(chat_completion.choices[0].message.content)

Next steps

SDK documentation

Migration, async usage, and per-model examples across all Tinfoil SDKs.

Model catalog

Browse all available AI models.