cURL
curl --request GET \
--url https://api.mage.space/v1/characters \
--header 'Authorization: Bearer <token>'import Mage from '@mage-space/sdk';
const mage = new Mage(); // reads MAGE_API_KEY
const page = await mage.characters.list({ limit: 50 });
for (const character of page.data) {
console.log(`@${character.handle}`, character.name);
}
// Pass page.next_cursor as cursor for the next page.from mage_space import Mage
mage = Mage() # reads MAGE_API_KEY
page = mage.characters.list(limit=50)
for character in page["data"]:
print(f"@{character['handle']}", character["name"])
# Pass page["next_cursor"] as cursor for the next page.const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mage.space/v1/characters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "3f9c2a1e-7b44-4d2e-9a0f-6c1d8e2b5a71",
"handle": "ana",
"name": "Ana",
"description": "A red-haired courier in a green jacket.",
"image_url": "https://cdn3.mage.space/characters/user/image/9b1e.jpg",
"voice_url": "https://cdn3.mage.space/references/user/audio/7d2c.mp3",
"visibility": "private",
"created_at": "2026-09-18T10:00:00.000Z"
}
],
"next_cursor": null
}{
"error": {
"code": "invalid_request",
"message": "`limit` must be a whole number from 1 to 200."
}
}{
"error": {
"code": "unauthorized",
"message": "The API key is invalid or has been revoked."
}
}{
"error": {
"code": "payment_required",
"message": "The Mage API and MCP server need a successful payment on this account first: buy any Gem pack or start a plan at https://www.mage.space/gems, then retry. Signup bonus Gems work in the Mage app only."
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side. Retry, and contact support if it persists."
}
}Endpoints
List characters
GET /v1/characters returns the account’s saved characters, newest first, with the handle each one is mentioned by.
GET
/
v1
/
characters
cURL
curl --request GET \
--url https://api.mage.space/v1/characters \
--header 'Authorization: Bearer <token>'import Mage from '@mage-space/sdk';
const mage = new Mage(); // reads MAGE_API_KEY
const page = await mage.characters.list({ limit: 50 });
for (const character of page.data) {
console.log(`@${character.handle}`, character.name);
}
// Pass page.next_cursor as cursor for the next page.from mage_space import Mage
mage = Mage() # reads MAGE_API_KEY
page = mage.characters.list(limit=50)
for character in page["data"]:
print(f"@{character['handle']}", character["name"])
# Pass page["next_cursor"] as cursor for the next page.const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mage.space/v1/characters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "3f9c2a1e-7b44-4d2e-9a0f-6c1d8e2b5a71",
"handle": "ana",
"name": "Ana",
"description": "A red-haired courier in a green jacket.",
"image_url": "https://cdn3.mage.space/characters/user/image/9b1e.jpg",
"voice_url": "https://cdn3.mage.space/references/user/audio/7d2c.mp3",
"visibility": "private",
"created_at": "2026-09-18T10:00:00.000Z"
}
],
"next_cursor": null
}{
"error": {
"code": "invalid_request",
"message": "`limit` must be a whole number from 1 to 200."
}
}{
"error": {
"code": "unauthorized",
"message": "The API key is invalid or has been revoked."
}
}{
"error": {
"code": "payment_required",
"message": "The Mage API and MCP server need a successful payment on this account first: buy any Gem pack or start a plan at https://www.mage.space/gems, then retry. Signup bonus Gems work in the Mage app only."
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side. Retry, and contact support if it persists."
}
}Your own characters, newest first, with
limit and cursor for paging: send the next_cursor of one page as cursor to get the next, until it is null. Each entry’s handle is what a prompt mentions as @handle; id is what DELETE /v1/characters/{character_id} takes.
Other users’ public characters are not listed. They can still be mentioned by handle in a prompt. See Characters and references.Authorizations
Create a key in API → API Keys: select Create API key, name it in the popup, then select Create key. Copy the one-time key and send it as Authorization: Bearer mage_sk_…. Keys are for server-side code only.
Query Parameters
Entities per page, 1 to 200; 50 when omitted.
Required range:
1 <= x <= 200The next_cursor of the previous page.
Last modified on September 23, 2026

