Mercatus AI Gateway

Your agents.
One gateway.

Language, image and video models through one Mercatus API key. Bring your tools. Pay as you go.

from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.mercatus-ai.com/v1",
    api_key="YOUR_MERCATUS_KEY",
)

with client.responses.create(
    model="MODEL_ID",
    input="Hello!",
    stream=True,
) as stream:
    for event in stream:
        if event.type == "response.output_text.delta":
            print(event.delta, end="", flush=True)
pip install openai
Setup guide

Beyond pay as you go

Use it today.
Plan for next month.

Buy OSTR for planned monthly usage. Each OSTR provides $20 of inference credit. Use it through the API or sell unused OSTR before the serving period ends.

Explore OSTR

Choose your month.

Each OSTR series has a delivery month and a published model menu.

Buy or sell OSTR.

Trade monthly inference on the Forward Market.

Use your credit through the API.

Each OSTR provides $20 of credit. API usage draws from it at your series’ fixed model prices.