Skip to main content

Images

Base URL: https://app.neuroflash.com/api/image-service

Upload an image into the workspace

POST/v1/workspaces/{workspaceId}/images

Creates an image in the workspace from the supplied URL or data URI. The returned id can be passed as input to image-edit-tasks or image-upscale-tasks.

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYes

Request Body

FieldTypeRequiredDescription
imageUrlstringYesHTTP(S) URL of the image to fetch, or an inline data: URI
fileNamestringYesDownload filename including the extension. Sanitized server-side (path components stripped, non-alphanumeric characters folded to dashes). Capped at 50 characters.

Response

FieldTypeDescription
idstringunique UUID
generationIdstringGroups every image produced by one generation request. Multiple rows can share the same generationId when a request asked for more than one image.
workspaceIdstringowning workspace ID
createdByUserIdstringuserId of the account that created this image
promptstringprompt that produced the image (empty for upscales or uploads)
modelstringmodel used to produce the image
parametersobjectgeneration parameters (aspect ratio, format, etc.)
inputImageIdsobjectIDs of any input images supplied for edit-tasks or upscale-tasks
fileNamestringHuman-readable filename (with extension) suitable for downloads. Uploads carry the user-supplied name; generations get an LLM-derived slug; edits/upscales suffix the input's name. Capped at 50 characters.
imageWidthobjectimage width in pixels
imageHeightobjectimage height in pixels
imageSizeobjectimage file size in bytes
createdAtstringcreation timestamp as ISO 8601
updatedAtstringlast update timestamp as ISO 8601
shareKeystringHMAC key authorizing this image's public share link (pass as ?key=)
_linksobject
contentstringtemporary url to the image binary
downloadstringtemporary url that forces a file download (content-disposition: attachment)

Example

curl -X POST "https://app.neuroflash.com/api/image-service/v1/workspaces/{workspace_id}/images" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "string",
"fileName": "string"
}'

Response:

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"generationId": "string",
"workspaceId": "string",
"createdByUserId": "string",
"prompt": "string",
"model": "string",
"parameters": {},
"inputImageIds": {},
"fileName": "string",
"imageWidth": {},
"imageHeight": {},
"imageSize": {},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"shareKey": "string",
"_links": {
"content": "string",
"download": "string"
}
}

List images in a workspace (paginated)

GET/v1/workspaces/{workspaceId}/images

Returns images crated by the authenticated user, newest first.

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYes

Query Parameters

ParameterTypeDefaultDescription
pageinteger11-based page number
sizeinteger50items per page (max 200)
generationIdstringfilter to images produced by a specific generation request (useful for fetching all N outputs of one POST/PUT call)
modelIdstringfilter to images produced by this model id

Response

FieldTypeDescription
pageobject
sizeintegernumber of elements requested per page
totalElementsintegertotal number of matching elements
totalPagesintegertotal number of pages
currentPageinteger1-based index of the returned page
dataarray<object>
idstringunique UUID
generationIdstringGroups every image produced by one generation request. Multiple rows can share the same generationId when a request asked for more than one image.
workspaceIdstringowning workspace ID
createdByUserIdstringuserId of the account that created this image
promptstringprompt that produced the image (empty for upscales or uploads)
modelstringmodel used to produce the image
parametersobjectgeneration parameters (aspect ratio, format, etc.)
inputImageIdsobjectIDs of any input images supplied for edit-tasks or upscale-tasks
fileNamestringHuman-readable filename (with extension) suitable for downloads. Uploads carry the user-supplied name; generations get an LLM-derived slug; edits/upscales suffix the input's name. Capped at 50 characters.
imageWidthobjectimage width in pixels
imageHeightobjectimage height in pixels
imageSizeobjectimage file size in bytes
createdAtstringcreation timestamp as ISO 8601
updatedAtstringlast update timestamp as ISO 8601
shareKeystringHMAC key authorizing this image's public share link (pass as ?key=)
_linksobject
contentstringtemporary url to the image binary
downloadstringtemporary url that forces a file download (content-disposition: attachment)

Example

curl "https://app.neuroflash.com/api/image-service/v1/workspaces/{workspace_id}/images" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"page": {
"size": 0,
"totalElements": 0,
"totalPages": 0,
"currentPage": 0
},
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"generationId": "string",
"workspaceId": "string",
"createdByUserId": "string",
"prompt": "string",
"model": "string",
"parameters": {},
"inputImageIds": {},
"fileName": "string",
"imageWidth": {},
"imageHeight": {},
"imageSize": {},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"shareKey": "string",
"_links": {
"content": "string",
"download": "string"
}
}
]
}

Get a single image's metadata

GET/v1/workspaces/{workspaceId}/images/{imageId}

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYes
imageIdstringYes

Response

FieldTypeDescription
idstringunique UUID
generationIdstringGroups every image produced by one generation request. Multiple rows can share the same generationId when a request asked for more than one image.
workspaceIdstringowning workspace ID
createdByUserIdstringuserId of the account that created this image
promptstringprompt that produced the image (empty for upscales or uploads)
modelstringmodel used to produce the image
parametersobjectgeneration parameters (aspect ratio, format, etc.)
inputImageIdsobjectIDs of any input images supplied for edit-tasks or upscale-tasks
fileNamestringHuman-readable filename (with extension) suitable for downloads. Uploads carry the user-supplied name; generations get an LLM-derived slug; edits/upscales suffix the input's name. Capped at 50 characters.
imageWidthobjectimage width in pixels
imageHeightobjectimage height in pixels
imageSizeobjectimage file size in bytes
createdAtstringcreation timestamp as ISO 8601
updatedAtstringlast update timestamp as ISO 8601
shareKeystringHMAC key authorizing this image's public share link (pass as ?key=)
_linksobject
contentstringtemporary url to the image binary
downloadstringtemporary url that forces a file download (content-disposition: attachment)

Example

curl "https://app.neuroflash.com/api/image-service/v1/workspaces/{workspace_id}/images/{image_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"generationId": "string",
"workspaceId": "string",
"createdByUserId": "string",
"prompt": "string",
"model": "string",
"parameters": {},
"inputImageIds": {},
"fileName": "string",
"imageWidth": {},
"imageHeight": {},
"imageSize": {},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"shareKey": "string",
"_links": {
"content": "string",
"download": "string"
}
}

Delete an image

DELETE/v1/workspaces/{workspaceId}/images/{imageId}

Only the owner of the image (createdByUserId) or a user with the NF_ADMIN, NF_CUSTOMER_SUPPORT, or ADMIN_SERVICE role can delete an image.

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYes
imageIdstringYes

Example

curl -X DELETE "https://app.neuroflash.com/api/image-service/v1/workspaces/{workspace_id}/images/{image_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"