curl --request GET \
--url https://api.budgetpixel.com/v1/stock/images \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.budgetpixel.com/v1/stock/images"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.budgetpixel.com/v1/stock/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.budgetpixel.com/v1/stock/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.budgetpixel.com/v1/stock/images"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.budgetpixel.com/v1/stock/images")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/stock/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"credits_charged": 10,
"data": [
{
"ai_generated": true,
"alt_text": "<string>",
"attribution": {
"html": "<string>",
"required": true,
"text": "“Mountain Goat On Rocky Ledge” by BudgetPixel AI (https://budgetpixel.com/images/mountain-goat-on-rocky-ledge-33643c7a) — CC BY 4.0"
},
"category": "<string>",
"colors": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"downloads": 123,
"height": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"license": {
"code": "CC-BY-4.0",
"name": "CC BY 4.0",
"url": "https://creativecommons.org/licenses/by/4.0/"
},
"model": "<string>",
"orientation": "landscape",
"page_url": "https://budgetpixel.com/images/mountain-goat-on-rocky-ledge-33643c7a",
"prompt": "<string>",
"quality_score": 123,
"style": "photo",
"tags": [
"<string>"
],
"title": "Mountain Goat On Rocky Ledge",
"urls": {
"large": "<string>",
"large_webp": "<string>",
"original": "<string>",
"small": "<string>",
"small_webp": "<string>"
},
"width": 123
}
],
"has_more": true,
"limit": 123,
"object": "list",
"offset": 123,
"total": 123
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}Search free stock images
Search BudgetPixel’s free stock image library (the images at budgetpixel.com/images): AI-generated photos, illustrations, backgrounds, wallpapers and textures, each reviewed before it is listed. Search only — nothing is generated when a query comes up empty.
Plans. Available on every plan, including Free — the one endpoint a Free plan’s API key can call.
Pricing. 10 credits per search, charged when the search succeeds,
including a search that matches nothing. Invalid parameters are refused with a
400 and cost nothing. POST /v1/cost with {"model": "stock-image-search"}
quotes the price (on paid plans).
Licence. Every image is licensed
CC BY 4.0. Wherever you use one,
credit it — each result carries a ready-made credit line (attribution.text, or
attribution.html for web pages) that meets the licence. Download the files
rather than hotlinking the URLs from production apps.
Search matches your words in each image’s title, tags, alt text, prompt and search keywords, best matches first. When a text query has few word matches, results found by meaning are added on the first page.
Besides the standard /v1 limits, searches are capped at 60 per minute per
account.
curl --request GET \
--url https://api.budgetpixel.com/v1/stock/images \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.budgetpixel.com/v1/stock/images"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.budgetpixel.com/v1/stock/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.budgetpixel.com/v1/stock/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.budgetpixel.com/v1/stock/images"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.budgetpixel.com/v1/stock/images")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/stock/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"credits_charged": 10,
"data": [
{
"ai_generated": true,
"alt_text": "<string>",
"attribution": {
"html": "<string>",
"required": true,
"text": "“Mountain Goat On Rocky Ledge” by BudgetPixel AI (https://budgetpixel.com/images/mountain-goat-on-rocky-ledge-33643c7a) — CC BY 4.0"
},
"category": "<string>",
"colors": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"downloads": 123,
"height": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"license": {
"code": "CC-BY-4.0",
"name": "CC BY 4.0",
"url": "https://creativecommons.org/licenses/by/4.0/"
},
"model": "<string>",
"orientation": "landscape",
"page_url": "https://budgetpixel.com/images/mountain-goat-on-rocky-ledge-33643c7a",
"prompt": "<string>",
"quality_score": 123,
"style": "photo",
"tags": [
"<string>"
],
"title": "Mountain Goat On Rocky Ledge",
"urls": {
"large": "<string>",
"large_webp": "<string>",
"original": "<string>",
"small": "<string>",
"small_webp": "<string>"
},
"width": 123
}
],
"has_more": true,
"limit": 123,
"object": "list",
"offset": 123,
"total": 123
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}Authorizations
API key as a bearer token: Authorization: Bearer bpx_live_xxx
Query Parameters
What the image should show, e.g. misty pine forest at sunrise. Up to 200 characters. Omit to browse (combine with category).
200nature, animals, food, travel, transportation, architecture, business, industry, technology, people, education, music, art, backgrounds, wallpapers, textures, abstract, holidays, science, health, sports landscape, portrait, square Dominant colour.
red, orange, yellow, green, turquoise, blue, purple, pink, white, gray, black, brown photo for photographs; illustration for everything else (illustration, 3D, painting, vector).
photo, illustration popular (default — with a query, best matches first), newest, or top (highest rated).
popular, newest, top 1 <= x <= 20Results to skip. The next page is offset + limit; each page is a new search.
0 <= x <= 5000Response
Matching images.