Quick Start

Gitruck Cloud exposes three core API capabilities: file upload, asynchronous task processing, and task result lookup. This guide gives you the shortest possible path, then breaks it into 3 practical steps.

Debugging Resources

Open these two API docs before you start integrating.

They make it much faster to confirm request parameters, response payloads, supported endpoints, and debugging flow during development.

Prerequisites

  • A registered Gitruck Cloud account
  • A valid API key
  • Basic familiarity with HTTP requests

Three-Step Flow

  1. Get your API key
  2. Upload a file and get a file_id
  3. Create a task and poll for the result

End-to-End Example

1. Upload a file

curl -X POST https://api.ai-mcn.tv:10000/base/file/upload \
  -H "Authorization: YOUR_API_KEY" \
  -F "file=@/path/to/your/image.jpg"
{
  "code": 200,
  "msg": "File uploaded successfully~",
  "data": {
    "file_id": "537489015178246",
    "original_name": "image.jpg",
    "size": 204800,
    "base_ext": ".jpg",
    "download_url": "/download/a1/537489015178246.jpg",
    "created_at": "2026-04-05T08:00:00Z",
    "expire_at": "2026-06-04T00:00:00Z",
    "is_expired": false
  }
}

2. Create a task

This example uses /task/image_purify:

curl -X POST https://api.ai-mcn.tv:10000/task/image_purify \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": "537489015178246"
  }'
{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "537489015178247",
    "task_type": "image_purify",
    "status": "queued",
    "input_params": {
      "file_id": "537489015178246"
    },
    "created_at": "2026-04-05T08:00:01Z",
    "estimated_duration": 8.5,
    "estimated_queue_wait_duration": 1.2,
    "estimated_total_duration": 9.7,
    "remaining_total_duration": 9.7
  }
}

3. Poll the task result

curl -X GET https://api.ai-mcn.tv:10000/task/image_purify/537489015178247 \
  -H "Authorization: YOUR_API_KEY"
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": "537489015178247",
    "status": "completed",
    "progress": 100,
    "input_params": {
      "file_id": "537489015178246"
    },
    "output_result": {
      "file_id": "537489015178248"
    },
    "task_type_key": "image_purify",
    "task_type_name": "Image Watermark Removal",
    "create_time": "2026-04-05T08:00:01Z",
    "update_time": "2026-04-05T08:00:12Z"
  }
}

💡 Tip: Poll every 2 to 5 seconds. Once status becomes completed, keep using the returned output file_id to fetch file metadata or download URLs.

Next Steps