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
섹션 제목: “Authorizations”Request Bodyrequired
섹션 제목: “Request Bodyrequired”string format: binary
string format: binary
string format: binary
Responses
섹션 제목: “Responses”201
섹션 제목: “201”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"}400
섹션 제목: “400”Invalid request.
401
섹션 제목: “401”Sign-in required.
413
섹션 제목: “413”The image is over the byte limit.