Skip to content

Serve an image by filename

GET
/api/v1/images/{filename}
curl --request GET \
--url http://localhost:11044/api/v1/images/example \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

Scoped to the authenticated user. The content type is derived from the file extension.

filename
required
string

The image’s stored file name with its extension, which sets the content type: jpg, jpeg, png, gif, webp or bmp, case-insensitive; any other extension is a 403. Looked up among the caller’s own chat images, then the world’s legacy data/images/

Image bytes with the image’s own content type

Media type*/*
object

Not an image file, or a path outside the images directory

Media type*/*

A refusal to serve an image: the file is not a supported image type, or its path escapes the images directory

object
error
required

Why the image was refused, written to be shown

string

Image not found