Quickstart

Admesh.ai serves every model through a single OpenAI-compatible endpoint. Getting to your first call takes three steps: get an API key, copy the base URL, send a request.

1. Get an API key

Sign in to the console and create a key on the API Keys page. Keys use the sk-live-* prefix (production) or sk-test-* (testing). The full secret is shown only once at creation — copy and store it immediately.

2. Copy the base URL

https://gateway.admesh.ai/v1

3. Send your first request

curl https://gateway.admesh.ai/v1/chat/completions \
  -H "Authorization: Bearer $ADMESH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/claude-sonnet","messages":[{"role":"user","content":"Hello"}]}'

Using the OpenAI SDK

from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.admesh.ai/v1",
    api_key="YOUR_ADMESH_API_KEY",
)
resp = client.chat.completions.create(
    model="anthropic/claude-sonnet",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://gateway.admesh.ai/v1",
  apiKey: "YOUR_ADMESH_API_KEY",
});
const resp = await client.chat.completions.create({
  model: "openai/gpt-4o",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);

Next steps