Dokumentasi API — spotify-ip.gervhosting.my.id
Generate gambar iPhone Spotify Now Playing card dari foto album cover.
| KEY | VALUE |
|---|---|
| Content-Type | multipart/form-data |
Body (Form-Data)
| PARAMETER | TIPE | DESKRIPSI |
|---|---|---|
| image | file | Foto album cover (jpg/png/webp). Maks 10 MB. |
| judul | string | Judul lagu (maks 20 karakter tampil). |
| artis | string | Nama artis / band (maks 28 karakter tampil). |
# Generate dan simpan sebagai file
curl -X POST https://spotify-ip.gervhosting.my.id/api/musiccard \
-F "image=@album.jpg" \
-F "judul=Ginseng Strip 2002" \
-F "artis=Yung Lean" \
--output musiccard.png
const form = new FormData();
form.append('image', albumFile);
form.append('judul', 'Ginseng Strip 2002');
form.append('artis', 'Yung Lean');
const res = await fetch(
'https://spotify-ip.gervhosting.my.id/api/musiccard',
{ method: 'POST', body: form }
);
const blob = await res.blob();
img.src = URL.createObjectURL(blob);
import requests
with open("album.jpg", "rb") as f:
res = requests.post(
"https://spotify-ip.gervhosting.my.id/api/musiccard",
files={"image": ("album.jpg", f, "image/jpeg")},
data={"judul": "Ginseng Strip 2002", "artis": "Yung Lean"}
)
with open("musiccard.png", "wb") as out:
out.write(res.content)
const axios = require('axios');
const FormData = require('form-data');
const form = new FormData();
form.append('image', albumBuffer, {
filename: 'album.jpg', contentType: 'image/jpeg'
});
form.append('judul', judul);
form.append('artis', artis);
const res = await axios.post(
'https://spotify-ip.gervhosting.my.id/api/musiccard',
form,
{ headers: form.getHeaders(), responseType: 'arraybuffer' }
);
await sock.sendMessage(m.chat, {
image: Buffer.from(res.data),
caption: `🎵 ${judul} — ${artis}`
}, { quoted: m });
✖ Errors
{ "error": "No image uploaded. Field name: image" }{ "error": "Missing fields: judul and artis are required" }{ "error": "Forbidden: your IP is not whitelisted", "ip": "..." }{ "error": "Failed to generate music card", "detail": "..." }{
"status": "ok",
"name": "iPhone Spotify Music Card API",
"version": "1.0.0",
"whitelist": "enabled (6 entries)"
}
Endpoint API dibatasi hanya untuk IP tertentu. File whitelist.txt
Hanya bisa untuk panel dsri gerviz store