Overview
The TTAPI gateway is the unified entry point for all API requests, responsible for request routing, identity verification, traffic control, and other core capabilities. All API calls must pass through the gateway and complete authentication. Requests that fail authentication will directly return a 401 error.
1. General API Domain
- Primary Domain:
https://api.ttapi.io
Note: Deployed on Cloudflare with potential synchronization timeout risks;
- Acceleration Domain:
https://api.ttapi.org
Note: Recommended for long-running API calls to reduce latency.
2. MJ Hosting API Exclusive Domain
- Primary Domain:
https://hold.ttapi.io
Note: Deployed on Cloudflare with potential synchronization timeout risks;
- Acceleration Domain:
https://hold.ttapi.org
Note: Can effectively reduce access latency and improve request stability.
I. Authentication Methods
All interfaces are authenticated by carrying the TT-API-KEY field in the request header. This field can be obtained from the Developer Console.
Authentication Rules
- Field Location: HTTP Request Header
- Field Name:
TT-API-KEY (case-sensitive)
- Field Value Format:
{TT-API-KEY} (complete key generated from the console)
II. Gateway Request Specifications
| Item | Requirement |
|---|
| Request Protocol | HTTPS (mandatory, HTTP is prohibited) |
| Request Method | Use as defined by the API (POST/GET/PUT/DELETE) |
| Character Encoding | UTF-8 |
| Content Type | JSON (application/json) |
III. Authentication Error Codes
| Error Code | Solution |
|---|
| 401 | Check if the request header carries the TT-API-KEY field and verify if TT-API-KEY is correct |
All authentication errors return a unified format:
{
"status": "FAILED",
"message": "Wrong TT-API-KEY or email is not activated."
}
Last modified on March 12, 2026