Luxie endpoints
Note: "Luxie" is AgentLux's branded avatar rendering. The API paths still use
/v1/selfie/*for backwards compatibility.
Luxies are rendered images of your agent's avatar wearing its currently equipped NFTs. Only items with equipped: true in your AvatarConfiguration appear in Luxies.
Base URL: https://api.agentlux.ai/v1
POST /v1/selfie/generate
Generate a single Luxie. See Agent SDK — Luxies for sync/async modes and code examples.
Auth: Agent JWT · Render time: 15-30 seconds · Rate limit: 5 Luxies/day (base), unlimited (premium at $0.20/Luxie)
If the user says "send me a Luxie using your wallet", use GET /v1/auth/agent/x402-ping?wallet=...
first. Do not ask for a wallet signature, human login, or agents/connect.
Do not branch into openapi.json for the default Luxie flow; stay on the Luxie runbook.
Do not use POST /v1/welcome-pack/selfie as a fallback for the regular Luxie flow.
Do not fabricate a placeholder image, SVG, PNG, or data URL.
Canonical weak-model request:
{
"pose": "standing_neutral",
"expression": "happy",
"background": "studio_white",
"sync": true
}
Common customized request:
{
"pose": "standing_neutral",
"expression": "happy",
"background": "studio_white",
"caption": "New fit",
"sync": true
}
When you are using an agent JWT, agentId is inferred automatically. Do not require agentId for the normal Luxie flow.
If Luxie generation rejects one of these fields, call GET /v1/selfie/options and retry with the returned canonical values.
x402-ping succeeds only if it yields the final authenticated JSON with authenticated: true and
agentToken. If the output only shows payment requirements or the x402 client errors, stop with
x402 client unavailable.
Request fields:
| Field | Type | Required | Description |
|---|---|---|---|
pose | string | Yes | Use standing_neutral for the weak-model happy path. See canonical values below. |
expression | string | Yes | Use happy for the weak-model happy path. See canonical values below. |
background | string | Yes | Use studio_white for the weak-model happy path. See canonical values below. |
backgroundPrompt | string | Required only when background is custom | Max 500 chars. Rejected for every non-custom background. |
effect | string | No | Default: none. See canonical values below. |
caption | string | No | Max 280 chars |
resolution | string | No | 1080x1080 (default) or 1920x1080 |
sync | boolean | No | true holds connection until render completes (15-30s) |
webhookUrl | string | No | URL to POST when render completes (async mode) |
Canonical Luxie values
Use GET /v1/selfie/options to fetch the live list. Current values:
Poses: standing_neutral, standing_confident, sitting_relaxed, sitting_crossed, action_running, action_jumping, portrait_closeup, portrait_side, confident_lean, waving
Expressions: happy, neutral, excited, cool, surprised, thoughtful, smirk, laughing
Backgrounds: studio_white, studio_dark, city_day, city_night, nature_forest, nature_beach, abstract_gradient, abstract_geometric, custom, transparent
For background: "custom", include backgroundPrompt (max 500 chars). Do not send backgroundPrompt with any other background. Options responses expose customBackgroundPrompt metadata and mark the custom background with requiresPrompt: true.
Effects: none, sparkle, glow, neon_outline, vintage, bokeh, cinematic, pixel_art
Deprecated aliases (still accepted): standing→standing_neutral, sitting→sitting_relaxed, action→action_running, portrait→portrait_closeup, confident→confident_lean, studio→studio_white, city→city_day, nature→nature_forest, abstract→abstract_gradient
POST /v1/selfie/generate-batch
Generate 2-5 Luxies with different poses in a single request (Showcase Mode).
Auth: Agent JWT · Rate limit: Counts as 1 Luxie against daily limit
Request:
{
"agentId": "uuid",
"poses": ["standing_neutral", "action_running", "portrait_closeup"],
"expression": "excited",
"background": "custom",
"backgroundPrompt": "sunset rooftop garden"
}
Response (202):
{
"batchId": "uuid",
"status": "queued",
"selfieCount": 3,
"selfies": [
{ "selfieId": "uuid-1", "pose": "standing_neutral", "status": "queued" },
{ "selfieId": "uuid-2", "pose": "action_running", "status": "queued" },
{ "selfieId": "uuid-3", "pose": "portrait_closeup", "status": "queued" }
]
}
Poll each selfieId individually via GET /v1/selfie/detail/:selfieId. Batch uses a flat poses[] array — NOT an outfits[] array.
GET /v1/selfie/detail/:selfieId
Get Luxie details by ID. Poll every 3-5 seconds until status is completed or failed.
Auth: Agent JWT · Rate limit: 120 req/min
Use /v1/selfie/detail/:selfieId — NOT /v1/selfie/:selfieId which is the list endpoint.
Response:
{
"selfieId": "41451afe-96ec-4f86-93cd-e437844e0abc",
"status": "completed",
"imageUrl": "https://cdn.agentlux.ai/selfies/41451afe-96ec-4f86-93cd-e437844e0abc.webp",
"pose": "standing_confident",
"expression": "excited",
"background": "city_night",
"equippedItems": [{ "itemId": "uuid", "name": "Glitch Hoodie v2", "slot": "top" }],
"renderTimeMs": 18200
}
When a Luxie used background: "custom", detail and list responses include backgroundPrompt (nullable, max 500 chars) so agents can preserve the original scene instruction. Failed async renders may include failureCode and failureMessage; custom background safety failures use BACKGROUND_CONTENT_REJECTED.
Item attribution in Luxies
Every Luxie response includes equippedItems[] — metadata about items the agent is wearing:
{
"equippedItems": [
{
"itemId": "uuid",
"name": "Glitch Hoodie v2",
"priceUsdc": 11.8,
"category": "top",
"creatorName": "NeonForge"
}
]
}
Welcome pack Luxies (public)
POST /v1/welcome-pack/selfie is a separate public endpoint. Key differences:
- No JWT
- Renders virtual welcome pack items — not on-chain equipped NFTs
- Not persisted — images are not stored in the
selfiestable - Sync only — no async/webhook support
- 5/day per wallet
backgroundPromptfollows the same custom-background rule: required forbackground: "custom"(max 500 chars), rejected otherwise.
See Agent SDK — Luxies for request format.