original_urlstringbắt buộc
Original URL, can be any link.
https://api.sandbase.ai/v1/api/pipixia/app/short-urlReturns a shortened link for a specified web address. Takes an original web link as input and converts it into a Pipixia-compatible short URL format.
[
{
"data": {
"message": "Server Internal Error",
"prompt": "操作失败,请重试",
"status_code": 10000,
"time": 1787218849438
}
}
]Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
Returns a Pipixia short URL for a web address you send. It needs one input, original_url, which can be any link.
https://h5.pipix.com/item/7385813877985909043 before sharing it in a message or caption.https://h5.pipix.com/s/ short format.curl -X POST "https://api.sandbase.ai/v1/api/pipixia/app/short-url" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"original_url": "https://h5.pipix.com/item/7385813877985909043"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
original_url | string | Yes | Original URL, can be any link. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"short_url": "https://h5.pipix.com/s/rFYPVXgqO3o/"
},
"message": "success",
"prompt": "",
"status_code": 0,
"time": 1793691714055
}
| Field | Meaning |
|---|---|
data.short_url | The shortened link for the original_url you sent. It uses the https://h5.pipix.com/s/<code>/ format. |
status_code | Result code of the call. 0 means the call succeeded. |
message | Short status text. It reads success when the call works. |
prompt | Extra prompt text. It is an empty string in the sample response. |
time | Numeric timestamp in the response. The sample value 1793691714055 has 13 digits. |
original_url as a full address that starts with https://. A Pipixia post link has the form https://h5.pipix.com/item/<post id>.data.short_url. Check that status_code is 0 before you use it./item/ path.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/pipixia/app/short-url" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"original_url": "example"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
original_urlstringbắt buộcOriginal URL, can be any link.
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
[
{
"data": {
"message": "Server Internal Error",
"prompt": "操作失败,请重试",
"status_code": 10000,
"time": 1787218849438
}
}
]Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Pipixia Short URL ConversionAPI này Pipixia | $0.001 mỗi lần gọi | JSON |
Pipixia | $0.001 mỗi lần gọi | JSON |
Pipixia | $0.001 mỗi lần gọi | JSON |
Pipixia | $0.001 mỗi lần gọi | JSON |
Pipixia | $0.001 mỗi lần gọi | JSON |
Pipixia | $0.001 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/pipixia/app/short-url với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.001 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: original_url (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. Pipixia Short URL Conversion chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Pipixia.