Skip to main content

Skill streaming (45 configurations)

POST 

/v1/skills/stream

Call a Skill with a platform API key. Returns streamed SSE events. Documentation is split into the following 45 fixed configurations:

  • fashion-campaign-director(Aris-AI Fashion Creative Director)
  • street-style-photographer(Wesley-AI Street Photographer)
  • icon-designer(Soren-AI Fashion Designer)
  • beauty-photography-master(Astor-AI Beauty Photographer)
  • beverage-photography(Kairos-AI Drinks & Beverage Photographer)
  • ecom_shoe_image_shotlist(Modus-AI Footwear Photographer)
  • app-beauty-storyboard-artist(Aura7-AI Beauty Creative Director)
  • beverage-ecom-detail-page(Ayn-AI Beverage Detail Page Expert)
  • home-appliance-detail-page(Adian-AI Appliance Detail Page Expert)
  • product-animation-video(Kara-AI Product Animation Video Director)
  • xhs-kol-product-photos(Willa-AI Xiaohongshu Product Seeding Expert)
  • appliance-photography(Elias-AI Small Appliance Photographer)
  • fashion-shoot(Viora-AI Women's Fashion Photographer)
  • kidswear-photography-master(Tania-AI Kidswear Photographer)
  • product-motion(Nina-AI Image Animation Expert)
  • app-ppt-structure-preserving-polisher(Mia-AI PPT Structure-Preserving Polisher)
  • ai-comic-drama-screenwriter(Belle-AI Comic Drama Screenwriter)
  • social-media-creator-ops(Yvonne-AI Social Media Strategist)
  • ai-comic-drama-video(Mann-AI Comic Drama Video Producer)
  • ai-comic-drama-role-image(Sylvia-AI Comic Drama Character Designer)
  • xiaohongshu-content-expert(Blade-AI Footwear & Apparel Xiaohongshu Content Expert)
  • brand-content-strategy(Roy-AI Content Strategy)
  • generic-ai-koc(Awon-AI Virtual KOC Customization Expert)
  • mixed-editing-sop-portable-flat-with-voice(Carter-AI Batch Remixing Expert)
  • app-video-remix-prep(Pat-AI Batch Video Repurposing Expert)
  • app-data-analysis-orchestrator(Yuyu-AI E-commerce Data Analyst)
  • app-live-stream-analysis-master(Tutu-AI Live Stream Data Analyst)
  • app-fancy-ops-review-delivery(Kitty-Taobao Content Data Analyst)
  • app-ppt-framework-master-genready-colleague(Fenton-AI PPT Framework Architect)
  • app-mall-leasing-proposal-master(Sion-AI Investment Proposal Planner)
  • snacks-product-video(Candy-AI Snack Video Generation Expert)
  • skincare-kol-product-video(Mancy-AI Skincare KOL Video Generation Expert)
  • fizzy-drink-product-video(Chase-AI Sparkling Drink Product Video Expert)
  • women-clothing-detail-page(Shana-AI Women's Clothing Detail Page Expert)
  • fizzy-drink-kol-video(Bubble-AI Sparkling Water KOL Video Expert)
  • kidswear-detail-page(Togen-AI Kidswear Detail Page Expert)
  • app-fashion-product-video(Easeen-AI Fashion Video Generation Expert)
  • app-footwear-product-video(Wanford-AI Shoes Video Generation Expert)
  • app-alcohol-product-video(Orin-AI Liquor Video Generation Expert)
  • app-product-manager(Product Manager)
  • app-backend-engineer(Backend Engineer)
  • app-frontend-engineer(Frontend Engineer)
  • app-qa-test-engineer(QA Test Engineer)
  • app-devops-sre-engineer(DevOps SRE Engineer)
  • app-software-architect(Software Architect)

Request

Responses

Streamed SSE response.

SSE Streaming Event Reference (Generic)

Each business message is pushed through SSE as data: {json}\n\n. Parse messages by top-level type.

typeMeaningFrontend handling suggestion
systemStream initialization event (usually subtype=init)Extract session_id (platform-issued) and pass it as session_id on later requests
assistantAssistant output chunks (text/image/thinking, etc.)Render as the main assistant stream
userTool execution outputMark as "tool output", do not treat as manually typed user input
file_upload_requestAsk the user to upload images or filesShow an upload UI; after upload, send the file URLs as attachments on the next /v1/skills/stream request with the same session_id
ask_user_questionAsk the user a question or to pick optionsShow questions/options; send the answer as prompt on the next /v1/skills/stream request with the same session_id
token_statsPer-turn token usage delta (input/output/cache tokens)Use for usage UI; do not render as assistant content. Billed immediately
turn_media_statsNewly billed generated images/videos for this requestUse for usage UI; do not render as assistant content. Billed immediately. Sum events yourself
resultSuccess end signal for the current turnStop concatenating the stream and mark completion
errorFailure end signal for the current turnStop concatenating, show the error, and allow retry
doneOptional end hintCan close loading; business completion still follows result / error
heartbeatKeep-alive JSON data event (about every 15s)Ignore for rendering
low_balanceRemaining quota is below the Skill threshold (may be sent after the turn)Warn the user to top up; do not treat as a stream failure

Client billing flow

What you receive is already the billable increment. Sum the events you see; do not parse assistant text for URLs.

  1. First POST /v1/skills/stream: omit session_id.
  2. On system: save session_id. Send it on every later request.
  3. On token_stats: charge inputTokens / outputTokens / cache fields immediately (this segment’s delta).
  4. On turn_media_stats: charge media_summary.image_count, video_count, and images / videos immediately (newly billed assets only). If nothing new was billed, this event is not sent.
  5. If the stream drops: call GET /v1/skills/usage?session_id=... with the same API key. Reconnect with that session_id; already-billed media will not be sent again.

Use billing_event_id as an idempotency key if you persist charges locally.

Notes

  • Handle {"type":"heartbeat"} as keep-alive. Ignore it for rendering.
  • The stream may end with data: [DONE]. Treat it as a transport close, not a business event.
  • Follow-up user input (answers, uploaded files) continues via the next POST /v1/skills/stream with the same session_id.
  • Ignore unknown type values (log them, do not crash or block the stream). Extra events such as stream_event may appear; log them and skip rendering.
  • token_stats and turn_media_stats are deltas for that turn segment. Sum them yourself for session totals. Usage events include request_id, session_id, sequence (monotonic in this HTTP request), billing_event_id, billing_mode: "delta", and billable.
  • turn_media_stats is sent only when this request has newly billed image/video URLs. media_summary.images / videos and the counts are that billed increment. Already-billed URLs are not sent again on reconnect and are not billed again.
  • Usage events are billed as they arrive. If the stream never sends those two event types, usage is billed once at the end from aggregated totals.
  • First request: omit session_id (or leave it empty). After the first system event, store the issued session_id and send it on every follow-up. After the 200 SSE connection opens, also store X-Oneapi-Request-Id. If the connection drops after billing, query GET /v1/skills/usage with the same API key. Prefer the issued session_id; use request_id if you already have the header; billing_event_id only matches one event you already received.

file_upload_request example:

{
"type": "file_upload_request",
"questionId": "d7078aab-b67a-427d-ac0c-a87bb7e07dcf",
"uploads": [
{
"prompt": "Upload a garment or lookbook image to start (JPG/PNG, multiple files allowed)",
"header": "Garment images",
"accept": "image/*",
"description": "JPG, PNG, and WebP are supported"
}
]
}

ask_user_question example:

{
"type": "ask_user_question",
"toolUseId": "eabec243-a985-458d-a3e0-50f7fa8e128e",
"questionId": "eabec243-a985-458d-a3e0-50f7fa8e128e",
"questions": [
{
"question": "Which designer should work on this brief today?",
"header": "Choose a designer",
"options": [
{
"label": "Coco Chanel",
"value": "Coco Chanel",
"description": "Liberate the body through simplicity"
},
{
"label": "Christian Dior",
"value": "Christian Dior",
"description": "The New Look — architecture of femininity"
}
]
}
]
}

token_stats example:

{
"type": "token_stats",
"turn_id": "turn-1",
"inputTokens": 500,
"outputTokens": 100,
"cacheReadInputTokens": 0,
"cacheCreationInputTokens": 0,
"request_id": "req-123",
"session_id": "sess_abc123",
"sequence": 1,
"billing_event_id": "skill:req-123:sess_abc123:turn-1:token_stats:1",
"billing_mode": "delta",
"billable": true
}

turn_media_stats example:

{
"type": "turn_media_stats",
"turn_id": "turn-1",
"media_summary": {
"image_count": 1,
"video_count": 1,
"images": [
{
"url": "https://assets.example.com/a.png"
}
],
"videos": [
{
"url": "https://assets.example.com/v.mp4",
"duration_seconds": 3.5
}
]
},
"request_id": "req-123",
"session_id": "sess_abc123",
"sequence": 2,
"billing_event_id": "skill:req-123:sess_abc123:turn-1:turn_media_stats:2",
"billing_mode": "delta",
"billable": true
}