# Getting started Everypixel Labs offers a range of advanced AI-powered services. Our services are built around a simple idea: you provide input data (an image, video, audio, or text) to a service and it returns predictions or modifies the data. This page documents the endpoints listed below, authentication, requests and responses. The Pricing page lists public default prices; your account's rates may differ. If you have any questions or need assistance, please contact Everypixel Labs support at api@everypixel.com (mailto:api@everypixel.com). ## Get your API key After registering and logging in, open API Keys (https://labs.everypixel.com/account/keys) to obtain your Client ID and Client Secret. Use this pair for HTTP Basic authentication. The client's scopes determine which APIs it can access. Get the API key → (https://labs.everypixel.com/account/keys) ## Get trial Everypixel Labs provides one-time free quotas for eligible models. Not every model has a free trial. For example, a model might allow a certain number of free requests (e.g., 500 requests) or a certain amount of content (such as minutes of video/audio) to be processed at no charge. To activate a trial for a model, you have a couple of options: - New users: When you sign up for Everypixel Labs, you may be prompted to select a product or model to try. Choose the model you’re interested in to automatically start its free trial. - Existing users: If you already have an account, log in and go to the Explore Models section (or the models catalog) in your dashboard. Select the model you want to test, and click the option to Activate Trial for that model. Once a model’s trial is activated, you can make API calls to that model up to the free limit without incurring charges. The free trial usage applies whether you call the API via code or use the web interface. Note: The free trial for each model is a one-time offer – once you’ve used up the allotted free requests (or you choose a model without a free quota), further usage of that model will be billed according to the standard pricing for Everypixel Labs services (see the Everypixel Labs Pricing page for details). After the trial, you can continue using the model on a pay-as-you-go basis as outlined in the pricing plans. ## Submit tasks via UI Everypixel Labs provides a web-based Playground in your account dashboard that allows you to test API models through a graphical interface. This is a convenient way to try out the API without writing any code: - Using the Playground for most models: For all models except LipSync, Text-to-Speech (TTS), and Face Swap, the Playground lets you either upload an input file (image or video) or paste an URL to the file. After selecting or entering your input, click the Run button. The model will process the input just as it would via the API, and the output (result) will be displayed on the page, typically in a formatted JSON structure. This JSON response contains the same data you would get if you called the API directly. - Using the Playground for Lipsync, TTS, and Face Swap: These specific models produce output files (such as a generated video or audio). In the Playground interface for these models, you will be prompted to upload the required input files (for example, a video file and an audio track for LipSync, or an image for Face Swap, etc.). After uploading the inputs, click the Generate button. The system will process the task, and once ready, a downloadable output file (the synthesized video, audio, or image result) will be provided in the interface. ### File availability When you generate results through the UI (e.g., a lip-synced video or a swapped-face image), the output files are stored on the server for a limited time (currently, up to 24 hours). After 24 hours, these files are automatically deleted. If you want to keep the result, make sure to download the file to your device within that time window. ### Cost and usage accounting Running tasks via the web UI Playground uses the same API under the hood. This means that any requests you execute in the Playground will count against your free trial quota or your paid usage. In other words, the Playground is not “free” beyond what the API itself offers – it’s simply a different way to access the API. Once you exceed a model’s free trial limits, requests made through the UI will incur charges just like calls made programmatically. The cost of these requests follows the standard Everypixel Labs pricing (see the Pricing page for details), so you’ll want to top up your balance or have a payment method ready if you plan to continue heavy testing through the UI after the trial. Note: If your API request results in an error (e.g., invalid input, authentication failure, etc.), it will not be counted toward your usage or billed. Only successful or accepted (queued) tasks are subject to billing. ## Billing Selected APIs offer a one-time free quota after activation. Eligible models within an API share its quota; Image Lipsync and Video Lipsync share the lipsync quota. External models and Video Edit have no free quota. See each model's eligibility on the Pricing page. Limits will not be renewed once used. This applies to both API access and the use of algorithms through the Everypixel Labs interface. Once the free limit is exceeded, any additional usage will require payment. To continue using Everypixel Labs algorithms, simply top up your balance through the Balance menu in your account by clicking the Top up balance button. If your balance is low, we will send a warning email. You can determine the minimum balance limit in your profile on the Balance page to let us know when to send you a warning. After exceeding the number of available requests from your plan, you will see error 429. ### Auto-payment To make sure your balance is always topped up, you may want to consider enabling Auto-payment. Why enable auto-payment - Automatically top up your balance without manual intervention. - Set a threshold, one-time payment amount, and monthly limits to suit your needs. - As with manual balance top-ups, your payment details are kept secure, and you retain full control over your payments. How to set up auto-payment Before setting up, make sure you have a Payment method and Billing info on file. To fill in these details, go to the right menu and select Billing. - Navigate to the Balance menu in your account. - Enter the following details in the Auto-payment block: Replenishment threshold: The balance amount at which auto-payment should be triggered. One-time payment: The amount to be automatically debited when the threshold is reached. Monthly limits: The maximum amount of auto-payments allowed per calendar month. - Click on the Save and activate button. An email notification will confirm that Auto-payment has been activated. How to turn auto-payment off - Navigate to the Balance menu in your account. - In the Auto-payment block click the Disable button. The button will revert to Save and activate, indicating that Auto-payment has been disabled. How to update auto-payment details - Navigate to the Balance menu in your account. - In the Auto-payment block click the Disable button. The button will revert to Save and activate, indicating that Auto-payment has been disabled. This allows you to update your auto-payment details and then re-enable the option. - Adjust the replenishment threshold, one-time payment and monthly limits as needed. - Click Save and activate to apply the changes. You will receive an email notification confirming that Auto-payment has been activated. Steps to take if an auto-payment fails - Review your billing history in the Billing menu and auto-payment details in the Balance menu. Ensure your monthly limit has not been exceeded. - Verify your payment method in the Billing menu. Make sure your payment method is on file, up to date and has sufficient funds. - Check your billing info in the Billing menu. Ensure that your billing address is on file and current. ## Privacy and responsible use of technology We maintain the highest security standards to protect your information. For real-time API requests without a queue, we do not store your images and files. For queued requests, we delete input data within 24 hours. At Everypixel, we are also committed to providing AI algorithms that empower professionals and make their work more effective and easier. We do not allow our AI technology to be used for criminal or unethical purposes. # Authentication To use our API, you must first register for an account on Everypixel Labs. Once registered and logged in, navigate to the API Keys (https://labs.everypixel.com/account/keys) section of your account to obtain your Client ID and Client Secret. These credentials are used to authenticate your API requests so that only you can use your account’s access. API submissions require authentication. Use HTTP Basic with Client ID and Client Secret, or `Authorization: Bearer `. Do not use a Client Secret as a Bearer token. `GET /v1/status` is public by task ID and does not require authentication. Keep your Client ID and Secret safe. Do not expose them in public client-side code or share them, as they grant access to your account’s API usage. ## Where to find your API key Your API keys are located in the API Keys (https://labs.everypixel.com/account/keys) section of your Everypixel Labs account dashboard. In the web interface, click on your profile or account menu and select API Keys (https://labs.everypixel.com/account/keys). On that page, you will see a list of your API key pairs. Each entry shows a Client ID (an identifier for the key) and a Secret Key (the password or secret associated with that ID). You can copy these values using the provided “copy” button or by selecting the text. Keep your Client ID and Secret Key safe – do not share them publicly or expose them in client-side code, since they grant access to your account’s API usage. ## How to use your API key The examples below use HTTP Basic Authentication with Client ID and Client Secret. You can instead send an OAuth access token as Bearer authorization. Most HTTP clients and libraries support these methods: - cURL (command-line): Include the `--user` option with your Client ID and Secret, separated by a colon. For example: ``` curl --user "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" "" ``` This sends the Client ID and Secret as the HTTP Basic auth credentials. - Using code libraries: In many programming languages or frameworks, you can set the basic authentication in a request. For example, in Python using the `requests` library, you can pass an `auth` parameter with a tuple of your (`client_id`, `client_secret`). In JavaScript or other environments, you might set an `Authorization` header with the Basic auth token. Every code example in this documentation includes the credentials as part of the request (either via an `auth` parameter or equivalent). When using Basic Auth, your Client ID and Secret Key are transmitted securely (the connection is over HTTPS). Always ensure you’re making requests to the HTTPS endpoint. If you prefer a token-based approach, Everypixel Labs also supports OAuth 2.0 for authentication. Using OAuth, you would first obtain an access token (using your Client ID/Secret in an OAuth flow) and then use that token for API calls. OAuth can provide enhanced security for client-side applications (so you don’t directly embed your secret), but detailing the OAuth process is beyond the scope of this documentation. For getting started, using your Client ID and Secret via Basic Auth is the simplest method ## Example request To illustrate a basic API call with authentication, below is an example using cURL. This request calls the Image Keywording endpoint with a sample image URL, asking for keywords describing the image. Replace `YOUR_CLIENT_ID` and `YOUR_CLIENT_SECRET` with your actual credentials, and provide the URL of an image you want to analyze: ``` curl --user "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" "https://api.everypixel.com/v1/keywords?url=https://example.com/your_image.jpg" ``` In this example, the `--user` flag supplies the API key (Client ID and Secret) for authentication. The request is a GET call to the `/v1/keywords` endpoint with an `url` parameter pointing to an image. The API will respond with a JSON object containing the analysis results (in this case, a set of keywords describing the image, along with their scores and other details). A successful response will have a structure like: ``` { "status": "ok", "keywords": [ { "keyword": "tree", "score": 0.987 }, { "keyword": "sky", "score": 0.932 }, ... ] } ``` This indicates the call was authenticated and processed successfully. (If your credentials were incorrect, you would receive a `401 Unauthorized` error, and if you exceeded your trial or quota, a `429 Too Many Requests` error, etc.) Now that you have your API keys and understand how to authenticate requests (and have possibly tried out the trial and Playground), you are ready to start using the Everypixel Labs API in your application. # Versioning The base URL for the Everypixel Labs API is: `https://api.everypixel.com/v1` The API is versioned, and the version number (e.g., `v1`) is included as part of the URL path for each endpoint. All examples in this documentation use version 1 of the API. Ensure that you include the correct version prefix in your requests (for example, `/v1/keywords` for the keywords endpoint). Most responses use JSON; Chat with `stream=true` returns server-sent events (SSE). Response envelopes depend on the endpoint. Synchronous analysis may include a field like `"status": "ok"` (or a boolean `true` in some cases) to indicate success. In case of errors, the response will include `"status": "error"` and a message (details on errors are provided later in this document). # Request Methods (GET vs POST) Many endpoints allow you to submit input data (images or videos) either by URL or by uploading the file. There are two ways to send data: - GET requests: If you have a publicly accessible URL for the image or video, you can use a GET request and pass the URL as a query parameter (e.g. `?url=`). Note: If the media URL contains special characters (such as `&` or `?`), you must URL-encode the URL so that it is safely included as a parameter. For example, `&` becomes `%26` and `?` becomes `%3F`. Failing to encode may result in an error or the URL being cut off. - POST requests: To upload a file directly, use a POST request with multipart form data. Each endpoint has a specific field name for the file (commonly this field is named `data` for image uploads, but some endpoints use a different name as noted below). In our examples, we show using Python’s `requests` library and cURL for file uploads. When using POST to upload files, you do not need to URL-encode anything. Simply ensure you use the correct field name and include the binary file in the request. Chat, generation, editing, upscaling, lipsync, TTS and transcription endpoints instead use JSON with `Content-Type: application/json`. Follow the format specified for the endpoint; multipart uploads and JSON are not interchangeable. # Performance Everypixel Labs imposes some rate limits and performance considerations to ensure reliable service. ## Requests per second You can send up to 30 requests per second simultaneously for most endpoints (such as Image Keywording, quality scoring, etc.). The Age Recognition endpoint is more compute-intensive and allows up to 10 requests per second. If you exceed these rates, the API will return an HTTP 502 Bad Gateway error indicating too many simultaneous requests. Make sure to throttle your requests or queue them on your side if you approach these limits. ## Concurrent processing For certain heavy operations that produce large outputs (like video processing or lengthy audio synthesis), the processing is handled sequentially for each task. For example, in Text-to-Speech and Lipsync, the tasks are processed one at a time per account – if you submit multiple jobs at once, they will be queued and executed sequentially. This ensures stable performance for each task. ## Processing speed The time it takes to get a result may vary by algorithm: Image-based analysis (keywording, quality, face detection, captioning) is typically fast (near real-time, usually under a second or a few seconds per image), especially if images are not too large (see image size recommendations). Text-to-Speech and LipSync: These involve generating or modifying media and require time. Audio is handled in real-time or faster, typically taking 1 minute to process 1 minute of audio or less. Processing 1 minute of video content may take approximately 10 minutes. Video Face Swap: Similarly to LipSync, swapping a face in a video is computationally heavy and will take time roughly proportional to the video length (e.g., many times real-time). ## Image size Very large images can slow down the response without improving the outcome. The algorithms for image analysis automatically resize images to around 300×300 pixels internally to analyze them. This resolution is sufficient to maintain accuracy for recognition tasks. Providing an image much larger than that will not yield more tags or higher accuracy, it will only add processing time. It is recommended to resize or compress images to around 300 pixels on the shortest side before sending, to speed up the request. ## Video length For the Video Keywording endpoint, the recommended video duration is between 5 and 60 seconds. Videos longer than 60 seconds may result in less relevant keywords (as the content gets diluted over time). Very short videos (under 5 seconds) might not have enough content for meaningful analysis. There is also an upload size limit of 100 MB for video files on this endpoint. Keep these considerations in mind to optimize your integration. # Checking status `https://api.everypixel.com/v1/status` Some of the APIs (particularly media generation and transformation endpoints) operate asynchronously. Instead of returning the final result immediately, an asynchronous request will return a task ID (`task_id`) that you can use to retrieve the result once processing is complete. This applies to endpoints like Text-to-Speech, Lipsync, Image and Video Face Swap, etc. ## Input To check the status of an asynchronous task, use the universal status endpoint. This endpoint is the same for all asynchronous tasks: Endpoint: - GET `/v1/status?task_id=` - Task status is available by task ID without authentication. ## Response Chat responses from `/v1/chat/completions` include only `billed_cost`, calculated from actual token usage. Streaming delivers it in the final event, including when `stream_options.include_usage` is disabled. Chat does not return `estimated_cost`. Image, video, speech and transcription submissions return `estimated_cost`. Task status returns `billed_cost` only after a successful result is available and accounting finishes. Final callbacks also include `billed_cost`: the final accrued cost, with balance settlement performed later. Costs are decimal strings in USD, such as `"0.08"` or `"0"`, including free quota. The estimate can differ from the final cost because of actual media usage or concurrent use of free quota. Status responses omit cost fields for unfinished, failed or cancelled tasks, and while accounting is unfinished. Task status, results and costs are available by task ID without authentication. The `/v1/status` endpoint returns a JSON object with the following fields: - `task_id` (string) – The unique ID of the task you are checking. - `status` (string) – The current status of the task. Possible values: - PENDING – The task is in queue, waiting to be processed. - STARTED – The task is being processed. - SUCCESS – The task has completed successfully; the result is available. - FAILURE – The task encountered an error and did not complete. - REVOKED – The task was canceled before completion. - `queue` (integer) – Position of your task in the processing queue. If `queue = 0`, the task is either being processed or completed. - `result` (string or object) – The URL or data containing the output of the completed task. This will be populated only when `status = SUCCESS`. ## Example ### Request This status request does not require authentication. Python ```python import time import requests task_id = "" for _ in range(360): response = requests.get( "https://api.everypixel.com/v1/status", params={"task_id": task_id}, timeout=30, ) response.raise_for_status() state = response.json() if state["status"] == "SUCCESS": print(state["result"]) break if state["status"] in ("FAILURE", "REVOKED"): raise RuntimeError(state.get("error", state["status"])) time.sleep(5) else: raise TimeoutError("Task is still running") ``` ### Result HTTP status 200: ``` { "task_id": "uuid", "status": "str", "queue": "int", "result": "str" } ``` You can poll the `/v1/status` endpoint periodically (e.g., every few seconds) until you receive a terminal status (`SUCCESS`, `FAILURE`, or `REVOKED`). For a more efficient integration, consider using callbacks (see Callbacks section) to have the API notify you when the task is complete. # Image Keywording `https://api.everypixel.com/v1/keywords` The Image Keywording API analyzes an image and returns a list of keywords (tags) describing the content of the image. The AI recognizes objects, people, places, colors and actions in the image and expresses them as descriptive keywords. This is useful for auto-tagging images, making them searchable, or adding metadata. ## Processing speed Processes images in under 1 second, handling up to 30 requests per second. ## Optimization tips The system automatically resizes images to 300×300 pixels before analysis. Uploading larger images won't improve accuracy but can slow down processing. ## Input An image to analyze, provided either by URL or by file upload. Supported image formats are JPEG and PNG. (Any image you provide will be internally resized for analysis as noted in the performance section.) You can call this endpoint with an HTTP GET request if you have an image URL, or with a POST request to upload an image file. - GET: Include the image URL in the `url` query parameter. Make sure the URL is properly encoded if it contains special characters (such as `?` or `&`). - POST: Upload the image file with a multipart/form-data request. Use the field name `data` for the image file content. ## Parameters In addition to the image itself, the following query parameters are available to customize the keyword output: - `num_keywords` (integer, optional) – The maximum number of keywords to return. The algorithm can return up to 50 keywords for an image, but will often determine the appropriate number of relevant keywords on its own. If you request more than 50, it will still cap the results at 50. If you don’t specify this parameter, a default number of keywords will be returned (typically around 10-15). - `threshold` (float, optional) – A confidence score threshold between 0.0 and 1.0. If provided, the API will only return keywords with a relevance score greater than or equal to this threshold. This can be used to filter out less confident tags. - Using `num_keywords` and `threshold` together: You may specify both. In that case, the algorithm will return up to `num_keywords` results, but only those that meet the score `threshold`. For example, if you request `num_keywords=10` and `threshold=0.5`, the service will return at most 10 keywords, but if only 7 keywords have scores ≥ 0.5, you will get those 7 (not 10). - `lang` (string, optional) – The language for the returned keywords. By default, keywords are returned in English (`"en"`). You can request keywords in other supported languages by setting this parameter to one of: `"en"` (English), `"ru"` (Russian), `"es"` (Spanish), `"fr"` (French), `"de"` (German), `"pt"` (Portuguese), `"it"` (Italian). - `colors` (boolean, optional) – If set to `true`, the response will include a section with color-related keywords. These are basic color names describing the dominant colors in the image. - `num_colors` (integer, optional) – If `colors=true`, this specifies how many color keywords to include (for example, the top 5 colors in the image). If not specified, a default number of colors will be returned when `colors` is enabled. ## Response On success, the API responds with a JSON object containing a list of keywords (and optionally colors) identified in the image: - `keywords` – An array of objects, each with: - `keyword` – A keyword/tag (string) describing something in the image. - `score` – A confidence score (float value between 0 and 1) indicating how relevant or likely that keyword is for the image. Higher scores mean the keyword is more confidently associated with the image. The keywords are typically ordered from highest score to lowest. - `colors` – (Present only if `colors=true` was requested). An array of color descriptions, each with: - `name` – Name of the color (a common color name). - `rgb` – The RGB triplet values of that color. - `hex` – The hex code of the color. - `percentage` – The percentage of the image that this color occupies (an indication of dominance). - `status` – Status of the request. On success, this will be `"ok"` (or a boolean `true` in some cases). On error, it would be `"error"` (with an accompanying `message` – see the Errors section). ## Example ### Request ```shell curl --user ":" "https://api.everypixel.com/v1/keywords?url=http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg&num_keywords=10&colors=True&num_colors=5&lang=en" ``` ```shell import requests client_id = '' client_secret = '' params = {'url': 'http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg', 'num_keywords': 10, 'colors': True, 'num_colors': 5, 'lang': 'en'} keywords = requests.get('https://api.everypixel.com/v1/keywords', params=params, auth=(client_id, client_secret)).json() with open('image.jpg','rb') as image: data = {'data': image} keywords = requests.post('https://api.everypixel.com/v1/keywords', files=data, auth=(client_id, client_secret)).json() print(keywords) ``` ```php '; $client_secret = ''; // The image URL and parameters $params = [ 'url' => 'http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg', 'num_keywords' => 10, 'colors' => true, 'num_colors' => 5, 'lang' => 'en' ]; // Build the query string from parameters $query = http_build_query($params); // The API endpoint $url = "https://api.everypixel.com/v1/keywords?$query"; // Initialize a cURL session $ch = curl_init($url); // Set the basic authentication curl_setopt($ch, CURLOPT_USERPWD, "$client_id:$client_secret"); // Set options to return the response as a string curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Execute the request and fetch the response $response = curl_exec($ch); // Check for cURL errors if (curl_errno($ch)) { echo 'cURL error: ' . curl_error($ch); exit; } // Close the cURL session curl_close($ch); // Decode the JSON response $keywords = json_decode($response, true); // Print the response (for debugging) print_r($keywords); ?> ``` ### Result ```json { "keywords": [ {"keyword": "animal", "score": 0.9718916489849907}, {"keyword": "cute", "score": 0.9601239529000117}, {"keyword": "pets", "score": 0.949350643787409}, {"keyword": "kitten", "score": 0.9039852518100446}, {"keyword": "domestic cat", "score": 0.8818465735911328}, {"keyword": "domestic animals", "score": 0.773913246291121}, {"keyword": "young animal", "score": 0.6324827753197934}, {"keyword": "mammal", "score": 0.5434195324260841}, {"keyword": "feline", "score": 0.4977278418785077}, {"keyword": "small", "score": 0.46956064184549734} ], "colors": [ {"name": "WhiteSmoke", "rgb": [237, 238, 240], "hex": "#edeef0", "percentage": 42.88}, {"name": "Sienna", "rgb": [123, 79, 50], "hex": "#7b4f32", "percentage": 7.43}, {"name": "Tan", "rgb": [195, 171, 146], "hex": "#c3ab92", "percentage": 16.71}, {"name": "Peru", "rgb": [168, 130, 96], "hex": "#a88260", "percentage": 15.34}, {"name": "PeachPuff", "rgb": [215, 207, 200], "hex": "#d7cfc8", "percentage": 17.64} ], "status": "ok" } ``` (The example above shows keywords and colors for an image of a kitten. The `keywords` array provides tags like “animal”, “cute”, “kitten”, etc., each with a confidence score. The `colors` array lists dominant colors such as WhiteSmoke and Sienna with their share in the image.) ## Additional notes The image keywording algorithm is trained mostly on real-world imagery. It may struggle to identify very abstract or fictional concepts (for example, fantasy or surreal images with objects that do not exist in reality). In such cases, it might return more general tags (e.g., “illustration”, “fantasy art”) rather than specific mythical creatures. However, if the image contains fantastical elements that resemble real objects, the algorithm can still tag those familiar elements. # Video Keywording `https://api.everypixel.com/v1/video_keywords` The Video Keywording API works similarly to Image Keywording but for short video clips. It analyzes a video and returns a set of keywords describing the content (objects, scenes, actions) found across the video frames. ## Processing speed The time required depends on video length. Works best with 5–60 second clips, supporting 1 request per second. ## Optimization tips Longer videos may result in less relevant keywords since the AI has more content to analyze. If possible, keep clips concise. ## Input A video clip (recommended length between 5 and 60 seconds) provided by URL or file upload. Supported video formats include MP4, MPEG, MOV, and AVI. The maximum file size for upload is 100 MB. For best results, use a video between 5–60 seconds; longer videos can be processed but the relevance of the generated keywords may decrease as video length increases. - GET: Include the video `URL` in the url query parameter. Make sure the URL is properly encoded if it contains special characters (such as `?` or `&`). - POST: Upload the video file with a multipart/form-data request. Use the field `name` data for the image file content. ## Parameters - `num_keywords` (integer, optional) – Maximum number of keywords to return (up to 50). If not provided, a default count of keywords will be returned. - `threshold` (float, optional) – Confidence threshold for keyword scores (0.0 to 1.0). Only keywords with a score ≥ threshold will be returned. You can combine `threshold` with `num_keywords` similarly to the image keywords endpoint (the same logic: it will stop early if the threshold condition limits the results). - Using `num_keywords` and `threshold` together: You may specify both. In that case, the algorithm will return up to `num_keywords` results, but only those that meet the score `threshold`. For example, if you request `num_keywords=10` and `threshold=0.5`, the service will return at most 10 keywords, but if only 7 (not 10). (This endpoint does not support the colors or lang parameters.) ## Response On success, the API responds with a JSON object containing a list of keywords (and optionally colors) identified in the video: - `keywords` – An array of objects, each with: - `keyword` – A keyword/tag (string) describing something in the video. - `score` – A confidence score (float value between 0 and 1) indicating how relevant or likely that keyword is for the video. Higher scores mean the keyword is more confidently associated with the video. The keywords are typically ordered from highest score to lowest. - `status` – Status of the request. On success, this will be `"ok"` (or a boolean `true` in some cases). On error, it would be `"error"` (with an accompanying `message` – see the Errors section). Each keyword’s `score` reflects how prominently or frequently that concept appeared in the video. ## Example ### Request ```shell curl --user ":" "https://api.everypixel.com/v1/video_keywords?url=https://media.gettyimages.com/videos/man-talking-with-colleague-in-the-office-video-id843434746&num_keywords=10" ``` ```python from pathlib import Path import requests client_id = '' client_secret = '' params = {'url': 'https://media.gettyimages.com/videos/man-talking-with-colleague-in-the-office-video-id843434746', 'num_keywords': 10} keywords = requests.get('https://api.everypixel.com/v1/video_keywords', params=params, auth=(client_id, client_secret)).json() with open('video.mp4','rb') as file: data = {'data': file} keywords = requests.post('https://api.everypixel.com/v1/video_keywords', files=data, auth=(client_id, client_secret)).json() ``` ```php $authorization = "" . ":" . ""; $url = "https://api.everypixel.com/v1/video_keywords?url=https://media.gettyimages.com/videos/man-talking-with-colleague-in-the-office-video-id843434746&num_keywords=10"; $curl = curl_init(); curl_setopt($curl, CURLOPT_USERPWD, $authorization); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $data = curl_exec($curl); curl_close($curl); $json = json_decode($data); ``` ### Result ```json { "keywords": [ {"keyword": "Medium shot", "score": 0.8536547422409058}, {"keyword": "Real time", "score": 0.8485572934150696}, {"keyword": "Animal", "score": 0.7466279963652293}, {"keyword": "Men", "score": 0.86750519275665283}, {"keyword": "Business", "score": 0.7157746723720005}, {"keyword": "Indoors", "score": 0.6314120207514081}, {"keyword": "Adult", "score": 0.6239697535832723}, {"keyword": "People", "score": 0.6199291689055306}, {"keyword": "Caucasian Ethnicity", "score": 0.6174033582210541}, {"keyword": "Office", "score": 0.6139942705631256} ], "status": "ok" } ``` (The above example suggests keywords for a video of people in an office setting, such as “Men”, “Business”, “Office”. Each keyword has an associated relevance score.) # Image Captioning `https://api.everypixel.com/v1/image_captioning` The Image Captioning API generates a descriptive caption for an image. It uses AI to analyze the image and produce a human-readable sentence or phrase summarizing the scene. This is useful for automatically creating alt text, photo captions for social media or blog posts, or adding descriptions to images for accessibility. ## Processing speed Processes images in under 1 second, handling up to 1 request per second. ## Optimization tips The system automatically resizes images to 300×300 pixels before analysis. Uploading larger images won't improve accuracy but can slow down processing. ## Input An image (JPEG or PNG). - GET: Include the image URL in the `url` query parameter. Make sure the URL is properly encoded if it contains special characters (such as `?` or `&`). - POST: Upload the image file with a multipart/form-data request. Use the field name `data` for the image file content. ## Parameters - `caption_len` (string, optional) — controls the desired length of the generated caption: - `"short"` – generates concise captions of approximately 3–6 words; - `"normal"` (default) – generates medium-length captions of approximately 7–12 words; - `"long"` – generates extended captions of approximately 13–20+ words. Note: Actual caption length may vary slightly depending on image complexity, but these ranges represent typical output for each setting. ## Response A JSON object with: - `result` – an object containing: - `caption` – The generated caption (string) for the image. - `status` – `true` on success (note: in this endpoint, the `status` field is a boolean rather than the string "ok"). Example: If you send in a picture of a small kitten sitting on a wooden floor, the API might return a caption like “a small cat sitting on the floor indoors.” ## Example ### Request ```shell curl -X POST -u : \ -F "data=@/path/to/image.jpg" \ https://api.everypixel.com/v1/image_captioning ``` ```python from pathlib import Path import requests client_id = '' client_secret = '' with open('image.jpg','rb') as image: data = {'data': image} title = requests.post('https://api.everypixel.com/v1/image_captioning', files=data, auth=(client_id, client_secret)).json() ``` ```php $authorization = "" . ":" . ""; $url = "https://api.everypixel.com/v1/image_captioning"; $curl = curl_init(); curl_setopt($curl, CURLOPT_USERPWD, $authorization); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, ['data' => new CURLFile('/path/to/image.jpg')]); $data = curl_exec($curl); curl_close($curl); $json = json_decode($data); ``` ### Result ```json { "result": { "caption": "" }, "status": True } ``` Use this endpoint to quickly generate descriptions of images. It’s trained on a broad set of images and attempts to produce sensible captions, but it might occasionally be off if the image is unusual or very complex. Always review critical captions if accuracy is important. # Age Recognition `https://api.everypixel.com/v1/faces` This AI model detects human faces in an image, and for each face, it estimates the person’s age. It also provides a confidence score for each detected face. This can be used for applications like demographic estimation or simple face detection in images. ## Processing speed A highly computational task, handling up to 10 requests per second. Expect slightly longer processing times than standard image analysis. ## Input An image (JPEG or PNG) that may contain one or more human faces. - GET: Include the image URL in the `url` query parameter. Make sure the URL is properly encoded if it contains special characters (such as `?` or `&`). - POST: Upload the image file with a multipart/form-data request. Use the field name `data` for the image file content. ## Parameters No additional parameters are required or supported for this endpoint besides the image itself. ## Response JSON object containing: - `faces` – an array of detected faces. Each face in the array is an object with the following fields: - `age` – The estimated age of the person in the image (as a floating-point number). This represents how old the person appears to the model. - `score` – The confidence score for the face detection (a float between 0 and 1). A score near 1 indicates the model is very confident a face was correctly detected and the age estimation is reliable. - `bbox` – The bounding box of the face in the image, given as an array `[x_min, y_min, x_max, y_max]` coordinates. These coordinates indicate the region of the image where the face was found. - `class` – A string label categorizing the age range of the person. For example, it might return values like `"Age - Young Adult"`, `"Age - Child"`, etc., corresponding to the age estimate. In the example below, the class is "Young Adult" because the model estimated the age around 20.5 years. - `status` – `"ok"` on success. If no face is detected in the image, the `faces` array may be empty (and `status` will still be `"ok"` but essentially no face data to report). ## Example ### Request ```shell curl --user ":" "https://api.everypixel.com/v1/faces?url=https://labs.everypixel.com/static/i/estest_sample3.jpg" ``` ```python from pathlib import Path import requests client_id = '' client_secret = '' params = {'url': 'https://labs.everypixel.com/static/i/estest_sample3.jpg'} quality = requests.get('https://api.everypixel.com/v1/faces', params=params, auth=(client_id, client_secret)).json() with open('image.jpg','rb') as image: data = {'data': image} quality = requests.post('https://api.everypixel.com/v1/faces', files=data, auth=(client_id, client_secret)).json() ``` ```php $authorization = "" . ":" . ""; $url = "https://api.everypixel.com/v1/faces?url=https://labs.everypixel.com/static/i/estest_sample3.jpg"; $curl = curl_init(); curl_setopt($curl, CURLOPT_USERPWD, $authorization); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $data = curl_exec($curl); curl_close($curl); $json = json_decode($data); ``` ### Result ```json { "faces": [{ "age": 20.553737561567686, "score": 0.9999862909317017, "bbox": [488.1020906694572, 147.58440036790006, 824.1707326180912, 581.0635042573758], "class": "Age - Young Adult" }], "status": "ok" } ``` (In this example, one face was detected. The person’s estimated age is ~20.55 years old, with a very high confidence score of 0.99998. The bounding box coordinates locate the face in the image, and the class label indicates the age falls into the “Young Adult” category.) This endpoint only provides an age estimate. It does not identify the person or give attributes like gender or emotion. The primary use is to get an approximate age and ensure a face is present. All images processed by this endpoint are not stored by Everypixel (see privacy note), so this won’t function as a face recognition (identity) service. # Stock Photo Quality `https://api.everypixel.com/v1/quality` This model evaluates the quality and market potential of professional photographs from the perspective of stock photography experts. It does not evaluate how attractive a person or object looks in the photo, but focuses solely on technical aspects such as brightness, contrast, and noise. The model is not intended to evaluate historical photos, illustrations or 3D visualizations. ## Processing speed Processes images in `under 1 second`, handling up to `30 requests per second`. ## Input An image to analyze, provided either by URL or by file upload. Supported image formats are JPEG and PNG. (Any image you provide will be internally resized for analysis as noted in the performance section.) You can call this endpoint with an HTTP GET request if you have an image URL, or with a POST request to upload an image file. - GET: Include the image URL in the `url` query parameter. Make sure the URL is properly encoded if it contains special characters (such as `?` or `&`). - POST: Upload the image file with a multipart/form-data request. Use the field name `data` for the image file content. ## Parameters No additional parameters are required or supported for this endpoint besides the image itself. ## Response A JSON object with: - `quality` – An object containing: - `score` – A float between 0 and 1 representing the quality score. This can be interpreted as a percentage (e.g., 0.95 ~ 95% quality). A higher score means the photo is closer to meeting the high standards expected of stock photography (technically well-executed, properly exposed, etc.). - `status` – `"ok"` on success. The quality score is a continuous value. You might decide to set your own threshold for what “acceptable” quality is depending on your application. For instance, you might consider anything above 0.8 as high quality. ## Example ### Request ```shell curl --user ":" "https://api.everypixel.com/v1/quality?url=http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg" ``` ```python from pathlib import Path import requests client_id = '' client_secret = '' params = {'url': 'http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg'} quality = requests.get('https://api.everypixel.com/v1/quality', params=params, auth=(client_id, client_secret)).json() with open('image.jpg','rb') as image: data = {'data': image} quality = requests.post('https://api.everypixel.com/v1/quality', files=data, auth=(client_id, client_secret)).json() ``` ```php $authorization = "" . ":" . ""; $url = "https://api.everypixel.com/v1/quality?url=http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg"; $curl = curl_init(); curl_setopt($curl, CURLOPT_USERPWD, $authorization); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $data = curl_exec($curl); curl_close($curl); $json = json_decode($data); ``` ### Result ```json { "quality": { "score": 0.9729430521699124 }, "status": "ok" } ``` (In this example, the image scored ~0.973 (97.3% quality), which indicates an excellent technical quality photograph.) ## How to interpret the score A high score means the photo meets many quality criteria (sharpness, exposure, etc.). However, a lower score doesn’t always mean the photo is “bad” – it might be technically fine but perhaps too generic, obviously staged, or otherwise not stock-worthy. For instance, an image might be perfectly sharp and well-exposed (technically perfect) but if it appears dated or overly posed, the model might give it a moderate score instead of a very high one. Use the score as a guideline for quality filtering or ranking. # UGC Photo Quality `https://api.everypixel.com/v1/quality_ugc` The main difference between Stock Photo Scoring and this model is the training dataset. User-generated photo scoring is a model trained on 347,000 user photos from Instagram. The estimation parameters for this model were created by a group of 10 professional photographers. This model is designed to score user photos taken with both a professional camera and a smartphone camera. It doesn't evaluate the action and doesn't measure how cool or beautiful a person or object looks in a photo. It only cares about technical parts like brightness, contrast, noise, and so on. The service is not designed to rate historical photos, illustrations, or 3D visualizations. ## Processing speed Processes images in `under 1 second`, handling up to `30 requests per second`. ## Input An image to analyze, provided either by URL or by file upload. Supported image formats are `JPEG` and `PNG`. (Any image you provide will be internally resized for analysis as noted in the performance section.) You can call this endpoint with an HTTP GET request if you have an image URL, or with a POST request to upload an image file. - GET: Include the image URL in the `url` query parameter. Make sure the URL is properly encoded if it contains special characters (such as `?` or `&`). - POST: Upload the image file with a multipart/form-data request. Use the field name `data` for the image file content. ## Parameters No additional parameters are required or supported for this endpoint besides the image itself. ## Response JSON with: - `quality` – an object containing: - `score` – float between 0 and 1, representing the quality score of the photo. - `class` – an integer from 1 to 5 indicating the quality category the photo falls into. - `status` – `"ok"` on success. The `class` value corresponds to five quality categories: - Very Bad (0–20%) – Very low quality with significant technical issues. - Poor (20–40%) – Below average quality, with noticeable problems. - Normal (40–60%) – Acceptable, average quality. Meets basic standards but not outstanding. - Good (60–80%) – High quality, only minor imperfections if any. - Excellent (80–100%) – Top quality, technically almost perfect. These class ranges are determined by the score percentage. The `class` can be useful for quickly categorizing photos (for example, you might reject anything in class 1 or 2 if you require decent quality). ## Example ### Request ```shell curl --user ":" "https://api.everypixel.com/v1/quality_ugc?url=http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg" ``` ```python from pathlib import Path import requests client_id = '' client_secret = '' params = {'url': 'http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg'} quality = requests.get('https://api.everypixel.com/v1/quality_ugc', params=params, auth=(client_id, client_secret)).json() with open('image.jpg','rb') as image: data = {'data': image} quality = requests.post('https://api.everypixel.com/v1/quality_ugc', files=data, auth=(client_id, client_secret)).json() ``` ```php $authorization = "" . ":" . ""; $url = "https://api.everypixel.com/v1/quality_ugc?url=http://image.everypixel.com/2014.12/67439828186edc79b9be81a4dedea8b03c09a12825b_b.jpg"; $curl = curl_init(); curl_setopt($curl, CURLOPT_USERPWD, $authorization); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $data = curl_exec($curl); curl_close($curl); $json = json_decode($data); ``` ### Result ```json { "quality": { "score": 0.5947988033294678, "class": 3 }, "status": "ok" } ``` (In this example, the photo scored ~0.595 (59.5%) which falls into class 3, “Normal” quality. It’s an average quality photo — not outstanding, but acceptable.) Use the `score` if you need a precise measure, or use the class for a quick categorization. For instance, you could label photos or filter them by these quality classes for users. # Image Generate `https://api.everypixel.com/v1/image_generate` The Image Generate API turns a text prompt into a generated raster image or SVG vector. It supports multiple models with different price/quality trade-offs and a set of style presets for common stylistic outputs. ## Processing speed Note: This is an asynchronous operation. Once you create a task, it will be processed in the background. Use the universal `/v1/status` endpoint with your task ID to check progress, or pass `callback_url` to receive the final result automatically. ## Input JSON body. The only required field is `prompt`. Use `model` to pick the generator and `style` to apply a preset. ## Parameters - `prompt` (string, required) – Text description of the image you want generated. - `model` (string, optional, default `"zimage"`) – Grok values are `"grok-imagine"`, `"grok-imagine-2"` (Image 2.0 medium), and `"grok-imagine-2-low"`. Other allowed values are `"zimage"`, `"flux"`, `"flux2"`, `"gemini-3.1-flash"`, `"gemini-3-pro"`, `"seedream-5-pro"`, `"seedream-5"`, `"gpt-image-2"`, `"gpt-image-2.5-sunburst"`, `"wan2.7"`, `"wan2.7-pro"`, `"recraftv4_1_vector"`, and `"recraftv4_1_pro_vector"`. External models ignore `style`. Pricing varies per model — see the Pricing page (https://labs.everypixel.com/pricing). - `quality` (optional, GPT Image only): Defaults to `medium`. GPT Image 2 accepts `low`, `medium`, `high`; Sunburst also accepts `xhigh` and `max`. Other models reject this parameter. Fixed prices depend on quality and resolution; `auto` is unsupported. - `image_size` (string, optional, default `"square"`) – Output aspect/orientation. Allowed values: `"square"`, `"portrait_3_2"`, `"portrait_4_3"`, `"portrait_16_9"`, `"landscape_3_2"`, `"landscape_4_3"`, `"landscape_16_9"`. - `resolution` (string, optional) – Grok models: `"1k"`/`"2k"`; Gemini Image models: `"1k"`/`"2k"`/`"4k"`; GPT Image 2 and Sunburst models: `"1k"`/`"2k"`/`"3k"`; `"seedream-5-pro"`: `"1k"`/`"2k"`; `"seedream-5"`: `"2k"`/`"3k"`/`"4k"`; `"wan2.7"`: `"1k"`/`"2k"`; `"wan2.7-pro"`: `"1k"`/`"2k"`/`"4k"`. Seedream and Wan 2.7 default to `"2k"`; other external models default to `"1k"`. GPT Image `3k` supports only `image_size=square`. - `style` (string, optional) – Style preset. Allowed values depend on the selected `model`: - `model="flux"`: `"transparent"`, `"transfer"` (`"transfer"` requires `image_url`). Style support is model-specific; the Pricing page (https://labs.everypixel.com/pricing) lists rates, not style presets. - `seed` (integer, optional, default `-1`) – Reproducible random seed; `-1` means random. - `controls` (object, Recraft V4.1 vector models only) – Optional `colors` (up to 12 weighted RGB colors) and `background_color`. Both `recraftv4_1_vector` and `recraftv4_1_pro_vector` return SVG; unrelated resolution and style fields are ignored. - `lora_url` (string, optional) – URL of a LoRA weights file to apply. - `callback_url` (string, optional) – HTTP(S) URL to receive a POST callback when the task completes. ## Response HTTP 200 with a JSON object containing: - `task_id` (string) – ID of the queued generation task. - `status` (string) – Initial status reported by the queue. - `queue` (integer, optional) – Position in the queue, when available. The final raster image or SVG URL is delivered via `/v1/status` polling or via the `callback_url` payload as `result`. ## Example ### Request ```shell curl --user ":" \ -H "Content-Type: application/json" \ -d '{"prompt":"a cute kitten on a windowsill","model":"zimage","image_size":"square"}' \ https://api.everypixel.com/v1/image_generate curl --user ":" \ -H "Content-Type: application/json" \ -d '{"prompt":"minimal calendar icon, rounded geometry, no text","model":"recraftv4_1_vector","image_size":"square","controls":{"colors":[{"rgb":[35,99,235]}]}}' \ https://api.everypixel.com/v1/image_generate ``` ```python import requests client_id = '' client_secret = '' response = requests.post( url="https://api.everypixel.com/v1/image_generate", json={ "prompt": "a cute kitten on a windowsill", "model": "zimage", "image_size": "square", "callback_url": "https://your-app.example/callback" # OPTIONAL }, auth=(client_id, client_secret), ) task_id = response.json().get("task_id") print(task_id) ``` ```php '; $client_secret = ''; $payload = json_encode([ "prompt" => "a cute kitten on a windowsill", "model" => "zimage", "image_size" => "square", ]); $ch = curl_init("https://api.everypixel.com/v1/image_generate"); curl_setopt($ch, CURLOPT_USERPWD, "$client_id:$client_secret"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); echo $data["task_id"]; ?> ``` ### Result Status code: 200 ```json { "task_id": "uuid", "status": "PENDING" } ``` Note: Asynchronous. Poll `/v1/status` with your `task_id`, or wait for the `callback_url` request to receive the final `result` URL. # Image Edit `https://api.everypixel.com/v1/image_edit` The Image Edit API applies natural-language edits to one or more source images — object removal, style swaps, retouching, content replacement — without requiring manual masks. ## Processing speed Note: This is an asynchronous operation. Once you create a task, it will be processed in the background. Use the universal `/v1/status` endpoint with your task ID to check progress, or pass `callback_url` to receive the final result automatically. ## Input JSON body. Required fields are `prompt` and `image_urls`. ## Parameters - `prompt` (string, required) – Edit instructions in natural language. - `image_urls` (array of strings, required) – Source image URLs. Limits: GPT Image 2 and Sunburst models 16, Gemini Image models 14, `flux2` 5, `qwen`/Grok Imagine models 3, Wan 2.7 models 9, `seedream-5-pro` 10, `seedream-5` 14. Within Gemini's total, `gemini-3.1-flash` supports up to 10 object and 4 character references; `gemini-3-pro` supports up to 6 object, 5 character, and 3 style references. - `model` (string, optional, default `"flux2"`) – Grok values are `"grok-imagine"`, `"grok-imagine-2"`, and `"grok-imagine-2-low"`; legacy `"grok"` is accepted as an alias. Other allowed values are `"flux2"`, `"qwen"`, `"gemini-3.1-flash"`, `"gemini-3-pro"`, `"seedream-5-pro"`, `"seedream-5"`, `"gpt-image-2"`, `"gpt-image-2.5-sunburst"`, `"wan2.7"`, and `"wan2.7-pro"`. - `quality` (optional, GPT Image only): Defaults to `medium`. GPT Image 2 accepts `low`, `medium`, `high`; Sunburst also accepts `xhigh` and `max`. Other models reject this parameter. Fixed prices depend on quality and resolution; `auto` is unsupported. - `resolution` (string, optional) – Grok models: `"1k"`/`"2k"`; Gemini Image models: `"1k"`/`"2k"`/`"4k"`; GPT Image 2 and Sunburst models: `"1k"`/`"2k"`/`"3k"`; `seedream-5-pro`: `"1k"`/`"2k"`; `seedream-5`: `"2k"`/`"3k"`/`"4k"`; Wan 2.7 models: `"1k"`/`"2k"`. Seedream and Wan 2.7 default to `"2k"`; other external models default to `"1k"`. GPT Image `3k` supports only `image_size=square`. - `image_size` (string, optional) – Output aspect/orientation. Allowed values: `"square"`, `"portrait_3_2"`, `"portrait_4_3"`, `"portrait_16_9"`, `"landscape_3_2"`, `"landscape_4_3"`, `"landscape_16_9"`. Seedream defaults to `"square"`. When omitted for models that preserve source proportions, the source aspect ratio is used. - `megapixel_ratio` (number, optional, default `1.0`) – Output megapixel scale relative to the source. Range `0.5`–`1.5`. - `seed` (integer, optional, default `-1`) – Reproducible random seed; `-1` means random. - `callback_url` (string, optional) – HTTP(S) URL to receive a POST callback when the task completes. For GPT Image 2 and Sunburst models, every source image in `image_urls` costs $0.02 in addition to the generated output image. ## Response HTTP 200 with a JSON object containing: - `task_id` (string) – ID of the queued edit task. - `status` (string) – Initial status reported by the queue. The edited image URL is delivered via `/v1/status` polling or via the `callback_url` payload as `result`. ## Example ### Request ```shell curl --user ":" \ -H "Content-Type: application/json" \ -d '{"prompt":"replace the sky with a sunset","image_urls":["https://example.com/photo.jpg"],"model":"flux2"}' \ https://api.everypixel.com/v1/image_edit ``` ```python import requests client_id = '' client_secret = '' response = requests.post( url="https://api.everypixel.com/v1/image_edit", json={ "prompt": "replace the sky with a sunset", "image_urls": ["https://example.com/photo.jpg"], "model": "flux2", "callback_url": "https://your-app.example/callback" # OPTIONAL }, auth=(client_id, client_secret), ) task_id = response.json().get("task_id") print(task_id) ``` ```php '; $client_secret = ''; $payload = json_encode([ "prompt" => "replace the sky with a sunset", "image_urls" => ["https://example.com/photo.jpg"], "model" => "flux2", ]); $ch = curl_init("https://api.everypixel.com/v1/image_edit"); curl_setopt($ch, CURLOPT_USERPWD, "$client_id:$client_secret"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); echo $data["task_id"]; ?> ``` ### Result Status code: 200 ```json { "task_id": "uuid", "status": "PENDING" } ``` Note: Asynchronous. Poll `/v1/status` with your `task_id`, or wait for the `callback_url` request to receive the final `result` URL. # Image Remove Background `POST https://api.everypixel.com/v1/image_remove_background` Remove an image's background with InSPyReNet. Send a JSON body with required `image_url` (HTTP(S) URL or image data URI) and optional `callback_url`. There is no `model` parameter. This endpoint requires the `image_edit` scope and uses its `inspyrenet` rate and eligible trial quota. ## Example ```shell curl --user ":" \ -H "Content-Type: application/json" \ -d '{"image_url":"https://example.com/photo.png"}' \ https://api.everypixel.com/v1/image_remove_background ``` The response contains `task_id` and `status`. Poll `GET /v1/status?task_id=...` for the output image URL in `result`. # Image Vectorize `https://api.everypixel.com/v1/image_vectorize` Converts a PNG, JPEG, or WebP raster image into SVG with Recraft. The source can be an HTTP(S) URL or a base64 data URI. ## Processing speed Note: This is an asynchronous operation. Poll `/v1/status` with the returned task ID, or provide `callback_url`. The final `result` is an SVG URL. ## Parameters - `image_url` (string, required) – PNG, JPEG, or WebP URL/data URI. Maximum 10 MB and 16 megapixels; the longest side must not exceed 4096 px and the shortest side must be at least 256 px. - `callback_url` (string, optional) – HTTP(S) URL to receive the completion payload. ## Example ```shell curl --user ":" \ -H "Content-Type: application/json" \ -d '{"image_url":"https://example.com/logo.png"}' \ https://api.everypixel.com/v1/image_vectorize ``` ### Result ```json { "task_id": "uuid", "status": "PENDING" } ``` # Image Upscale `https://api.everypixel.com/v1/image_upscale` The Image Upscale API increases the resolution of an image while preserving detail and texture. Use it for print, large-format display, or asset cleanup workflows. ## Processing speed Note: This is an asynchronous operation. Once you create a task, it will be processed in the background. Use the universal `/v1/status` endpoint with your task ID to check progress, or pass `callback_url` to receive the final result automatically. ## Input JSON body. Provide either `image_url` for an external image or `image_from_task_id` to upscale the result of a prior generation/edit task. ## Parameters - `model` (string, optional, default `"seedvr2"`) – `"seedvr2"` or `"flux2"`. Both are billed per processed image. - `image_url` (string, optional) – URL of the source image to upscale. - `image_from_task_id` (string, optional) – Task ID of a previous Image Generate or Image Edit call; the upscaler will pull that task's result as input. Useful for chaining without re-uploading. - `callback_url` (string, optional) – HTTP(S) URL to receive a POST callback when the task completes. Exactly one of `image_url` or `image_from_task_id` must be provided. ## Response HTTP 200 with a JSON object containing: - `task_id` (string) – ID of the queued upscale task. - `status` (string) – Initial status reported by the queue. The upscaled image URL is delivered via `/v1/status` polling or via the `callback_url` payload as `result`. ## Example ### Request ```shell curl --user ":" \ -H "Content-Type: application/json" \ -d '{"image_url":"https://example.com/small.jpg"}' \ https://api.everypixel.com/v1/image_upscale ``` ```python import requests client_id = '' client_secret = '' response = requests.post( url="https://api.everypixel.com/v1/image_upscale", json={ "image_url": "https://example.com/small.jpg", "callback_url": "https://your-app.example/callback" # OPTIONAL }, auth=(client_id, client_secret), ) task_id = response.json().get("task_id") print(task_id) ``` ```php '; $client_secret = ''; $payload = json_encode([ "image_url" => "https://example.com/small.jpg", ]); $ch = curl_init("https://api.everypixel.com/v1/image_upscale"); curl_setopt($ch, CURLOPT_USERPWD, "$client_id:$client_secret"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); echo $data["task_id"]; ?> ``` ### Result Status code: 200 ```json { "task_id": "uuid", "status": "PENDING" } ``` Note: Asynchronous. Poll `/v1/status` with your `task_id`, or wait for the `callback_url` request to receive the final `result` URL. # Video Generate `https://api.everypixel.com/v1/video_generate` `flux3` supports text-to-video and first/last-keyframe image-to-video with native audio. It accepts 5–20 output seconds, `720p`/`1080p`, and aspect ratios `21:9`, `2:1`, `16:9`, `4:3`, `1:1`, `3:4`, or `9:16`. Use `image_url` and optional `image_last_url` for keyframe generation. The Video Generate API produces short videos from text prompts (and optional reference images). Supported Grok models are `grok-imagine` for text-to-video or optional image-to-video and `grok-imagine-1.5` for image-to-video (requires a first frame). Legacy `grok`/`grok15` values are accepted as aliases. `ltx23` supports text-to-video plus image-to-video / first-and-last-frame. Google `veo-3.1` and `veo-3.1-fast` support text-to-video, first/last-frame interpolation, and guided generation with up to three reference images, with native audio at 720p–4K. `seedance2`, `seedance2-mini`, and `seedance2.5` provide text-to-video with optional generated audio; Seedance 2.5 supports 480p–1080p clips up to 30 seconds. Kling text-to-video models are `kling-2.6`, `kling-3`, `kling-3-turbo`, and `kling-3-omni`. Wan 2.7 and `wan3.0` automatically select text-to-video, first/last-frame image-to-video, or reference-to-video from the supplied fields. Wan 3.0 supports native audio, 480p–1080p, and clips up to 30 seconds. ## Processing speed Video generation is heavier than image generation; longer durations and higher resolutions take longer to render. Tasks are processed sequentially per account. Note: This is an asynchronous operation. Once you create a task, it will be processed in the background. Use the universal `/v1/status` endpoint with your task ID to check progress, or pass `callback_url` to receive the final result automatically. ## Input JSON body. The `model` field selects the request shape (`minimax-h3-turbo`/`minimax-h3`, `ltx23`, `flux3`, `grok-imagine`, `grok-imagine-1.5`, `veo-3.1`, `veo-3.1-fast`, `seedance2`, `seedance2-mini`, `seedance2.5`, `kling-2.6`, `kling-3`, `kling-3-turbo`, `kling-3-omni`, `wan2.7`, or `wan3.0`), each with its own optional fields. Common fields apply to all. Wan 2.7, Wan 3.0, and FLUX.3 media modes share the same endpoint. ## Parameters Common fields (all models): - `model` (string, required) – `"minimax-h3-turbo"`, `"minimax-h3"`, `"ltx23"`, `"flux3"`, `"grok-imagine"`, `"grok-imagine-1.5"`, `"veo-3.1"`, `"veo-3.1-fast"`, `"seedance2"`, `"seedance2-mini"`, `"seedance2.5"`, `"kling-2.6"`, `"kling-3"`, `"kling-3-turbo"`, `"kling-3-omni"`, `"wan2.7"`, or `"wan3.0"`. Legacy `"grok"`/`"grok15"` are aliases for the canonical Grok names. Pricing varies per model — see the Pricing page (https://labs.everypixel.com/pricing). - `prompt` (string, required) – Text description of the video. - `duration` (integer, required) – Output duration in seconds. Allowed range: 3–15 for MiniMax H3, 1–10 for LTX23 (1–15 for Grok Imagine models), 4, 6, or 8 for Veo 3.1, 4–15 for Seedance 2.0 models, 4–30 for Seedance 2.5, 5 or 10 for `kling-2.6`, and 3–15 for Kling 3 models. Veo 1080p/4K and Veo reference-image mode require 8 seconds. Wan 2.7 supports 2–15 seconds; its reference-to-video mode supports at most 10 seconds. Wan 3.0 supports 2–30 seconds; when reference videos are supplied, their total duration plus output duration must not exceed 30 seconds. - `resolution` (string, optional) – MiniMax H3 uses only `"768p"` (default). WAN/LTX/Grok support model-specific tiers from `"360p"` to `"1080p"`. Wan 2.7 supports `"720p"`/`"1080p"`; Wan 3.0 supports `"480p"`/`"720p"`/`"1080p"` and defaults to `"1080p"`. Veo 3.1 models support `"720p"`, `"1080p"`, and `"4k"`. Seedance and Kling tiers depend on the selected model. Pricing is per resolution — see the Pricing page (https://labs.everypixel.com/pricing). - `aspect_ratio` (string, optional) – `"16:9"`, `"9:16"`, or `"1:1"`. MiniMax H3 instead accepts `"7:4"` (default), `"4:7"`, or `"1:1"`. Other models default to `"16:9"`, except Wan 3.0 defaults to `"adaptive"`. Veo accepts only `"16:9"`/`"9:16"`. Wan 2.7 additionally supports `"4:3"` and `"3:4"`; Wan 3.0 also supports those values plus `"adaptive"`; Seedance 2.x models also support `"21:9"`. - `generate_audio` (boolean, optional, default `true` for Wan 3.0 and Seedance 2.x models) – Generate synchronized audio when the selected model supports it. Wan 3.0 audio does not change the price. - `seed` (integer, optional, default `-1`) – Reproducible random seed; `-1` means random. - `callback_url` (string, optional) – HTTP(S) URL to receive a POST callback when the task completes. `minimax-h3-turbo` and `minimax-h3` support text-to-video, first/last frames, or mixed references (9 images, 3 videos, 3 audio files), with audio included. Output duration may vary slightly from the request. Additional fields for image-to-video and reference-guided generation: - `image_url` (string) – Source image used as the first frame (image-to-video). Optional for `minimax-h3-turbo`/`minimax-h3`/`ltx23`/`grok-imagine`/Veo/Wan 2.7/Wan 3.0; required for `grok-imagine-1.5`. - `image_last_url` (string, optional, `minimax-h3-turbo`/`minimax-h3`, `ltx23`, Veo, Wan 2.7, and Wan 3.0) – Source image used as the last frame (combine with `image_url` for first-and-last-frame mode). - `reference_image_urls` (array, optional, MiniMax H3, Wan 2.7, Wan 3.0, or Veo) – Reference images for guided generation. MiniMax H3 accepts up to 9; all its reference inputs are exclusive with first/last frames. Wan 3.0 accepts up to 10; Veo accepts up to three, requires duration 8, and does not combine them with first/last frames. - `reference_video_urls` (array, optional, MiniMax H3 or Wan) – MiniMax H3 accepts up to 3 visual references, independently of image/audio counts. Wan 2.7 accepts up to 3 reference videos and 5 reference items total. Wan 3.0 accepts up to 5 reference videos with at most 15 seconds of input video total. - `reference_audio_urls` (array, optional, MiniMax H3) – Up to 3 audio references. Use HTTP(S) URLs or media-type base64 data URIs. Address references in the prompt as ``, `