Skip to main content

Endpoints

Get All History

Retrieves the execution history for all completed prompts.

Get Specific Prompt History

Retrieves the execution history for a specific prompt by its ID.

Query Parameters (All History)

integer
Maximum number of history items to return. If not specified, returns all history.
integer
Number of items to skip before returning results. Defaults to -1 (no offset). Use for pagination.

Path Parameters (Specific Prompt)

string
required
The unique identifier of the prompt to retrieve history for.

Response

Returns an object where each key is a prompt_id and the value contains the execution details.
object
Execution history for a specific prompt.

Example Request (All History)

Example Request (Specific Prompt)

Example Response

Python Example

Retrieving Generated Images

Once you have the history, use the /view endpoint to download images:

JavaScript Example

Managing History

Clear All History

Delete Specific History Items

Notes

History is stored in memory and will be cleared when the server restarts. For persistent storage, implement your own database layer.
Use the WebSocket API to receive real-time notifications when execution completes, then immediately fetch the history to get results.
The prompt array in the response includes sensitive data in position 5 (index 5), which is removed from queue responses but present in history. Handle this data carefully.

See Also