original_urlstringจำเป็น
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
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน 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.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
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"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
original_urlstringจำเป็นOriginal URL, can be any link.
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"message": "Server Internal Error",
"prompt": "操作失败,请重试",
"status_code": 10000,
"time": 1787218849438
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Pipixia Short URL ConversionAPI นี้ Pipixia | $0.001 ต่อการเรียก | JSON |
Pipixia | $0.001 ต่อการเรียก | JSON |
Pipixia | $0.001 ต่อการเรียก | JSON |
Pipixia | $0.001 ต่อการเรียก | JSON |
Pipixia | $0.001 ต่อการเรียก | JSON |
Pipixia | $0.001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/pipixia/app/short-url โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: original_url (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Pipixia Short URL Conversion ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Pipixia API แยกต่างหาก