API Reference

Base URL: https://vidchuy.my.id

Authentication Required

All endpoints require an x-api-key header. Generate your key from the Dashboard.

Standard Link
https://vidchuy.my.id/e/{shortCode}
MP4 Link
https://vidchuy.my.id/f/{mp4Code}.mp4

Creates a new shortened URL. Returns both a standard short link and an MP4-format link. Requires a valid API key passed as a header.

Request Headers

x-api-keyrequired

Your personal API key from the Dashboard.

Content-Typerequired

Must be application/json.

Body Parameters

originalUrlstringrequired

The full URL to shorten. Must include http:// or https://.

customShortCodestringoptional

Optional custom code for /e/ link. Must be unique.

customMp4Codestringoptional

Optional custom code for /f/ link. Must be unique.

Responses

201Created
{
  "shortCode": "abc123",
  "mp4Code": "xyz0987654",
  "originalUrl": "https://example.com/long-url"
}
400Bad Request
{
  "error": "Custom short code is already taken"
}
401Unauthorized
{
  "error": "Invalid API Key"
}

Code Examples

curl -X POST https://vidchuy.my.id/api/shorten \
  -H "Content-Type: application/json" \
  -H "x-api-key: vk_your_api_key_here" \
  -d '{
    "originalUrl": "https://github.com/yourusername",
    "customShortCode": "github"
  }'