Prompt → Diagram (AI)

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

The prompt. The input code or natural language which describes a diagram.

string
enum

Select desired diagram type. Will automatically detect diagram type when unspecified.

Allowed:
string
enum

Select "standard" for GPT-4.1 or "premium" for o4-mini-high. Defaults to "standard"

Allowed:
string

ID of a previous request to edit. When provided, the API will edit the diagram from that request.

attachments
array of objects

File attachments to provide context for diagram generation. Accepts PNG, JPEG, and PDF files.

attachments
string

ID of a reference library to use as context for generation. Find contextId in the reference library page (https://app.eraser.io/dashboard/ai-context).

git
object
deprecated

Deprecated. Use gitContexts instead.

gitContexts
array

Git repository contexts for diagram generation. Supports one or more repositories. Use publicRepoUrl for public repos, or repoName and orgName for private repos connected to your team.

gitContexts
boolean

When true, returns the image as a file stream instead of a URL.

boolean
deprecated

Deprecated. Use returnImageAsFile instead.

fileOptions
object

Options for creating an Eraser file immediately with granular link access settings, rather than returning a URL for manual creation.

boolean

Select transparent (false) or solid (true) background. Defaults to false.

string
enum

Select "light" or "dark" theme. Defaults to "light".

Allowed:
integer
enum

Image quality/resolution multiplier. Use 1 (low), 2 (medium), or 3 (high). Defaults to 2.

Allowed:
integer
enum
deprecated

Deprecated. Use imageQuality instead.

Allowed:
Responses

400

The request is missing required parameters or validation failed

403

Unauthorized

404

Prior request or context not found

500

Eraser was unable to generate a result

503

Service temporarily unavailable. This may be the result of too many requests.

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