Skip to content
Aivah

Create an API key and make your first request

Generate an Aivah API key, make your first Platform API request and build on the Starter Kit.

Who it's for
Developers and technical teams building Aivah employees, characters and conversations into their own products
You'll be able to
Have a working API key, a successful first request and a clear path to the Starter Kit.

This guide is for developers. The Aivah Platform API lets your own app create employees and add knowledge, start live character sessions, clone voices, generate decks, podcasts and mind maps, and read and write your account's memory. One API key gets you started.

Before you start

  • Sign in with the account that should own the key. Its requests use that account's credits.
  • A safe place for the key, such as your server's environment variables.

Steps

1. Open API keys

Open the account menu at the bottom of the sidebar and choose API keys. Your account has one active key at a time.

2. Generate your key

Choose Generate API key and pick an Expiry: 30 days, 60 days, 90 days (the default) or Doesn't expire. Copy the key from Save your API key as soon as it appears. It starts with sk_aivah_ and is shown only once.

3. Make your first request

Send the key in the AIVAH_API_KEY header. This request lists your employees:

curl https://api.aivah.ai/v1/platform/agents \
  -H "AIVAH_API_KEY: sk_aivah_your_key_here"

The same request in JavaScript, with the key read from an environment variable on your server:

const response = await fetch("https://api.aivah.ai/v1/platform/agents", {
  headers: { AIVAH_API_KEY: process.env.AIVAH_API_KEY },
});
const { results } = await response.json();

4. Explore what you can build

The Platform API covers:

Area

What you can do

Employees

List, create, update and delete employees, including presenters; add or remove knowledge; retry training

Characters and scenes

Manage characters and backgrounds, and list scenes

Voices and models

List voices, clone a voice, and list AI models

Sessions

Create live session tokens and assistant sessions, and read conversations

Content

Generate slide decks, podcasts and mind maps, and list what you've generated

Memory

List, add, update and delete the long-term memory your employees share, and list memory sessions

5. Start from the Starter Kit

The Aivah Starter Kit is a Next.js app wired to the Platform API. It has live character conversations, interactive presentations, and screens for characters, voices, employees and generated content. Its embeddable voice assistant adds a button to your own site that can see and use the page, while your key stays on your server. Clone it, add your key and run it with pnpm or Docker. See Aivah for developers.

6. Rotate or turn off a key

Each key shows when it was Created on, Last used and Expires on. Choose Regenerate to swap in a new key. Your old key keeps working for six hours so you can update your apps, unless you tick Delete the existing key now. You can also turn a key off, or delete it.

Good to know

Keep your key on your server. Never put it in website code, a mobile app or a public repository, where others could read it.

Troubleshooting

  • 401 Unauthorized: check the header name is exactly AIVAH_API_KEY. Check the key is complete, active and not expired.
  • You lost the key: choose Regenerate to create a new one, then update your apps within six hours.
  • The key works locally but not in production: check the environment variable is set on your production server.

Next steps

Read Aivah for developers, or see how credits work. To give an AI client, such as a desktop assistant, the same memory your employees use, open Aivah MCP in the account menu.