Skip to main content

DALL-E 2 - Image Generator

Generate high-quality images from text prompts using OpenAI's DALL-E 2. Known for its creative interpretations and artistic capabilities, DALL-E 2 excels at producing unique and imaginative visual content from descriptive text.

Endpoint

Request Headers

FieldValue
API-KEY<api-key>
Content-Typeapplication/json

Parameters

ParameterTypeRequiredDescription
typestringYesFeature type identifier. Must be IMAGE_GENERATOR
modelstringYesAI model identifier. Must be dall-e-2
promptObjectobjectYesConfiguration object containing all generation parameters

Prompt Object Parameters

ParameterTypeRequiredDescriptionDefault
promptstringYesText description of the image to generate-
nnumberNoNumber of images to generate (1-10)1
sizestringNoImage dimensions1024x1024

Supported Image Sizes

SizeResolutionBest For
1024x10241024×1024High quality, detailed images
512x512512×512Standard quality, faster generation
256x256256×256Quick previews, thumbnails

Code Examples

curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_GENERATOR",
"model": "dall-e-2",
"promptObject": {
"prompt": "A surreal landscape with floating islands and rainbow waterfalls",
"n": 2,
"size": "1024x1024"
}
}'

Interactive Playground

API Playground

https://api.1min.ai/api/features
Describe the image you want to generate
Number of images to generate (1-10)
Choose image dimensions

Generated cURL Command:

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_GENERATOR",
"model": "dall-e-2",
"promptObject": {
"prompt": "A surreal landscape with floating islands and rainbow waterfalls",
"n": 1,
"size": "1024x1024"
}
}'

Response Format

{
"aiRecord": {
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"userId": "user-12345",
"teamId": "team-67890",
"teamUser": {
"teamId": "team-67890",
"userId": "user-12345",
"userName": "John Doe",
"userAvatar": "https://example.com/avatar.jpg",
"status": "ACTIVE",
"role": "ADMIN",
"creditLimit": 100000000,
"usedCredit": 12000,
"createdAt": "2025-01-01T00:00:00.000Z",
"createdBy": "SYSTEM",
"updatedAt": "2025-01-15T10:30:00.000Z",
"updatedBy": "SYSTEM"
},
"model": "dall-e-2",
"type": "IMAGE_GENERATOR",
"metadata": null,
"rating": null,
"feedback": null,
"conversationId": null,
"status": "SUCCESS",
"createdAt": "2025-01-15T10:30:00.000Z",
"aiRecordDetail": {
"promptObject": {
"prompt": "A surreal landscape with floating islands and rainbow waterfalls",
"n": 2,
"size": "1024x1024"
},
"resultObject": [
"development/images/2025_01_15_10_30_15_001_surreal_landscape.png",
"development/images/2025_01_15_10_30_15_002_surreal_landscape.png"
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2025_01_15_10_30_15_001_surreal_landscape.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=EXAMPLE_CREDENTIAL&X-Amz-Date=20250115T103000Z&X-Amz-Expires=604800&X-Amz-Signature=example_signature&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"
}
}

Use Cases

  • Creative Art: Generate unique artistic interpretations and abstract concepts
  • Concept Development: Create visual concepts for creative projects
  • Marketing Materials: Produce eye-catching visuals for campaigns
  • Social Media Content: Generate engaging images for posts and stories
  • Educational Content: Create illustrations for learning materials

Tips for Best Results

  1. Descriptive Prompts: Be specific and vivid in your descriptions

    • Good: "A steampunk airship flying through clouds at sunset with brass fittings and billowing sails"
    • Avoid: "A flying machine"
  2. Creative Freedom: DALL-E 2 excels at artistic and imaginative content

    • Perfect for surreal, fantastical, and abstract concepts
    • Great for combining unusual elements creatively
  3. Image Sizes: Choose based on your use case:

    • 1024x1024: Best for final artwork and detailed images
    • 512x512: Good balance of quality and speed
    • 256x256: Quick previews and thumbnails
  4. Batch Generation: Generate multiple variations with n parameter

    • Creates diverse interpretations of the same prompt
    • Useful for exploring different creative directions
  5. Prompt Length: Keep prompts concise but descriptive

    • DALL-E 2 works well with clear, focused descriptions
    • Avoid overly complex or contradictory instructions

Notes

  • DALL-E 2 automatically revises prompts for better results and safety
  • The model excels at creative and artistic interpretations
  • Generated images are unique on each request, even with identical prompts
  • Best suited for creative and artistic applications rather than photorealistic content