Moonborn — API · portraits
Get the active portrait for a persona (signed URL)
Returns the active portrait image (URL signed for 1 hour) if one exists; otherwise `{ status: "absent" }`. Active portrait defaults to the canonical when no explicit selection has been made.
GET/v1/personas/{id}/portraitscope · Bearer (API key or session JWT)
Path parameters
| Field | Type | Description |
|---|---|---|
| idreq | string | Persona id (uuid). |
Responses
200OK
404Persona not found
Body
| Field | Type | Description |
|---|---|---|
| errorreq | string | |
| message | string | |
| used | number | |
| limit | number | |
| pii | string[] | |
| term | string | |
| scores | object | |
| provider | string |
Examples
cURL
curl -X GET https://api.moonborn.co/v1/personas/<id>/portrait \ -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.portraits.getActivePortrait({
id: '<id>',
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.portraits.get_active_portrait(
id="<id>",
)