Quickstart

Get going with Eclogue in a few minutes. One gateway speaks OpenAI, Anthropic and Vertex / Gemini natively — just pick the protocol your SDK already uses.

1. Get an API key

Go to portal.eclogue.ai to sign up, then create an API key from the console.

2. Install the OpenAI SDK

pip install openai

3. Make your first request (OpenAI protocol)

from openai import OpenAI

client = OpenAI(
    base_url="https://api.eclogue.ai/v1",
    api_key="gw-your-key-here",
)

response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Hello!"}],
)

print(response.choices[0].message.content)

With curl

curl -X POST https://api.eclogue.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer gw-your-key-here" \
  -d '{
    "model": "deepseek-chat",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 100
  }'

With JavaScript

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://api.eclogue.ai/v1',
  apiKey: 'gw-your-key-here',
})

const response = await client.chat.completions.create({
  model: 'deepseek-chat',
  messages: [{ role: 'user', content: 'Hello!' }],
})

console.log(response.choices[0].message.content)

4. Other protocols

The same key works with every protocol. Short examples below; see each protocol page for the full reference.

Anthropic Messages (Claude Code / Anthropic SDK)

curl -X POST https://api.eclogue.ai/v1/messages \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer gw-your-key-here" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 100,
    "messages": [{"role":"user","content":"Hello!"}]
  }'

See the Messages API reference.

Vertex / Gemini (@google/genai SDK)

curl -X POST "https://api.eclogue.ai/v1/models/gemini-2.5-pro:generateContent" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer gw-your-key-here" \
  -d '{
    "contents": [{"role":"user","parts":[{"text":"Hello!"}]}],
    "generationConfig": {"maxOutputTokens": 100}
  }'

Note that the model goes in the URL path. See the Vertex / Gemini reference.

5. Check your balance

curl https://api.eclogue.ai/v1/auth/key \
  -H "Authorization: Bearer gw-your-key-here"

Available models

List every available model:

curl https://api.eclogue.ai/v1/models

See the models page for the full catalogue and pricing.

Next steps