Image

POST
/v1/images/generations

Creates an image from a text prompt (OpenAI-compatible).

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.vivgrid.com/v1/images/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-image-1",    "prompt": "A cozy reading nook with plants and warm light",    "size": "1024x1024",    "response_format": "url"  }'
{
  "created": 1710000000,
  "data": [
    {
      "url": "https://example.com/image.png"
    }
  ]
}
{
  "error": {
    "message": "string",
    "type": "string",
    "param": "string",
    "code": "string"
  }
}