Documentation


GET /v1/image

Primary endpoint of the Random Image API.

Examples

Query Parameters

Parameter Description
height

Height of the desired image, in pixels.

width

Width of the desired image, in pixels.

format

Response format, allows overriding a the Accept or Content-Type header of a request:

image
Redirects to the image in question. No attribution information is displayed.
text
Returns the full path to the image, hosted by a given provider. No attribution information is displayed.
json
Designed for consumption by 3rd parties, and includes a link to the image as well as licensing and attribution information.

provider

Select an image provider:

unsplash
The current default. Queries the Unsplash API for random images.
custom-v1:
[ABSOLUTE-URL]
EXPERIMENTAL! Allows parsing a custom Image Pool, adhering to v1 of this JSON schema.

category

Category of the image to be returned. Categories TBC.




GET /{width}/{height}

Short-hand endpoint for grabbing an image with a given width and height.

Examples

Parameters

Parameter Description
width

Width of the desired image, in pixels.

height

Height of the desired image, in pixels.