Authentication

Gitruck Cloud uses API key authentication. The current backend reads the raw value of the Authorization header and treats that value as the API key.

Standard Format

Authorization: YOUR_API_KEY

⚠️ Warning: There is no Bearer prefix here. If you send Authorization: Bearer YOUR_API_KEY, the full string will be treated as the key and authentication will fail.

Get Your API Key

  1. Sign in to Gitruck Cloud.
  2. Open the Dashboard.
  3. Find the "API Key" section and click Show.
  4. Copy the key and store it securely.

See Step 1: Get API Key for the detailed flow.

Examples

cURL

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"
  }'

Python

import requests

headers = {
  "Authorization": "YOUR_API_KEY",
  "Content-Type": "application/json",
}

response = requests.post(
  "https://api.ai-mcn.tv:10000/task/image_purify",
  headers=headers,
  json={"file_id": "537489015178246"},
)
print(response.json())

JavaScript / TypeScript

const response = await fetch("https://api.ai-mcn.tv:10000/task/image_purify", {
  method: "POST",
  headers: {
    Authorization: "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ file_id: "537489015178246" }),
});

console.log(await response.json());

Optional Query Fallback

If the server explicitly enables ALLOW_QUERY_AUTHORIZATION, the backend can also read the API key from a query parameter named Authorization:

GET /task/list?Authorization=YOUR_API_KEY

ℹ️ Note: This is only a fallback path. Production integrations should keep using the request header.

Authentication Failure

{
  "code": 6502,
  "msg": "鉴权失败,请检查Authorization参数",
  "data": null
}

Next Steps