Quickstart

Five minutes from zero to your first generation. echotokens speaks the OpenAI API — point your existing SDK at our base URL and the rest of your code keeps working.

1. Create an API key

Open the keys page, click Create key, copy the sk-echo-... token. Store it in your environment (.env, secret manager, whatever you use for other API keys). The token is shown once at create time and cannot be retrieved later.

treat keys like passwords

Anyone holding your key can spend your wallet. If a key leaks, revoke it from the keys page and rotate every dependent service before the next deploy.

2. Install the OpenAI SDK

You don't need a new client — the official OpenAI SDK works as-is. If you don't have it yet:

pip install openai

3. Generate your first image

The only difference from a vanilla OpenAI setup is the base_url. We use nano-banana-2 here — a popular Google image model and a safe default.

from openai import OpenAI

client = OpenAI(
  base_url="https://api.echotokens.me/v1",
  api_key="sk-echo-...",
)

response = client.images.generate(
  model="nano-banana-2",
  prompt="a serene mountain lake at dawn",
  n=1,
)

print(response.data[0].url)
# Every response includes cost_usd_cents — exact cents we billed.
print(f"Cost: {response.cost_usd_cents} cents")

The response's data[0].url points at a signed URL on our host (https://api.echotokens.me/v1/assets/<token>). It's valid for 24 hours. Download the bytes within that window or re-fetch after re-running the generation.

4. Read the cost field

Every successful response includes a cost_usd_cents field — an integer count of US cents we debited your wallet for that request. There's no token math, no model multiplier. The number equals exactly what the upstream charged us, in cents.

res = client.images.generate(model="nano-banana-2", prompt="...")
print(res.cost_usd_cents)
# 4 → about four cents for a single nano-banana-2 image.

What to read next

The catalog of currently-supported models lives on the pricing page. Each surface has its own focused guide:

  • Images — text-to-image, optional source image, and image edits via multipart upload.
  • Video — text-to-video and image-to-video. Async — you submit, then poll for the result.
  • Text-to-speech — Aura voices, ElevenLabs voices, streaming binary audio.
  • Transcription — Deepgram Nova-3 / Nova-2 for speech-to-text.
try it in the studio
Open the image studio

Type a prompt, pick a model, and skip the SDK setup — useful for iterating on prompts before you wire up code.