Image model API

DALL-E 2 API

DALL·E 2 creates realistic images and art from a natural language description. Older than DALL·E 3, DALL·E 2 offers more control in prompting and more requests at once.

Model id
dall-e-2
Takes
Text (required)
Makes
Image
Endpoint
POST /api/v1/images/generations
Made by
OpenAI
Mode
Synchronous

Call DALL-E 2

Base URL https://payload.rentprompts.com/api/v1. Replace the placeholder with your key.

Model dall-e-2

POST /api/v1/images/generations

curl https://payload.rentprompts.com/api/v1/images/generations \
  -H "Authorization: Bearer rp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "dall-e-2",
  "prompt": "A lighthouse at dusk, watercolor",
  "n": 1
}'

Replace rp_live_YOUR_KEY with your key, ideally via the RENTPROMPTS_API_KEY environment variable. Keys are shown only once, so they are never filled in here. Get your API key →

What a typical call costs

Worked out from DALL-E 2's published price (2.74 J / image). You pay only for successful results, from your Joule balance.
  • 1 image2.74 Joules
  • 4 images10.96 Joules

Send requests to POST /api/v1/images/generations. DALL-E 2 answers synchronously: the result comes back in the response to the same request.

Settings

Optional parameters this model accepts (pass them in settings on /v1/run, or as top-level fields where OpenAI defines them).

This model has no extra settings. Send the standard fields shown in the example.

DALL-E 2 API — Pricing & Code Examples | RentPrompts