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

Media File Limits

Audio and video tasks check the input file before the task is created. If a requirement below is not met, the request returns the matching error code; no task is created and nothing is charged:

ItemRequirementError code if not met
File integrityThe file can be parsed and decoded6017 / 6021
DurationGreater than 0 and no longer than 2 hours6019
Video resolutionWidth and height are both 4000 px or less. Common 3840×2160 video is accepted; 4096×2160 exceeds the limit6022
Video frame rate120 fps or less6023

Some APIs have stricter limits. For example, video super resolution supports videos up to 1 minute, and the raft algorithm in watermark removal supports videos up to 20 minutes. See each API's documentation for details.

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
6017400Media file cannot be parsed: the file is corrupted, malformed, or has conflicting metadataRe-export the file with an editing or transcoding tool and upload it again
6019400Media duration is 0 or longer than 2 hoursTrim the media and retry
6021400Media integrity check failed: some positions cannot be decoded, or the end of the file is incompleteUse another source file, or re-export a complete file and upload it again
6022400Video resolution exceeds the limit: width or height is greater than 4000 px (video super resolution checks the upscaled resolution)Scale the video so that width and height are both 4000 px or less, or lower the output multiplier
6023400Video frame rate exceeds 120 fpsConvert the video to 120 fps or less (such as 60 fps) and upload it again
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