aim2balance.ai API

Build with AI, without the concerns

One OpenAI-compatible API for 15+ open models, priced in euros. 2.5% of every request funds forest restoration.

Base URL
Copy
https://platform.aim2balance.ai/api/a2b/v1

Everything you expect, plus a planet that gets something back

  • Drop-in compatible. Works with the OpenAI and Anthropic SDKs. Change the base URL and key, keep your code.
  • One key, many models. Kimi, GLM, Qwen, Mistral, DeepSeek, MiniMax and Gemma. Switch with one parameter.
  • Smart routing. a2b-core2 and a2b-boost2 pick the right model for each step and run web search for you.
  • Prepaid, in euros. Top up a wallet and pay per token. A request your balance cannot cover is refused before it runs.
  • Spend under control. Spending limits, alerts and allowed models on every key.
  • Funds restoration. 2.5% of every request funds ecosystem restoration with Bergwaldprojekt e.V.

AI should work for us, not against us.

Four commitments behind every request you send.

Sustainability

Sustainable by design

  • 80% less energy & water*
  • 100% renewable energy
  • 2.5% restoration fees per transaction
  • Real-time footprint data

* Compared with conventional AI, based on Ecologits.

What a prompt really costs
Sovereignty

Individual and national sovereignty

  • EU hosting. Every prompt runs on servers inside the EU.
  • GDPR compliance. Plus the EU AI Act, built in from the start.
  • AES-256 encryption. Bank-grade protection for your data.
  • Open models. Against power-concentration.
Data stays in the EU
Human Agency

Serving humans, not investors

  • AI-Balance Bar. See how you use AI at a glance.
  • Mindful nudges. Gentle prompts to pause, never pressure.
  • No engagement loops. No streaks, infinite feeds or notification bait.
  • You stay in charge. Limits and reminders are yours to set.
Fairness

Pay-as-you-go, with full transparency

  • Pay per prompt. Prepaid credit, no subscription.
  • Credit never expires. Use it today or next year.
  • Every cent visible. See what each prompt costs.
  • No investors. A non-profit, so no profit pressure.
See pricing

Quickstart

Your key, the base URL and a first request in curl, Python or Node.

Your first request in three steps

  1. Create an account. Sign up and top up your wallet.
  2. Create an API key. Generate a key in the API dashboard and store it as an environment variable.
  3. Send a request. Use any OpenAI SDK with our base URL.

Authentication and keys

Send your key as a bearer token in the Authorization header. Create keys in Settings › API dashboard and keep them in an environment variable, never in client-side code.

HTTP header
Copy
Authorization: Bearer $A2B_API_KEY

Open in the full reference

Code examples

The same request in curl, Python and JavaScript. Any OpenAI SDK works: change the base URL and key.

curl
Copy
curl https://platform.aim2balance.ai/api/a2b/v1/chat/completions \
  -H "Authorization: Bearer $A2B_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "a2b-core2",
    "messages": [
      { "role": "user", "content": "Explain tidal energy in two sentences." }
    ]
  }'
Python
Copy
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://platform.aim2balance.ai/api/a2b/v1",
    api_key=os.environ["A2B_API_KEY"],
)

reply = client.chat.completions.create(
    model="a2b-core2",
    messages=[{ "role": "user", "content": "Explain tidal energy in two sentences." }],
)

print(reply.choices[0].message.content)
JavaScript
Copy
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://platform.aim2balance.ai/api/a2b/v1",
  apiKey: process.env.A2B_API_KEY,
});

const reply = await client.chat.completions.create({
  model: "a2b-core2",
  messages: [{ role: "user", content: "Explain tidal energy in two sentences." }],
});

console.log(reply.choices[0].message.content);
Response · 200 OK
Copy
{
  "model": "a2b-core2",
  "choices": [{ "message": { ... } }],
  "usage": {
    "prompt_tokens": 18,
    "completion_tokens": 52
  }
}

The API returns the answer and token usage. Energy, water and restoration are shown in the Usage tab of your API dashboard.

Open in the full reference

How it works

Personal account (individual users)

  1. Get access. Go to Settings > API dashboard > Open API dashboard, then top up your wallet to unlock the API.
  2. Create an API key. Open the Keys tab and click Create key. Copy the key straight away, because it's only shown once.
  3. Try it in the Playground. Ask for a long answer, then show the stats. The token count appears under the response. The Usage tab then shows spend, requests, tokens, and the environmental impact (energy, water and restoration).

Organization (org owners)

  1. Turn on API access. As the owner, open the organization dashboard, go to the API tab, and switch the API on under "API settings".
  2. Tour the API section. The same tab shows API spend, requests, active keys and the API vs chat split. Below that are the models used, member access requests, the members list with each person's keys and spend, and service keys for shared work.

Models

Pick a model or let us pick

  • A2B routers. a2b-core2 and a2b-boost2 choose a model for each step. Boost leans on the strongest models. 128k context.
  • A2B code. a2b-code is tuned for coding agents like Claude Code and Codex. 1M context.
  • Single models. Kimi K3, GLM 5.3, MiniMax M3, DeepSeek V4 Flash, Qwen 3.8 Max, Mistral Medium 3.5, Gemma 4 and more.

You can also call single models such as Kimi K3, GLM 5.3, MiniMax M3, DeepSeek V4 Flash, Qwen 3.8 Max or Mistral Medium 3.5 directly. See the price list for context sizes and rates.

See all models and prices

Open in the full reference

Pricing and costs

Pay per token, in euros. No subscription. Top up a prepaid wallet and pay only for what you use.

Models and prices

Provider list prices per million tokens, before fees.

ModellIDTypKontextEingabe / 1MAusgabe / 1M
A2B-core2a2b-core2Router128k1,00 €3,00 €
A2B-boost2a2b-boost2Router128k3,00 €15,00 €
A2B-codea2b-codeCoding1M0,50 €2,10 €
Kimi K3kimi-k3Modell1M3,00 €15,00 €
GLM 5.3glm-5.3Modell1M1,00 €3,00 €
MiniMax M3minimax-m3Modell1M0,40 €2,00 €
Qwen 3.8 (Max)qwen-3.8-maxModell256k2,30 €5,45 €
Mistral Medium 3.5mistral-medium-3.5Modell262k1,50 €7,50 €
DeepSeek V4 Flashdeepseek-v4-flashModell1M0,40 €0,80 €
GLM 5.3 Flashglm-5.3-flashModell128k0,25 €0,50 €

List prices from the model registry, before fees. Router runs also bill the router's own prompts, so a short message uses more input tokens than you sent. See every model in the reference.

How the price is made up

You pay per token from a prepaid wallet in euros:

  • the model's list price,
  • plus a 10% platform fee,
  • plus 2.5% for ecosystem restoration,
  • plus a 3% exchange margin for USD-priced models only.

A request your balance cannot cover is refused before it runs.

Open in the full reference

Stay in control of spend

  • One wallet for chat and API. Top up once, use it everywhere. We hold the estimated cost while a request runs and charge only the actual cost. VAT may apply depending on where you are billed.
  • Limits you set. Give each key a spending limit, an alert, a max tokens ceiling and a list of allowed models. Organizations can also give each member a daily, weekly or monthly budget.

Billing questions

What happens when my balance runs out?

The request is refused before the model runs, and nothing is charged.

Is there a monthly fee?

No. You pay per token from your prepaid balance.

Where does the 2.5% go?

To ecosystem restoration by Bergwaldprojekt e.V. Your Usage tab shows what you funded.

Can I cap spend per key?

Yes. Set a spending limit and an alert on any key in the API dashboard.

Requests

Request parameters

Chat completions follow the OpenAI format: pick a model, send messages, and set the usual options. The full parameter list is in the reference.

Streaming

Stream responses with the standard streaming option of your SDK. See the reference for details and examples.

Claude and Anthropic clients

The API also works with the Anthropic SDKs and with tools built on them. Change the base URL and key, and keep your code.

Open in the full reference

Responses API

The Responses API is covered in the reference, with request and response examples.

Embeddings

Create embeddings through the same base URL and key. See the reference for the available models.

Idempotency

Retry requests safely. How idempotency works is described in the reference.

Rate and concurrency limits

By default each key can make 120 requests per minute and run 8 requests at once.

LimitStandard, pro Schlüssel
Anfragen120 pro Minute
Gleichzeitige Anfragen8

Open in the full reference

API keys

Give each key a spending limit, an alert, a max tokens ceiling and a list of allowed models. Organizations can set a daily, weekly or monthly budget per member and create service keys that keep working when people leave.

Open in the full reference

Organizations

Built for organizations

One shared wallet. Admins decide who gets access, set a budget per member and create service keys that keep working when people leave.

The organization wallet shows the balance, a personal daily limit and recent transactions.

Client setup

Use it where you already work. Every tool here has a setup guide in the docs.

Setup guides for Claude Code, Codex, Cursor, Cline, aider, Continue, opencode, Open WebUI, LibreChat, LangChain, LlamaIndex and the Vercel AI SDK.

Note: routers do not accept your own tools. For coding tools, use a2b-code or a single model.

Open in the full reference

Errors

Errors use standard HTTP status codes with a JSON body. The reference lists every error and what to do about it.

Full reference

Models, parameters, limits, pricing, keys, streaming and errors, plus machine-readable files (openapi.json, llms.txt, Markdown for agents):

https://platform.aim2balance.ai/api-docs

Start building in minutes

Get an API key