Loading...
Loading...
X2C Distribution and Wallet API — publish video to X2C platform, manage assets (balance, claim X2C, swap to USDC, withdraw, transactions).
npx skill4agent add storyclaw-official/talenthub storyclaw-x2c-publish-m 60credentials/{USER_ID}.json{
"x2cApiKey": "x2c_sk_xxx"
}USER_IDX2C_API_KEYskills."x2c-publish".env.X2C_API_KEY~/.openclaw/openclaw.json1. distribution/categories → Get categories
2. distribution/upload-url → Get S3 presigned upload URLs
3. Upload files to S3 via HTTP PUT
4. distribution/publish → Submit with public_url from Step 3
5. distribution/query → Check review status
6. distribution/add-episodes → Add more episodes
7. distribution/list → List all projectsX2C_API_BASE_URLContent-Type: application/jsonX-API-Key: <your_x2c_api_key>curl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{"action": "distribution/categories", "lang": "zh-CN"}'curl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{
"action": "distribution/upload-url",
"files": [
{"file_type": "cover", "file_name": "cover.jpg", "content_type": "image/jpeg"},
{"file_type": "video", "file_name": "ep1.mp4", "content_type": "video/mp4"}
]
}'upload_urlupload_headerspublic_urlupload_urlupload_headerscurl -X PUT "<upload_url>" \
-H "Content-Type: image/jpeg" \
<additional headers from upload_headers> \
--data-binary @cover.jpgcurl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{
"action": "distribution/publish",
"title": "My Drama",
"description": "A story about...",
"category_id": "uuid",
"cover_url": "https://...",
"video_urls": ["https://..."],
"enable_prediction": false
}'| Param | Required | Description |
|---|---|---|
| title | Yes | Project name (max 100 chars) |
| description | Yes | Synopsis (max 2000 chars) |
| category_id | Yes | Category UUID |
| cover_url | Yes | Cover image URL |
| video_urls | Yes | Array of video URLs (1-10) |
| enable_prediction | No | Enable prediction market |
curl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{"action": "distribution/query", "project_id": "uuid"}'draftpending_reviewapprovedrejectedcurl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{
"action": "distribution/add-episodes",
"project_id": "uuid",
"video_urls": ["https://..."]
}'curl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{"action": "distribution/list", "page": 1, "page_size": 20, "status": "approved"}'curl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{"action": "wallet/balance"}'curl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{"action": "wallet/claim-x2c", "amount": 50.0}'curl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{"action": "wallet/swap-x2c", "amount": 100.0}'curl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{"action": "wallet/withdraw-usdc", "amount": 10.0, "to_address": "SolanaAddress..."}'curl -m 60 -X POST "$X2C_API_BASE_URL" \
-H "Content-Type: application/json" \
-H "X-API-Key: $X2C_API_KEY" \
-d '{"action": "wallet/transactions", "page": 1, "page_size": 20, "type": "all"}'earningspurchasesall