Short URL API Integration Instructions
This article will introduce a Short URL API integration guide that can convert long URLs into short URLs.
¶ Application Process
To use the Short URL API, first go to the 辰汐ai Console to obtain your API Token for future use.

If you are not logged in or registered, you will be automatically redirected to the login page inviting you to register and log in, and after completion, you will be automatically returned to the current page.
One API Token can call all services on the platform without needing to apply separately for each service. The first application will grant a free quota for a trial experience; when the quota is insufficient, you can recharge the general balance in the console.
📘 Complete documentation: Short URL API →
¶ Basic Usage
First, understand the basic usage method, which is to input the long URL that needs to be converted to obtain the processed result. You simply need to pass a content field. We can then fill in the corresponding content on the interface, as shown in the figure:

Here we can see that we have set the Request Headers, including:
accept: the format of the response result you want to receive, filled in asapplication/json, which is JSON format.authorization: the key to call the API, which can be directly selected after application.
Additionally, we set the Request Body, including:
content: the content of the URL to be shortened.
After selection, you can find that the corresponding code is also generated on the right side, as shown in the figure:

Click the "Try" button to test, as shown in the above figure, we obtained the following result:
{
"success": true,
"data": {
"url": "https://surl.id/1uHCs01xa5"
}
}
The returned result contains multiple fields, described as follows:
success, the status of whether the task was successful.data, which contains the converted URL.
It can be seen that the original long URL https://chens.platform.acedata.cloud/documents/shorturl has been successfully converted to the short URL https://surl.id/1uHCs01xa5.
Additionally, if you want to generate the corresponding integration code, you can directly copy it, for example, the CURL code is as follows:
curl -X POST 'https://api.acedata.cloud/shorturl' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"content": "https://chens.platform.acedata.cloud/documents/shorturl"
}'
The Python integration code is as follows:
import requests
url = "https://api.acedata.cloud/shorturl"
headers = {
"accept": "application/json",
"authorization": "Bearer {token}",
"content-type": "application/json"
}
payload = {
"content": "https://chens.platform.acedata.cloud/documents/shorturl"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
¶ Error Handling
When calling the API, if an error occurs, the API will return the corresponding error code and message. For example:
400 token_mismatched: Bad request, possibly due to missing or invalid parameters.400 api_not_implemented: Bad request, possibly due to missing or invalid parameters.401 invalid_token: Unauthorized, invalid or missing authorization token.429 too_many_requests: Too many requests, you have exceeded the rate limit.500 api_error: Internal server error, something went wrong on the server.
¶ Error Response Example
{
"success": false,
"error": {
"code": "api_error",
"message": "fetch failed"
},
"trace_id": "2cf86e86-22a4-46e1-ac2f-032c0f2a4e89"
}
¶ Conclusion
Through this document, you have learned how to use the Short URL API to convert long URLs into short URLs. We hope this document can help you better integrate and use the API. If you have any questions, please feel free to contact our technical support team.