API · AI Gateway · 100% OpenAI compatible

The proxy for the new AI economy.

Pay less Stay free Control everything

The LLM market changes every week. Cheaper models emerge, others get discontinued. Why lock yourself into one expensive API? MyDatAgent's AI Gateway is the intelligent layer between your code and models — one key, all providers, total governance.

30sto integrate
~80%less cost
0refactoring
app.py OpenAI compatible
1from openai import OpenAI
2
3client = OpenAI(
4    api_key="mda-prod-7c9f...8e21",  # <-- your MDA key
5    base_url="https://gateway.mydatagent.ai/v1"  # <-- only change the URL
6)
7
8resp = client.chat.completions.create(
9    model="mda/llm-2.1-32b",        # or "openai/gpt-4o", "anthropic/claude-opus"
10    messages=[{"role": "user", "content": "Refactor this function."}],
11)
12
13print(resp.choices[0].message.content)
1import OpenAI from "openai";
2
3const client = new OpenAI({
4  apiKey: process.env.MDA_KEY,           // <-- your MDA key
5  baseURL: "https://gateway.mydatagent.ai/v1"  // <-- only change the URL
6});
7
8const resp = await client.chat.completions.create({
9  model: "mda/llm-2.1-32b",
10  messages: [{ role: "user", content: "Summarize the report." }]
11});
12
13console.log(resp.choices[0].message.content);
1curl https://gateway.mydatagent.ai/v1/chat/completions \
2  -H "Authorization: Bearer $MDA_KEY" \           # <-- your MDA key
3  -H "Content-Type: application/json" \
4  -d '{
5    "model": "mda/llm-2.1-32b",
6    "messages": [{"role":"user","content":"Hello."}]
7  }'
Zero lock-in · Native multi-provider

Don't be a hostage to OpenAI, Anthropic, or Google. Switch with one click.

OpenAI-compatible reverse proxy architecture. Your app becomes completely vendor-agnostic — routing changes in the dashboard, not in code.

How it works, in practice

You use the OpenAI SDK on your backend, but point to MyDatAgent's URL. Code stays the same. Models change in the dashboard.

01
Code stays intact. Your app keeps using `openai-python`, `openai-node`, or any compatible wrapper.
02
Model-based routing. Today MDA LLM 2.1; tomorrow, if Claude Opus drops 30%, swap mda/llm-2.1-32b for anthropic/claude-opus and done.
03
Multi-provider in parallel. Gemini for vision, Claude for long text, private SLM for internal tasks — one API, multiple destinations.
Extreme economics · Smart substitution

Why pay Claude Opus for tasks an SLM solves better?

The AI Gateway enables dynamic substitution. Configure routes so high-cost requests are automatically redirected to MyDatAgent's SLMs running on private infrastructure.

Before · No Gateway

Entire team on Claude Opus

Devs love using Claude Code, but Opus's per-token cost destroys the IT budget. Code review, simple refactoring, tests — everything at premium prices.

Cost/month · 12 devs
USD 8.4k
Avg tokens/dev
2.1M
After · With MDA Gateway

Smart routing by complexity

Dev still uses Claude Code. But the Gateway intercepts and routes: simple task goes to private MDA LLM 2.1 32B; only critical refactoring hits Opus.

Cost/month · 12 devs
USD 1.7k
Monthly savings
−80%
Same productivity. Up to 80% savings on your API bill. Ultra-low latency from Brazilian datacenter — and zero FX volatility.
Governance · End Shadow AI

Keys by user, quotas by team, audit by line

That dev who pastes the company key on their laptop? That analyst who uploads a script with the server's key? Over. User-level governance with quotas, rate limits, and auditable logs.

Master key protected

The company's main credential never leaves the MDA backend. Devs and analysts get only derived, traceable, revocable keys.

Quotas & rate limits

Max spend (USD) per user/month. Tokens per minute (TPM). Requests per minute (RPM). When the budget runs out, the key stops consuming.

Complete observability

Who · when · which model · which tokens · what it cost · which project. Auditable, exportable logs for SIEM. Your CISO sleeps soundly.

Routing & fallback

Primary model down? Gateway redirects to secondary automatically. Built-in resilience, no extra code in your app.

Three ways to use

You don't adapt to the platform. It adapts to you.

From immediate URL swap to full agent orchestration — pick the integration that fits your current architecture.

01 · Mode
Direct API

Immediate swap

Swap OpenAI's base URL in your code for MyDatAgent's. Done. You're already running our high-performance SLMs, in USD, with zero FX risk, and ultra-low latency from our Brazilian datacenter.

Drop-in:
base_url → gateway.mydatagent.ai/v1
02 · Mode
AI Gateway

Smart routing

Point your app to the Gateway and let MyDatAgent's intelligence route dynamically. Everything logged, everything governed, single endpoint.

"If SDR → local MDA LLM 2.1. If PDF summary → GPT-4o-mini. If complex code → Claude."
03 · Mode
Custom platform

Agent ecosystem

Don't just consume tokens? Use the API to orchestrate MyDatAgent's ready-made agents (SDR, BI, DataOps) right in your system — Webhooks, n8n, or REST with MCP.

POST /agents/sdr/run → Full MCP workflow, governed and auditable.
Strategic box · MDA Consulting

Code runs on expensive LLMs, but no time to refactor?

Migrating from Big Tech APIs to private SLMs requires expertise in prompt routing, quantization (FP8), and RAG fine-tuning — so you don't lose quality.

MDA Consulting does the migration for you. We audit your current API logs, design the routing architecture (what goes to SLM, what stays on GPT-4), set up the Gateway with key governance, and guarantee your savings in the first 30 days.