Browse documentation

Generate an image from a text prompt.

Generate an image from a text prompt.

POST
/v1/images/generations

Authorization

NRouterApiKey
AuthorizationBearer <token>

Your nRouter virtual key (sk-nrouter-…). Sent as Authorization: Bearer sk-nrouter-….

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

application/json

application/json

curl -X POST "https://example.com/v1/images/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "prompt": "string"  }'
{  "created": 1700000000,  "data": [    {      "b64_json": "<base64-png>"    }  ]}
Was this page helpful?