Designs
To generate new designs, send a POST request to the /api/design
endpoint with your template ID and desired edits. The response will include the new design ID and a URL for retrieving the generated image.
You can subsequently make GET requests to /api/design/:design_id
to retrieve the generated image at any time.
info
This endpoint is central to most ideate.xyz workflows.
endpoints
POST
/api/design
GET
/api/design/:design_id
Create a design
To create a new design, send a POST request to /api/design
with your template ID and desired edits.
The request body should be a JSON object containing:
template_id
: The ID of the template to use. This can be a template ID or design ID if you'd like to edit a previously generated design.edits
: A JSON object specifying the edits to apply to the design.
POST
/api/design
Example Request Body
{
"template_id": "a1b2c3d4e5f6g7h8i9j0",
"edits": {
"title": {
"value": "New and Improved!"
},
"image": {
"imageURL": "https://example.com/image.png"
}
}
}
Example Response Body
{
"status": 200,
"data": {
"design_id": "z1x2c3v4b5n6m7",
"url": "https://ideate.xyz/api/image/z1x2c3v4b5n6m7.png"
},
"error": null
}
Retrieve a design
To retrieve a design, send a GET request to /api/design/:design_id
with the ID of the desired design.
The response will be a JSON object containing:
created_at
: The creation timestamp of the design.template_id
: The ID of the base template used for the design.prev_design_id
: If this design was based on another design instead of a template, this will be the ID of the design. Used to track the history of design edits to a template.edits
: The edits applied to the design.url
: The URL of the generated image.
GET
/api/design/:design_id
Example Response Body
{
"status": 200,
"data": {
"created_at": "2024-01-01T00:00:00.000Z",
"template_id": "a1b2c3d4e5f6g7h8i9j0",
"edits": {
"title": {
"value": "New and Improved!"
}
},
"url": "https://ideate.xyz/designs/z1x2c3v4b5n6m7.png"
},
"error": null
}