POST
/
api
/
v1
/
api-keys
Create an API key
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({name: '<string>'})
};

fetch('https://realtimeavatar.ai/api/v1/api-keys', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "<string>",
  "keyId": "<string>",
  "tenantId": "<string>",
  "name": "<string>",
  "redactedKey": "<string>",
  "scopes": [],
  "createdAt": "<string>",
  "apiKey": "<string>",
  "spendLimitCreditMicros": 123,
  "expiresAt": "<string>"
}

Authorizations

Authorization
string
header
required

TIC API key as a bearer token: Authorization: Bearer tic_live_... or tic_test_.... Create keys in the dashboard at /platform/dashboard or via POST /api/v1/api-keys.

Body

application/json
name
string
required
Required string length: 1 - 120
environment
enum<string>
default:test
Available options:
live,
test
scopes
enum<string>[]
Required array length: 1 - 16 elements
Available options:
*,
api_keys:write,
credits:read,
avatars:read,
avatars:write,
realtime:write,
usage:read,
usage:write
spendLimitCreditMicros
integer | null

Optional hard spend cap for this key, in credit micros.

Required range: x >= 0
expiresAt
string<date-time> | null

Response

API key created — store apiKey now; it is not retrievable later.

id
string
required
keyId
string
required
tenantId
string
required
name
string
required
environment
enum<string>
required
Available options:
live,
test
redactedKey
string
required
scopes
enum<string>[]
required
Available options:
*,
api_keys:write,
credits:read,
avatars:read,
avatars:write,
realtime:write,
usage:read,
usage:write
status
enum<string>
required
Available options:
active,
revoked,
expired
createdAt
string
required
apiKey
string
required

Full secret key (tic_live_... / tic_test_...). Shown once; store it now.

spendLimitCreditMicros
integer | null
expiresAt
string | null