Generate text with Sora 2 Pro Characters via the Muapi REST API. Pay per generation — no subscription needed.
POST https://api.muapi.ai/api/v1/openai-sora-2-pro-charactersSubmit a job with your MuApi API key in the x-api-key header, then poll https://api.muapi.ai/api/v1/predictions/{request_id}/result until status is completed.
| Name | Type | Required | Description |
|---|---|---|---|
| origin_task_id | string | Yes | The task ID of the original Sora video. |
| character_user_name | string | No | A globally-unique handle for your character. Reference it in later prompts by prefixing it with @ (e.g., @sky_ranger). |
| prompt | string | Yes | In one short line, state stable traits (e.g., “cheerful barista, green apron, warm smile”); avoid camera directions, contradictions, or disallowed celebrity likeness. |
| safety_instruction | string | No | Briefly list any boundaries (“no violence, politics, or alcohol; PG-13 max”); tighter wording helps the model enforce your content limits. |
| start_time | float | Yes | Enter the clip's start and end times in seconds. The segment you select must be completely inside the original video and between 1 s–4 s long; that slice will be used as the character's training material. |
| end_time | float | Yes | Enter the clip's start and end times in seconds. The segment you select must be completely inside the original video and between 1 s–4 s long; that slice will be used as the character's training material. |
REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/openai-sora-2-pro-characters \
-H "x-api-key: $MUAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"origin_task_id":"<origin_task_id>","prompt":"<prompt>","start_time":"<start_time>","end_time":"<end_time>"}' | jq -r .request_id)
curl -s https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result -H "x-api-key: $MUAPI_API_KEY"import os, time, requests
API = "https://api.muapi.ai/api/v1"
headers = {"x-api-key": os.environ["MUAPI_API_KEY"]}
r = requests.post(f"{API}/openai-sora-2-pro-characters", headers=headers, json={"origin_task_id":"<origin_task_id>","prompt":"<prompt>","start_time":"<start_time>","end_time":"<end_time>"})
request_id = r.json()["request_id"]
while True:
res = requests.get(f"{API}/predictions/{request_id}/result", headers=headers).json()
if res["status"] == "completed":
print(res["outputs"]); break
if res["status"] == "failed":
raise RuntimeError(res.get("error"))
time.sleep(3)Full docs and agent/MCP integration: llms.txt. Get an API key at muapi.ai/access-keys.