← Knowledge base

Call the API from your code

ElephantPool speaks the OpenAI API. Change the base URL, keep your SDK, pick a model id, and pay with a monthly plan and a spend cap per key.

The gateway implements the OpenAI chat completions API. If your code already talks to OpenAI, you change one line.

Two minutes

curl https://app.elephantpool.ai/api/gateway/v1/chat/completions \
  -H "Authorization: Bearer $ELEPHANTPOOL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen3.8-27b","messages":[{"role":"user","content":"Hello"}]}'

With the official Python SDK:

from openai import OpenAI

client = OpenAI(
    base_url="https://app.elephantpool.ai/api/gateway/v1",
    api_key=os.environ["ELEPHANTPOOL_API_KEY"],
)
client.chat.completions.create(model="qwen3.8-27b", messages=[...])

Which model id?

GET /v1/models returns the catalogue with prices, context and capabilities under an x-elephant key; the same list is on the models page. Streaming works as you'd expect ("stream": true, server-sent events). Tool calls (function calling) work too, on the models marked tool-use: send tools and, if you like, tool_choice; the answer carries tool_calls, streamed or not, as with OpenAI.

What it costs

You take a monthly plan: one price a month, VAT included, for a fixed allowance of tokens. Each request draws on it at the list price of the model it used — per million tokens, in euros, input and output priced separately. For your first request, choose a plan on the plan page: the first month of a subscription is half price. Every key carries a monthly spend cap (€20 by default) so a runaway loop cannot use up your whole month, and usage is broken down per key in the dashboard. The plans, and how the allowance is counted, are in what you pay, and why.

What's different from a hyperscaler

  • Open weights only — you can run the same model yourself, so you are never locked in.
  • Prompts are not retained and not trained on. See security and privacy.
  • The compute is community GPUs across Europe, which is why the price is what it is.

Related

For GPU Owners

Put your GPU to work.

  1. Install mahout
  2. Link your machine
  3. Let it work
Start earning

For Builders

Cut your AI bill.

  1. Create an API key
  2. Change one line
  3. Call the API
Get an API key

One account for both sides.