Automette docs

Generate an image

POST
/api/v1/images/generate

Authorization

ApiKeyAuth
AuthorizationBearer <token>

API key from API Keys in the dashboard menu.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/images/generate" \  -H "Content-Type: application/json" \  -d '{    "prompt": "A flat icon of a blue paper document on a white background",    "aspect_ratio": "1:1"  }'
{  "file": {    "name": "string",    "mime_type": "string",    "url": "string",    "url_expires_in": 0  },  "model": "string",  "credits_used": 0}