Upload a reference image for the next run
POST
/api/reference-images
const url = 'https://coggs.ai/api/reference-images';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'image/png'}, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://coggs.ai/api/reference-images \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: image/png' \ --data binarySend the image as the raw body with its Content-Type (image/png, image/jpeg or image/webp, up to 3,750,000 bytes and 2,000 pixels on a side). The server measures the bytes and answers the ReferenceImage to pass as referenceImage when you create a run. Repeating identical bytes refreshes the same attachment. An unused upload expires after 24 hours.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”string format: binary
string format: binary
string format: binary
Responses
Section titled “Responses”The stored image description.
Media typeapplication/json
object
sha256
required
string
type
required
string
bytes
required
integer
width
required
integer
height
required
integer
Example
{ "type": "image/png"}Invalid request.
Sign-in required.
The image is over the byte limit.