Registros y Tareas (API Avanzada)
Use your Account Permission Key to query call logs, token/cost summaries, and async task records across all personal tokens or filtered by a specific kid.
[!IMPORTANT]
- Base URL:
https://ai.artsmcp.com/api/open/v1- Auth Header (Choose One):
Authorization: Bearer <your_account_key>,X-Account-Api-Key: <your_account_key>, orX-Api-Key: <your_account_key>- Pagination & Rate Limits: Online pagination supports up to the first
20,000records;/logsis rate-limited to30 req/minand/task_logsto60 req/min; timestamps use the site operating timezone
1. List Account-Wide Call Logs
Paginated query of model calls across all personal tokens or a specified kid. Summary stats (total_cost, success_count, total_tokens, etc.) are computed on page=1 only (defaulting to the past 30 calendar days when start_date is omitted) and return 0 on page > 1.
- Path:
GET /api/open/v1/logs - Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (starting from 1) |
per_page | integer | 20 | Items per page (1..100) |
kid | string | All | Filter by token kid (alias: token_kid) |
model | string | All | Fuzzy filter by model ID (e.g., gpt-4o) |
status | string | All | Filter by status: success, fail, processing |
status_code | integer | All | Filter by exact HTTP status code (e.g., 200, 429) |
action_type | string | All | Filter by modality: chat, image, video, audio, embedding, rerank, vision, other |
log_id | string | None | Exact lookup by log_id |
task_id | string | None | Exact lookup by async task_id |
start_date | string | None | Start time (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss) |
end_date | string | None | End time (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss) |
has_video | integer | All | Filter by video input (1 yes, 0 no) |
- Example (Curl):
curl -s "https://ai.artsmcp.com/api/open/v1/logs?page=1&per_page=20&kid=086421" \
-H "Authorization: Bearer <your_account_key>"
- Response Example:
{
"data": [
{
"log_id": "log_01jdxyz1234567890abcdef",
"token_kid": "086421",
"token_name": "production-app",
"model": "gpt-4o",
"endpoint": "/v1/chat/completions",
"action_type": "chat",
"prompt_tokens": 320,
"completion_tokens": 512,
"cached_tokens": 0,
"cost": 0.0098,
"pre_deduct_gift": 0.0,
"latency_ms": 920,
"status_code": 200,
"is_stream": 1,
"is_completed": 1,
"has_video": 0,
"created_at": "2026-11-29 21:30:15 (UTC+8)"
}
],
"total": 1,
"page": 1,
"per_page": 20,
"total_cost": 0.0098,
"total_system_cost": 0.0098,
"total_gift_cost": 0.0,
"success_count": 1,
"fail_count": 0,
"total_tokens": 832,
"total_prompt_tokens": 320,
"total_completion_tokens": 512
}
- Response Fields:
| Field | Type | Description |
|---|---|---|
data | array | Call log records on the current page |
data[].log_id | string | Unique log identifier |
data[].token_kid / data[].token_name | string | Token kid and name |
data[].model / data[].endpoint | string | Model ID and request path |
data[].action_type | string | Request category (e.g., chat, image, video, audio) |
data[].prompt_tokens / data[].completion_tokens / data[].cached_tokens | integer | Input, output, and cached token counts |
data[].cost / data[].pre_deduct_gift | number | Settled total cost and gift balance portion |
data[].latency_ms | integer | Request latency in milliseconds |
data[].status_code | integer | HTTP status code (0 while processing) |
data[].is_stream / data[].is_completed / data[].has_video | integer | Streaming flag, completion flag, and video-input flag (1 yes, 0 no) |
data[].created_at | string | Creation timestamp in site operating timezone |
total / page / per_page | integer | Total matching records, current page, and page size |
total_cost / total_system_cost / total_gift_cost | number | Total, cash, and gift cost summaries (page=1 only) |
success_count / fail_count | integer | Succeeded and failed request counts (page=1 only) |
total_tokens / total_prompt_tokens / total_completion_tokens | integer | Total, input, and output token summaries (page=1 only) |
2. List Account-Wide Async Tasks
Paginated query of video/image async generation tasks and preview URLs across all personal tokens or a specified kid.
- Path:
GET /api/open/v1/task_logs - Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (starting from 1) |
per_page | integer | 20 | Items per page (1..100) |
kid | string | All | Filter by token kid (alias: token_kid) |
model | string | All | Fuzzy filter by model ID |
status | string | All | Filter by status: success, fail, processing |
action_type | string | All | Filter by task type (e.g., image, video, audio) |
log_id | string | None | Exact lookup by log_id |
task_id | string | None | Exact lookup by async task_id |
start_date | string | None | Start time (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss) |
end_date | string | None | End time (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss) |
- Example (Curl):
curl -s "https://ai.artsmcp.com/api/open/v1/task_logs?page=1&per_page=20" \
-H "Authorization: Bearer <your_account_key>"
- Response Example:
{
"data": [
{
"log_id": "log_01jdvideo9876543210abcd",
"task_id": "cgt-20261129210000-xxxxx",
"token_kid": "086421",
"token_name": "production-app",
"model": "doubao-seedance-1-0-pro-250528",
"endpoint": "/v1/video/generations",
"action_type": "video",
"prompt_tokens": 0,
"completion_tokens": 108000,
"cached_tokens": 0,
"cost": 1.5,
"latency_ms": 42000,
"status_code": 200,
"is_completed": 1,
"has_video": 0,
"preview_urls": [
"https://example-cdn.com/videos/output.mp4"
],
"created_at": "2026-11-29 21:10:00 (UTC+8)"
}
],
"total": 1,
"page": 1,
"per_page": 20
}
- Response Fields:
| Field | Type | Description |
|---|---|---|
data | array | Async task records on the current page |
data[].log_id / data[].task_id | string | Log ID and async task ID |
data[].token_kid / data[].token_name | string | Token kid and name |
data[].model / data[].endpoint | string | Model ID and submission path |
data[].action_type | string | Task type (e.g., video, image) |
data[].prompt_tokens / data[].completion_tokens / data[].cached_tokens | integer | Input, output, and cached token counts |
data[].cost / data[].latency_ms | number / integer | Settled task cost and latency (ms) |
data[].status_code / data[].is_completed | integer | Terminal HTTP status code and completion flag (1 done, 0 processing) |
data[].preview_urls | string[] | Output preview URLs once completed |
data[].created_at | string | Task submission timestamp in site operating timezone |
total / page / per_page | integer | Total records, current page, and page size |