Documentation/Integration guide/Realistic and anime character creation
Integration guide

Realistic and anime character creation

Create and manage persistent character identities across realistic and anime models with structured prompt rules.

6 min read
•Updated October 21, 2026

Character Creation Route

POST /v1/characters accepts name, model_alias, prompt and optional appearance. Use photoreal-v1 for realistic characters or anime-v1 for illustrated characters. Both follow the same public API.

Prompt Structuring & Syntax Sections

Put permanent physical appearance in subject, clothing/pose in action, and location/lighting in environment. Structured appearance attributes are included in the stored identity. Plain prompts remain accepted.

SectionScope & Identity InvariantExample Prompt Value
**subject**Permanent Identity InvariantPhysical facial features, ethnicity, gender, age, eye color, and fixed hair style. Encoded into the master identity embeddings and locked across all future scene generations.A 28-year-old woman with green eyes and curly auburn hair
**action**Dynamic Pose & AttireClothing, posture, gesture, facing direction, and facial expression. Dynamically changed per scene generation while preserving the underlying facial identity.Wearing a tailored green blazer, facing camera with a warm natural smile
**environment**Scene Location & LightingSetting, scenery, time of day, atmosphere, and light source. Can be re-rendered freely to place the character in different environments.Cozy Parisian cafe street terrace in soft golden hour autumn sunlight

Asynchronous Synthesis Lifecycle

The response is 202 with id, status and createdAt. Wait for character.ready or poll GET /v1/characters/{id} until status is ready. On failed, inspect errorCode/errorMessage. A queued character cannot yet generate scenes.

Signed Identity Preview URLs

GET /v1/characters/{id} returns previewUrl when available. Preview URLs expire; fetch the character again for a new signed URL.

Code Implementation

import os
import time
import requests

BASE = "https://api.apimarketplace.com"
headers = {"Authorization": "Bearer " + os.environ["API_KEY"]}

def call(method, path, **kwargs):
    response = requests.request(method, BASE + path, headers=headers, timeout=300, **kwargs)
    response.raise_for_status()
    return response.json() if response.content else None

def wait(path, success):
    deadline = time.monotonic() + 900
    while time.monotonic() < deadline:
        result = call("GET", path)
        if result["status"] == success:
            return result
        if result["status"] == "failed":
            raise RuntimeError(result.get("errorMessage") or "Generation failed")
        time.sleep(3)
    raise TimeoutError("Still pending; keep the returned ID and check later")

payload = {'name': 'Example character',
 'model_alias': 'photoreal-v1',
 'subject': 'A 30-year-old adult with brown eyes and short brown hair',
 'action': 'Wearing a blue shirt, facing the camera',
 'environment': 'A plain studio'}
result = call('POST', '/v1/characters', json=payload)
print("Resource ID:", result["id"])
completed = wait('/v1/characters/' + result["id"], 'ready')
print(completed)