Skip to main content

Authentication

All public APIs use Bearer Token by default:
Authorization: Bearer YOUR_API_KEY
Base URL:
https://api.aiid.edu.kg
Although some native-format or model-specific APIs have different paths, they still use the same API Key authentication method.

Error Structure

When troubleshooting failed requests, prioritize:
  • HTTP status codes
  • error.code
  • error.message
Typical structure:
{
  "error": {
    "code": "invalid_request_error",
    "message": "the reason why error occurred"
  }
}

Common Status Codes

HTTPMeaningRecommendation
400Bad RequestCheck required fields, model name, and path parameters
401Authentication failedCheck whether the API Key is valid
404Not FoundCheck the query path and Task ID
429Rate Limit ExceededReduce request frequency or retry
500Internal Server ErrorRecord the request and retry, or contact support

Common Status Enums

Common role enums:
  • system
  • user
  • assistant
Common long-running task statuses:
  • queued
  • running
  • succeeded
  • failed
  • in_progress
  • completed
Status fields returned by different video APIs may vary slightly, but the semantics revolve around “Queuing / Running / Completed / Failed”.

Asynchronous Task Query

Current public documentation focuses on “Polling task results”. Common methods include:
  • GET /v1/videos/{task_id}
  • GET /v1/responses/{response_id}
  • GET /api/v3/contents/generations/tasks/{task_id}
  • GET /suno/fetch/{task_id}
  • GET /ent/v2/tasks/{task_id}/creations
  • GET /v1beta/{operation_name}
Integration suggestions:
  • Implement retries and backoff for task queries
  • Persist task_id or operation_name
  • Use result polling as a fallback mechanism for asynchronous task status checks.