AWMC Gateway Public API (Billing Info)
For users: How to call the open APIs, and when Tokens will be charged. This document does not discuss internal implementation.
Authentication
Business requests must include in the request header:
Authorization: Bearer <token>
- JWT obtained after browser login, or a
gw_long-term token generated on the website (do not leak).
Purchase Tokens
Buy quota: https://store.awmc.cc/item?id=98
1. Service URL and Paths
All business paths are appended after the gateway base URL, prefixed with /v1.
- GET: Parameters go in URL Query, must be URL encoded.
- POST: Use Query or JSON Body as required by each endpoint; when sending JSON, add
Content-Type: application/json.
2. Token Billing Rules
- The "Consumption" column below indicates: the number of Tokens deducted from the account when the request succeeds at HTTP level and business logic determines success; 0 means no charge.
- Whether business succeeds is determined by the response JSON, common examples:
| Endpoint | Billing Condition (Summary) |
|---|---|
get_preview | UserID is valid and not -1 / "-1" |
upload_b50 / upload_lx_b50 | UploadStatus === true |
get_charge | ChargeStatus === true |
mai_ping | Success response (e.g., returnCode === 1), not failure like result: "down" |
- When balance is insufficient, 403 is returned. You need to top up your account first.
3. Open API Testing
Fill in a valid token in the Auth Settings below, then enter parameters to test endpoints online.
3.1 Connectivity Test (mai_ping)
3.2 User Info & Task Submission (Billed)
The following endpoints consume Tokens when business succeeds.
3.3 Task Status Query (No Charge)
After submitting upload tasks, use the following endpoints to poll progress.
3.4 Ticket Acquisition (Billed)
Acquire function tickets (multiplier tickets). This endpoint uses Query parameters, and consumes 10 Tokens on business success.
3.5 Manual Operation Endpoints (Billed / JSON Body)
The following endpoints are all POST with JSON request body. The gateway will perform approximately 60 seconds of security wait (queue/risk control) on the business side. Please be patient after clicking "Run" in the browser.
Fill in a valid token in Auth Settings, enter parameters as shown in the table, then run (level_range should be a JSON array literal, e.g., [0,1,2,3]).
3.6 Delete Single Score (Billed / JSON Body)
Delete the score record of a specified song. This endpoint uses JSON Body parameters.
4. Public JSON Directory
GET https://api.awmc.cc/api/docsReturns paths, methods, consumption, and brief descriptions for each endpoint, convenient for script consumption.
5. Common Errors
| HTTP | Description |
|---|---|
| 401 | Token missing or invalid |
| 403 | Insufficient balance, etc. |
| 404 | Path or resource not found |
| 5xx | Service error, retry later |
Recommendation
First call /v1/mai_ping (no charge) to confirm the URL and token, then call billed endpoints. For upload tasks, always save the task_id and use query endpoints to track progress.