Create and manage pxl.to assets programmatically using the official API
Our API supports Basic Authentication as defined in RFC2617. Within every API request you make, you will need to include your access token.
Once your developer account is approved, visit the admin page to see and generate access tokens. After generating a token you will pass it in the Authorization request header using the
Bearer authentication scheme:
Authorization: Bearer <Your Access Token>
Token expiration and revocation
When a token has expired or has been revoked, it can no longer be used to authenticate pxl.to API requests. Once expired or revoked, a token cannot be restored, you will need to create a new token.
Responses from our API are in JSON format with UTF-8 encoding. Request bodies sent to the API should be in JSON format. A Content-Type header is required whenever you're sending a request body:
API requests are limited to 100 requests per day and per authentication token. All authenticated requests will be associated with the user and organisation that generated the token.
Rate limit HTTP headers
The returned HTTP headers of any API request show your current rate limit status:
curl -I "https://api.pxl.to/api/v1/short" \ -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" > HTTP/2 200 > Date: Mon, 01 Jul 2022 17:27:06 GMT > x-ratelimit-limit: 100 > x-ratelimit-remaining: 99 > x-ratelimit-reset: 1658966400 > x-ratelimit-latency: 5