واجهة سجلات المفتاح الحالي

Use your API Call Token (sk-xxx) to query call logs, cost/token summaries, and async task records generated by the current token.

[!IMPORTANT]

  • Base URL: https://ai.artsmcp.com
  • Auth Header: Authorization: Bearer sk-your_api_token (also supports x-api-key, x-goog-api-key)
  • Pagination & Rate Limits: Online pagination supports up to the first 20,000 records; /v1/logs is rate-limited to 30 req/min and /v1/task_logs to 60 req/min; timestamps use the site operating timezone

1. List Current Token Call Logs

Paginated query of model requests made by the current sk-xxx token. 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 /v1/logs
  • Query Parameters:
ParameterTypeDefaultDescription
pageinteger1Page number (starting from 1)
per_pageinteger20Items per page (1..100)
modelstringAllFuzzy filter by model ID (e.g., gpt-4o)
statusstringAllFilter by status: success, fail, processing
status_codeintegerAllFilter by exact HTTP status code (e.g., 200, 429)
action_typestringAllFilter by type: chat, image, video, audio, embedding, rerank, vision, other
log_idstringNoneExact lookup by log_id
task_idstringNoneExact lookup by async task_id
start_datestringNoneStart time (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss in site operating timezone)
end_datestringNoneEnd time (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss in site operating timezone)
has_videointegerAllFilter by video input (1 yes, 0 no)
  • Example (Curl):
curl -s "https://ai.artsmcp.com/v1/logs?page=1&per_page=20&status=success" \
  -H "Authorization: Bearer sk-your_api_token"
  • Response Example:
{
  "data": [
    {
      "log_id": "log_01jdxyz1234567890abcdef",
      "token_kid": "086421",
      "token_name": "prod-sub-key",
      "model": "gpt-4o",
      "endpoint": "/v1/chat/completions",
      "action_type": "chat",
      "prompt_tokens": 128,
      "completion_tokens": 256,
      "cached_tokens": 0,
      "cost": 0.0042,
      "pre_deduct_gift": 0.0,
      "latency_ms": 860,
      "status_code": 200,
      "is_stream": 1,
      "is_completed": 1,
      "has_video": 0,
      "created_at": "2026-11-29 21:25:10 (UTC+8)"
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 20,
  "total_cost": 0.0042,
  "total_system_cost": 0.0042,
  "total_gift_cost": 0.0,
  "success_count": 1,
  "fail_count": 0,
  "total_tokens": 384,
  "total_prompt_tokens": 128,
  "total_completion_tokens": 256
}
  • Response Fields:
FieldTypeDescription
dataarrayCall log records on the current page
data[].log_idstringUnique log identifier
data[].token_kid / data[].token_namestringToken kid and name
data[].model / data[].endpointstringModel ID and request path
data[].action_typestringRequest category (e.g., chat, image, video, audio)
data[].prompt_tokens / data[].completion_tokens / data[].cached_tokensintegerInput, output, and cached token counts
data[].cost / data[].pre_deduct_giftnumberSettled total cost and gift balance portion
data[].latency_msintegerRequest latency in milliseconds
data[].status_codeintegerHTTP status code (0 while processing)
data[].is_stream / data[].is_completed / data[].has_videointegerStreaming flag, completion flag, and video-input flag (1 yes, 0 no)
data[].created_atstringCreation timestamp in site operating timezone
total / page / per_pageintegerTotal matching records, current page, and page size
total_cost / total_system_cost / total_gift_costnumberTotal, cash, and gift cost summaries (page=1 only)
success_count / fail_countintegerSucceeded and failed request counts (page=1 only)
total_tokens / total_prompt_tokens / total_completion_tokensintegerTotal, input, and output token summaries (page=1 only)

2. List Current Token Async Tasks

Paginated query of video/image async generation tasks and preview URLs initiated by the current sk-xxx token. For real-time polling or cancellation of a single task, use the corresponding protocol endpoint (such as GET /v1/video/generations/{task_id} or DELETE /v1/video/generations/{task_id}).

  • Path: GET /v1/task_logs
  • Query Parameters:
ParameterTypeDefaultDescription
pageinteger1Page number (starting from 1)
per_pageinteger20Items per page (1..100)
modelstringAllFuzzy filter by model ID
statusstringAllFilter by status: success, fail, processing
action_typestringAllFilter by task type (e.g., image, video, audio)
log_idstringNoneExact lookup by log_id
task_idstringNoneExact lookup by async task_id
start_datestringNoneStart time (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss)
end_datestringNoneEnd time (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss)
  • Example (Curl):
curl -s "https://ai.artsmcp.com/v1/task_logs?page=1&per_page=20" \
  -H "Authorization: Bearer sk-your_api_token"
  • Response Example:
{
  "data": [
    {
      "log_id": "log_01jdvideo9876543210abcd",
      "task_id": "cgt-20261129210000-xxxxx",
      "token_kid": "086421",
      "token_name": "prod-sub-key",
      "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:
FieldTypeDescription
dataarrayAsync task records on the current page
data[].log_id / data[].task_idstringLog ID and async task ID
data[].token_kid / data[].token_namestringToken kid and name
data[].model / data[].endpointstringModel ID and submission path
data[].action_typestringTask type (e.g., video, image)
data[].prompt_tokens / data[].completion_tokens / data[].cached_tokensintegerInput, output, and cached token counts
data[].cost / data[].latency_msnumber / integerSettled task cost and latency (ms)
data[].status_code / data[].is_completedintegerTerminal HTTP status code and completion flag (1 done, 0 processing)
data[].preview_urlsstring[]Output preview URLs once completed
data[].created_atstringTask submission timestamp in site operating timezone
total / page / per_pageintegerTotal records, current page, and page size

Raw Markdown (.md) · llms.txt