Skip to main content

Before you start

You need three things. A coding agent cannot get them for you.

You needWhere it comes from
A Personaas account in your organisationYour Personaas administrator
At least one persona assigned to youYour Personaas administrator
A personal API keyYou create it yourself, below

1. Know your base URL​

The base URL is the address you open Personaas on in the browser, without any path. These docs call it PERSONAAS_BASE_URL.

https://alpha.personaas.ai

If your organisation uses Personaas on its own web address, use that address instead. Create your key on the same address you will call.

2. Create a personal API key​

  1. Sign in to Personaas in the browser.
  2. Open Settings and, under API keys, choose Personal API keys.
  3. Choose Create API key, give it a name that says where it will be used, and pick when it expires.
  4. Copy the key straight away, whole, including the @org_… part. It is shown only this once. If it is lost, revoke it and create a new one.

The key looks like p-AbC123dEf456gHi789@org_acme. It acts as you: your personas, your conversations.

3. Keep the key out of your code​

Put the key in an environment variable or a secret store. Never write it into source code and never commit it to a repository.

export PERSONAAS_BASE_URL="https://alpha.personaas.ai" # your base URL
export PERSONAAS_API_KEY="p-…@org_…" # your key

4. Find your organisation's engine​

Your organisation runs personas on engine v1 or v3, and a few paths depend on it. Ask once:

curl "$PERSONAAS_BASE_URL/api/v1/auth/me" -H "x-personaas-key: $PERSONAAS_API_KEY"

Read active_organization.config.persona_executor from the response. If it is "v3", your engine is v3; otherwise it is v1. Then:

export PERSONAAS_ENGINE="v1" # your engine: v1 or v3

The examples in these docs use it. Details in Engines.

Next: Your first call.