Images

Notes
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
List

API endpoint:

GET
http://mrbrainmaster.com/api/v1/images

Request example:

curl --location --request GET 'http://mrbrainmaster.com/api/v1/images' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Description
search
optional string
The search query.
search_by
optional string
Search by. Possible values are: name for Name. Defaults to: name.
resolution
optional string
Filter by resolution. Possible values are: 256x256 for 256×256, 512x512 for 512×512, 1024x1024 for 1024×1024.
style
optional string
Filter by style. Possible values are: 3d_render for 3D render, abstract for Abstract, anime for Anime, art_deco for Art deco, cartoon for Cartoon, digital_art for Digital art, illustration for Illustration, origami for Origami, pixel_art for Pixel art, photography for Photography, pop_art for Pop art, retro for Retro, sketch for Sketch, vaporwave for Vaporwave.
medium
optional string
Filter by medium. Possible values are: acrylic for Acrylic, canvas for Canvas, chalk for Chalk, charcoal for Charcoal, crayon for Crayon, glass for Glass, ink for Ink, pastel for Pastel, pencil for Pencil, spray_paint for Spray paint, watercolor for Watercolor.
filter
optional string
Filter by filter. Possible values are: grayscale for Black and white, sepia for Sepia, invert for Invert.
favorite
optional boolean
Filter by favorite.
sort_by
optional string
Sort by. Possible values are: id for Date created, name for Name. Defaults to: id.
sort
optional string
Sort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_page
optional integer
Results per page. Possible values are: 10, 25, 50, 100. Defaults to: 10.
Show

API endpoint:

GET
http://mrbrainmaster.com/api/v1/images/{id}

Request example:

curl --location --request GET 'http://mrbrainmaster.com/api/v1/images/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Store

API endpoint:

POST
http://mrbrainmaster.com/api/v1/images

Request example:

curl --location --request POST 'http://mrbrainmaster.com/api/v1/images' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}' \
--data-urlencode 'description={description}'
Parameter
Type
Description
name
required string
The image name.
description
required string
The image description for the AI.
resolution
required string
The resolution of the image. Possible values are: 256x256 for 256×256, 512x512 for 512×512, 1024x1024 for 1024×1024.
style
optional string
The style of the image. Possible values are: 3d_render for 3D render, abstract for Abstract, anime for Anime, art_deco for Art deco, cartoon for Cartoon, digital_art for Digital art, illustration for Illustration, origami for Origami, pixel_art for Pixel art, photography for Photography, pop_art for Pop art, retro for Retro, sketch for Sketch, vaporwave for Vaporwave.
medium
optional string
The medium of the image. Possible values are: acrylic for Acrylic, canvas for Canvas, chalk for Chalk, charcoal for Charcoal, crayon for Crayon, glass for Glass, ink for Ink, pastel for Pastel, pencil for Pencil, spray_paint for Spray paint, watercolor for Watercolor.
filter
optional string
The filter of the image. Possible values are: grayscale for Black and white, sepia for Sepia, invert for Invert.
Update

API endpoint:

PUT PATCH
http://mrbrainmaster.com/api/v1/images/{id}

Request example:

curl --location --request PUT 'http://mrbrainmaster.com/api/v1/images/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Description
name
optional string
The image name.
favorite
optional boolean
Whether the image is favorite or not.
Delete

API endpoint:

DELETE
http://mrbrainmaster.com/api/v1/images/{id}

Request example:

curl --location --request DELETE 'http://mrbrainmaster.com/api/v1/images/{id}' \
--header 'Authorization: Bearer {api_key}'