Quickstart

Get from sign-up to your first model call in under two minutes.

1. Create an account

Sign up at infra.models/signup. You'll be dropped onto the dashboard inside your personal organisation. Top up credits in Billing or test on the free grant.

2. Create an API key

Open /api-keys and click Create key. Pick a name (e.g. "Production app") and an environment (live for production, test for staging). The full secret is shown once — copy it now and store it somewhere safe; we only keep the hash.

3. Call the API

InfraModels is OpenAI-compatible. Point any OpenAI SDK at the gateway URL and pass your im_live_… key.

cURL

curl https://api.infra.models/v1/chat/completions \
  -H "Authorization: Bearer im_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "im/anthropic-claude-3-5-haiku",
    "messages": [{"role": "user", "content": "Say hi in 5 words"}]
  }'

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    api_key="im_live_...",
    base_url="https://api.infra.models/v1",
)

response = client.chat.completions.create(
    model="im/anthropic-claude-3-5-haiku",
    messages=[{"role": "user", "content": "Say hi in 5 words"}],
)
print(response.choices[0].message.content)

JavaScript / TypeScript

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env.INFRAMODELS_KEY,
  baseURL: 'https://api.infra.models/v1',
});

const res = await client.chat.completions.create({
  model: 'im/anthropic-claude-3-5-haiku',
  messages: [{ role: 'user', content: 'Say hi in 5 words' }],
});
console.log(res.choices[0].message.content);

What's next