EditVideoBot API Docs
This page will provide basic documentation on using
the EditVideoBot API.
The EditVideoBot API is a
RESTful API designed for use over the HTTP(S) protocol.
This API is still in its very early
stages - any bugs or issues found should be submitted to https://pigeonburger.xyz/contact
Things to Note:
•
All POST requests and any responses
should be in JSON form.
•
All requests will return a 200 HTTP
status code if successful, any other status code received indicates request
failure and a message value in the response will describe the issue
encountered.
•
All requests will contain a key called
"error", which is set the either True or False, corresponding with the status
code.
•
If an error is occurred on the
server-side while processing a video on the /edit/ endpoint, it will not affect
your daily API requests amount.
The Base URL for the API is:
https://pigeonburger.xyz/api/v1/stats/v1
Authentication:
In order to
make a valid request to the API, you need to provide an authentication header
with your token, that can be found at the Dashboard. This header should be called EVB_AUTH. If
this header is not provided, or contains and invalid token, you will be unable
to use the API, and will be met with a 401 HTTP status code.
For example:
{"EVB_AUTH": "HHgWaJuiwqSaLwsG-5bVdVE0aGVgU_9yTEqCAVLL694"}
Example Error Response:
{
"error": True,
"code": 401,
"message": "No EVB_AUTH header given."
}
Endpoints:
The following endpoints are currently
available for use on the EditVideoBot API.
/edit/
Where all media-editing requests are
made.
Method: POST
POST Data:
file:
The data of the file you want to edit. [bytes]
commands:
A string containing standard EditVideoBot
commands (e.g. "er=10, tt=test")
[str]
Response:
error:
False [bool]
code: 200
[int]
is_video:
True or False (depending on the output media being
a video (gif included) or a photo. [bool]
media_url:
URL to the edited media. [str]
media_size:
Size of the output media (in bytes). [int]
command_str:
The string of commands provided in the initial
response. [str]
Example Requests:
cURL:
curl -X POST -H "EVB_AUTH: YOUR_API_TOKEN_HERE" -F [email protected] -F commands="tt=hey" https://pigeonburger.xyz/api/v1/edit/
Python:
import requests
headers = {
'EVB_AUTH': "YOUR_API_TOKEN_HERE"
}
file = open("input.mp4", 'rb') # Get the file as raw data
r = requests.post('https://pigeonburger.xyz/api/v1/edit/', headers=headers, files={"file": file}, data={"commands": "tt=hey"})
print(r.json())
Example Response:
{
"error": false,
"code": 200,
"is_video": true,
"media_url": "https://pigeonburger.xyz/api-store/ef051da2b8964fb2903d0fdb9babb093.mp4",
"media_size": 3469128,
"command_str": "tt=hey,"
}
/stats/
Statistics about your EditVideoBot API usage (including number of daily requests
left)
Method: GET
No extra data/parameters are required.
Response:
error:
False [bool]
code:
200 [int]
email:
A string containing the email associated with your
API account. [str]
level:
The API level your account is on (higher levels = more
requests and bigger files allowed, can be bought here)
[str]
remaining_daily_requests:
The number of requests to the /edit/ endpoint that
your account has remaining for the day. [int]
videos_edited:
The total number of videos you have edited. [int]
photos_edited:
The total number of photos you have edited. [int]
total_edited:
The total number of photos and videos that have
been edited. [int]
first_edit:
The date and time of your first edit using the API
(format: YYYY-MM-DD HH-MM-SS) [str]
latest_edit:
The date and time of your most recent edit using
the API (format: YYYY-MM-DD HH-MM-SS) [str]
favourite_cmd:
The EditVideoBot command
that you use the most. [str]
Example Requests:
cURL:
curl -H "EVB_AUTH: YOUR_API_TOKEN_HERE" https://pigeonburger.xyz/api/v1/stats/
Python:
import requests
headers = {
'EVB_AUTH': "YOUR_API_TOKEN_HERE"
}
r = requests.get("https://pigeonburger.xyz/api/v1/stats/", headers=headers)
print(r.json())
Example Response:
{
"error": false,
"code": 200,
"email": "[email protected]",
"level": "Free",
"remaining_daily_requests": 25,
"videos_edited": 5,
"photos_edited": 0,
"total_edited": 5,
"first_edit": "2021-06-01 19:35:54",
"latest_edit": "2021-06-01 20:31:27",
"favourite_cmd": "tt"
}
Any further questions or clarification should be
sent to my contact form https://pigeonburger.xyz/contact