Bring Vision to Your Apps - PixLab Rest APIs

REST APIs Reference Guide for Developers

Discover the comprehensive PixLab REST API Reference, your guide to endpoints for media analysis, image processing, document conversion, background removal, and other powerful features.

Trusted by thousands of developers & businesses worldwide...

Version 2.197 (Release Notes ↗)

The PixLab REST API Reference Guide provides everything developers need to integrate powerful features into web applications—ranging from image and video analysis to Vision Language Models, AI agents, and document intelligence tools. This documentation offers a complete specification of the PixLab REST API interface for both beginners and advanced users. For a hands-on introduction, visit the API Portal, or follow the REST API Tutorial. All examples are ready to copy, paste, and run.

For specific solutions, refer to the dedicated guides: ID Scan & Extract API for global ID Cards & Passport scanning, the Vision Platform for vLMs automation, data intelligence, document parse & extraction, and the PDF Generation APIs for dynamic media-rich document creation. For the full list of capabilities, visit the API Endpoints Directory including Media Analysis, Content Moderation, Vision Language Models, Image Processing, Document Conversion, Face Recognition, and many other specialized API endpoints →

Features of the PixLab REST APIs

The PixLab REST API is designed to deliver a seamless and powerful development experience. Built on HTTP/TLS and following RESTful principles ↗, it provides a reliable foundation for developers to build and innovate. Here's what makes the PixLab API stand out:

API Access URL

  • The PixLab API’s base endpoint is located at https://api.pixlab.io/, serving as the main access point for all API requests. For specialized Vision Language Models endpoints (available from the Vision Platform) with an OpenAI compatible API interface, prefer using the base endpoint at https://llm.pixlab.io/.

  • API requests follow the structure: https://api.pixlab.io/endpoint?param=val&param2=val2, where endpoint specifies the API Endpoint you wish to call. param=val are the query parameters, which vary depending on the endpoint. Examples include:

    • DOCSCAN: ID Cards & Passport scanning.
    • QUERY: Receive natural language responses to image-related queries.
    • BGREMOVE: Bulk image background removal.
    • PDFTOIMG: Convert PDF to images.
    • DESCRIBE: Generate natural language descriptions of image or video frame contents.
    • CHAT: OpenAI-compatible LLM interaction API endpoint.
    • MOGRIFY: Partial blurring, such as of faces.
    • NSFW: Nudity and Adult content detection.
    • SCREENCAPTURE: Website Screenshots extraction.
    • Plus hundreds more API Endpoints →
  • Each endpoint supports both GET and POST methods, providing flexibility for different implementation scenarios. With over 150 API endpoints, PixLab ensures consistent invocation across all features.

  • A dedicated Health & Status Dashboard ↗ offers real-time monitoring to ensure reliable service.

Summary

Access Point URL api.pixlab.io
OR
llm.pixlab.io
API Health Monitoring Endpoint api.pixlab.io/status
OR
status.pixlab.io
Architecture RESTful
HTTP & TLS Protocols Version 1.3
Authentication Key-Based
Network Cloudflare, AWS, & OVH
HTTP Response MIME Type application/json or BLOBs
HTTP Status & Error Codes Listed Below ↓
API Endpoints Documented here →

Authentication

When you sign up ↗ for a PixLab account, you’ll receive a unique API Key. This key is required for authenticating all requests to the PixLab API. You can manage your keys through the API Keys tab in the PixLab Console ↗.

Authentication Methods

Authentication ↗ to the PixLab API can be performed via HTTP Header or by embedding the API key directly in your request as a query parameter. Choose the method that best suits your workflow:

HTTP Header

Embed your API Key in the WWW-Authenticate HTTP header for secure authentication. Example:
WWW-Authenticate: API_KEY
Replace API_KEY with the actual key obtained from the PixLab Console ↗.

Query Parameter

PixLab recommend that you include your API key directly in your POST or GET request as a query parameter such as:
https://api.pixlab.io/facedetect?param=val&key=API_KEY
This approach works seamlessly with all API Endpoints.

Always safeguard your API keys. Ensure they are used only by authorized scripts and avoid exposing them in public repositories.

Responses, Status & Errors Codes

PixLab API endpoints return consistent HTTP status codes with all responses formatted as application/json, regardless of success or failure. For endpoints returning binary content (e.g., image BLOBs), set blob=true to receive binary output on success.

200 Success - API Call (e.g., DOCSCAN, BGREMOVE etc.) successfully completed.
400 Bad Request - Missing or invalid parameters.
401 Unauthorized - Invalid or missing API Key ↗.
404 No Such Endpoint - Resource does not exist.
405 Method Not Allowed - HTTP method not supported by the target API Endpoint.
415 Unsupported Media Type - File format not supported.
429 Too Many Requests - Rate limit exceeded.
500 Internal Server Error - Temporary server-side issue.

Explore Further

Now that you have a solid understanding of how PixLab processes and handles your incoming HTTP requests, you are well-equipped to move forward. In the next section, we will dive into the specifics of each PixLab API endpoint, exploring their functionality, parameters, and practical use cases in detail. Whether you're looking to perform media analysis, process images, or leverage advanced tools like ID Scan & Extract API and the Vision Platform, these comprehensive endpoint breakdowns will provide the insight you need to fully utilize the API's capabilities.