Retrieve AI request

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This endpoint retrieves the details and results of a previously executed AI request, such as a diagram generation or diagram edit, using its unique request ID.

An example cURL request is:

curl --location 'https://app.eraser.io/api/ai-requests/$REQUEST-ID' \
  --header 'Authorization: Bearer $YOUR-TOKEN-HERE'

requestId is the unique identifier of the AI request. This value is returned when you create an AI request using the diagram generation or edit endpoints.

Note that you do not need to explicitly specify a team in the request, since your API token is scoped to a specific team.

An example response is:

{
  "id": "abc123def456",
  "inputs": [
    {
      "type": "text",
      "text": "Create a sequence diagram for a user authentication flow with 2FA"
    }
  ],
  "outputs": [
    {
      "type": "diagram",
      "diagramType": "sequence-diagram",
      "diagramTitle": "User Authentication with 2FA",
      "code": "User -> Login Page: Navigate\nLogin Page -> Auth Server: Submit credentials\nAuth Server -> User: Request 2FA code\nUser -> Auth Server: Submit 2FA\nAuth Server -> User: Return JWT token",
      "imageUrl": "https://IMAGE-URL"
    }
  ]
}

The response includes the original inputs provided to the AI request, along with any generated outputs such as diagram code, metadata, and rendered image URLs.

Full documentation of the endpoint below:

Path Params
string
required

ID of the AI request to retrieve. You can find this in the response of the /api/redner/prompts endpoint.

Query Params
string
enum

When true, returns the PNG image file directly instead of JSON response

Allowed:
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

400

The request is missing required parameters

403

Insufficient permissions to access this AI request

404

AI request not found or PNG file not available

500

Server error

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
image/png