API Reference

Gitruck Cloud public APIs share a consistent HTTP + JSON design across user info, file management, task management, and media processing. This page summarizes the conventions that apply to the whole API surface.

Base Information

ItemValue
Base URLhttps://api.ai-mcn.tv:10000
ProtocolHTTPS
Data FormatJSON, except file upload which uses multipart/form-data
AuthenticationRaw API key passed in the Authorization header

Authentication Rule

Every business API expects:

Authorization: YOUR_API_KEY

⚠️ Warning: The current backend does not parse a Bearer prefix. If you send Authorization: Bearer YOUR_API_KEY, authentication will fail.

Request Conventions

  • File upload: POST /base/file/upload with multipart/form-data
  • Most other APIs: application/json
  • Media processing APIs follow an async task flow: create task, then query task
  • Time fields are returned as ISO 8601 style strings

Unified Response Shape

{
  "code": 200,
  "msg": "success",
  "data": {}
}
FieldTypeDescription
codenumberBusiness code. Success is usually 200
msgstringStatus message or error detail
dataobject / string / nullResponse payload. Some successful APIs return an empty string

Task Statuses

StatusDescription
createdTask created but not yet queued
queuedTask is in queue
processingTask is running
completedTask finished successfully
failedTask failed
cancelledTask was cancelled

File Lifecycle

  • Uploaded files are retained for 60 days
  • Re-uploading the same file can hit deduplication and reuse an existing record
  • Expired files can be renewed or uploaded again

Common Error Codes

Error CodeHTTP StatusDescriptionResolution
400400Invalid request parameters or bodyCheck JSON shape and parameter types
401401Unauthenticated requestCheck the Authorization header
413413Payload too largeReduce file size or request size
415415Unsupported Content-TypeUse application/json or multipart/form-data
6001400Unsupported file typeUse a supported media extension
6002413File exceeds size limitUpload a file within 20 GB
6004404File not foundVerify the file_id
6006404Task not foundVerify the task_id
6007400Task cannot be cancelled in current stateOnly created / queued tasks can be cancelled
6013400Missing required parameterAdd the missing field
6014400File type does not match the taskUse a compatible file type
6015400Unsupported language codeUse a supported language code
6016400Invalid task parameter type or valueCheck enums and parameter types
6019400Invalid or unsupported media durationTrim the media and retry
6022400Video resolution exceeds limitLower the input resolution or output multiplier
6201402Insufficient quotaPurchase quota or recharge
6202402Insufficient balanceRecharge in the Dashboard
6502401Authentication failedPass the raw API key in the Authorization header
500500Internal server errorRetry later or contact support

API Categories