Skip to content

Overview

TIP

Want to explore micro-payments and crypto? You can also use the Inference Grid by connecting directly to the relay using a Spark wallet.

Platform provides a more traditional billing experience. Once you sign up and fund your account, you can generate an API key and use any OpenAI-compatible SDK to send requests to the Inference Grid:

python
from openai import OpenAI

client = OpenAI(
    base_url="https://relay.inferencegrid.ai/",
    api_key="..."
)

client.chat.completions.create(
    model="gpt-4o|claude-3.7",
    messages=[
        {
            "role": "user",
            "content": "Tell me a joke!",
        },
    ],
)
ts
import OpenAI from 'openai';

const client = new OpenAI({
    baseURL: "https://relay.inferencegrid.ai/",
    apiKey: "..."
});

await client.chat.completions.create({
    model: "gpt-4o|claude-3.7",
    messages: [
        {
            role: "user",
            content: "Tell me a joke!",
        },
    ],
});