3. Authentication and Request Conventions#
Authentication#
All endpoints use Bearer Token authentication. Put the API Key in the request header:
Text
Authorization: Bearer sk-你的YiTuoToken-Key
A missing or malformed header returns 401 Unauthorized. The gateway only recognizes the Authorization: Bearer header and does not read other custom auth headers such as x-api-key.
Request conventions#
| Item | Value |
|---|---|
| Protocol | HTTPS |
| Request method | See each endpoint's description (GET / POST) |
| Content-Type | application/json (multipart/form-data for file-upload endpoints) |
| Character encoding | UTF-8 |
| Base URL | http://183.240.79.21:52099/v1 |
Except for file-upload endpoints (image editing, speech transcription), request bodies are uniformly JSON.