Serve an image by filename
GET
/api/v1/images/{filename}
const url = 'http://localhost:11044/api/v1/images/example';const options = {method: 'GET', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”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/
Responses
Section titled “Responses”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

