questions/API key

How do I get a Aura-2-EN API key?

You don't need a Deepgram API key to call Aura-2-EN — AIgateway provides one unified sk-aig-... key that routes to every provider. Sign in at aigateway.sh, copy the key from the dashboard, and use it with any OpenAI-compatible SDK. Direct Deepgram keys still work via BYOK for customers who prefer their own provider contract.

How it works

Use AIgateway's unified key instead

Instead of creating a Deepgram account, copying a separate API key, and managing a billing relationship for each provider, use one sk-aig-... key on AIgateway. It routes to Deepgram (and every other provider) on your behalf, with usage aggregated on a single invoice.

Where to get the key

Sign in at aigateway.sh/signin, open the dashboard, click "New key". Keys are sk-aig-... format, scoped by default to the account, and can be rotated or revoked instantly. Production teams typically mint per-environment keys (dev, staging, prod) or per-user sub-account keys via the /v1/accounts API.

If you need a direct ${m.provider} key (BYOK)

AIgateway supports bring-your-own-keys on Enterprise. You paste your Deepgram key into the dashboard; AIgateway proxies requests using your contract's pricing but still handles routing, evals, replays, and audit logging. Useful when you have committed spend with a provider you want to burn down.

Code example

Python
# pip install aigateway-py openai
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aigateway.sh/v1",
    api_key="sk-aig-...",
)

audio = client.audio.speech.create(
    model="deepgram/aura-2-en",
    voice="alloy",
    input="Hello from AIgateway.",
)
audio.stream_to_file("out.mp3")
Node / TypeScript
import OpenAI from "openai";
import fs from "node:fs";

const client = new OpenAI({
  baseURL: "https://api.aigateway.sh/v1",
  apiKey: process.env.AIGATEWAY_KEY,
});

const audio = await client.audio.speech.create({
  model: "deepgram/aura-2-en",
  voice: "alloy",
  input: "Hello from AIgateway.",
});
const buf = Buffer.from(await audio.arrayBuffer());
fs.writeFileSync("out.mp3", buf);

Related

FAQ

Is the AIgateway key compatible with OpenAI's Python SDK?

Yes. Instantiate OpenAI(base_url="https://api.aigateway.sh/v1", api_key="sk-aig-..."). Zero client-side code changes beyond base_url.

Can I have multiple Aura-2-EN API keys?

Yes. Mint one per environment (dev/staging/prod) or one per end-user via the sub-account API. Each key is independently rotatable and revocable; usage is aggregated or split per your preference.

How do I rotate the key if it leaks?

Revoke the compromised key in the dashboard (it stops authenticating instantly) and issue a new one. Because keys are opaque strings, there's no re-signing or cert rotation overhead.

Does the AIgateway key work for Deepgram's other models too?

Yes — the same key routes to every model Deepgram publishes, plus 100+ models across other labs. Pricing is per-model (published in /v1/models); the key is universal.

TRY IT NOW

One key, every model. Free tier, no card.

Get an AIgateway keyOpen the playground