paste a link, get the file.
preview: the api is not live yet and may change.
auth
send your api key as Authorization: Bearer <key>. make keys on the
account page.
download
send a link as json to POST /v1/download.
curl https://api.gronka.dev/v1/download \
-H 'Authorization: Bearer <key>' \
-H 'Content-Type: application/json' \
-d '{"url":"https://x.com/user/status/123"}'
responses
direct
the source link points to the file.
{
"lane": "direct",
"files": [
{
"url": "https://video.twimg.com/...",
"filename": null,
"type": "video"
}
]
}
worker
with merge: true, the files are separate video and audio streams.
{
"lane": "worker",
"merge": true,
"filename": "clip.mp4",
"files": [
{
"url": "https://dl.gronka.dev/f/...",
"filename": "clip.video.mp4",
"kind": "video",
"size": 30123456
},
{
"url": "https://dl.gronka.dev/f/...",
"filename": "clip.audio.m4a",
"kind": "audio",
"size": 1234567
}
]
}
error
a download error has an error.code and error.message.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "video duration exceeds the maximum allowed (60 minutes)."
}
}
padded json
while a download runs, the response starts with spaces, then json. parse the full response as usual. errors after a download starts use the json body; errors before it starts use an http status.
errors
the common codes. message is always safe to show a person.
BAD_REQUESTthe request body or options are invalid.BAD_URLthe url is missing or invalid.BUSYall download workers are busy.DOWNLOAD_FAILEDthe download did not finish.FORBIDDENthe request origin is not allowed.INTERNALsomething broke on the server.KEY_LIMITthe account already has 10 keys.-
NETWORK_ERRORthe source refused or could not be reached. NOT_FOUNDthe account or key was not found.-
RATE_LIMITEDtoo many downloads or one is already running. -
UNAUTHORIZEDthe account or api key is missing or invalid. VALIDATION_ERRORthe media or request hit a limit.VERIFICATION_FAILEDthe turnstile check failed.
limits
10 downloads per 10 minutes, one at a time, per ip or api key. videos up to 1 gb; images up to 50 mb.
privacy
no request logs. files are gone after an hour.
reference
-
GET
/v1/healthcheck service status -
POST
/v1/downloadget files from a link -
POST
/v1/accountcreate an account -
GET
/v1/accountget account and keys -
DELETE
/v1/accountdelete the account -
POST
/v1/account/rotatereplace account number -
POST
/v1/sessionstart a session -
DELETE
/v1/sessionend a session -
POST
/v1/keyscreate an api key -
DELETE
/v1/keys/{id}revoke an api key