NAV
cURL

Welcome to the Visuify API Documentation

Greetings, developers! Dive into the world of Visuify, where seamless file interaction meets captivating visual experiences. The Visuify API empowers you to effortlessly integrate advanced image preview capabilities into your applications, supporting an array of file types including PDFs, Word documents, images, videos, and 3D objects.

Our innovative platform is designed to enhance user experiences by delivering lightning-fast processing and high-quality visual outputs. Whether you're crafting document management solutions, multimedia applications, or any project that requires dynamic file previews, Visuify is here to elevate your development journey.

This documentation provides a comprehensive guide to integrating and harnessing the power of Visuify in your applications. Let's embark on a visual transformation journey together!

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "https://www.visuify.app/api/me" \
  -H "Authorization: Bearer <YOUR_API_KEY>"

Make sure to replace <YOUR_API_KEY> with your API key.

Visuify uses API keys to allow access to the API. You can register a new Visuify API key at your dashboard.

Visuify expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: Bearer <YOUR_API_KEY>

Thumbnails

Generate new thumbnail

curl --location 'https://www.visuify.app/api/thumbnails' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--form 'width="500"' \
--form 'height="250"' \
--form 'file=@"suzanne.obj"'

The above command will return generated thumbnail

This endpoint will generate new thumbnail from the selected file with the selected dimensions.

HTTP Request

POST https://www.visuify.app/api/thumbnails

Form-data parameters

Parameter Example Description
width 500 Width of the generated thumbnail in pixels. Limited by subscription plan.
height 500 Height of the generated thumbnail in pixels. Limited by subscription plan.
file File for which you want to generate the thumbnail.

Errors

The Visuify API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong or is disabled.
403 Forbidden -- You are out of thumbnail quota for current billing period.
404 Not Found -- The specified route could not be found.
405 Method Not Allowed -- You used wrong HTTP method.
429 Too Many Requests -- You created too many request in a single time period. Check Rate Limiting section.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

Rate Limiting

In order to avoid malicious requests affecting Visuify, there is a rate limit set, which will return HTTP status 429 if the limit is reached.

Every response request will return two headers, which can help you implement Rate Limiting handling:

Headers

There are some response headers that can help you better utilise Visuify.

Header Example value Description
X-Visuify-Remaining 2345 How many thumbnail requests are still available for the current billing period
X-RateLimit-Limit 1000 Maximum number of requests in a single time period (1 minute) before Rate Limiter is triggered (see Rate Limiting)
X-RateLimit-Remaining 464 Remaining number of requests in a single time period (1 minute) before Rate Limiter is triggered (see Rate Limiting)