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
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Feature type identifier. Must be IMAGE_GENERATOR |
model | string | Yes | AI model identifier. Must be dall-e-2 |
promptObject | object | Yes | Configuration object containing all generation parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
prompt | string | Yes | Text description of the image to generate | - |
n | number | No | Number of images to generate (1-10) | 1 |
size | string | No | Image dimensions | 1024x1024 |
Supported Image Sizes
| Size | Resolution | Best For |
|---|---|---|
1024x1024 | 1024×1024 | High quality, detailed images |
512x512 | 512×512 | Standard quality, faster generation |
256x256 | 256×256 | Quick previews, thumbnails |
Code Examples
- cURL
- JavaScript
- Python
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"
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'IMAGE_GENERATOR',
model: 'dall-e-2',
promptObject: {
prompt: 'A surreal landscape with floating islands and rainbow waterfalls',
n: 2,
size: '1024x1024'
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "IMAGE_GENERATOR",
"model": "dall-e-2",
"promptObject": {
"prompt": "A surreal landscape with floating islands and rainbow waterfalls",
"n": 2,
"size": "1024x1024"
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresDescribe 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
-
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"
-
Creative Freedom: DALL-E 2 excels at artistic and imaginative content
- Perfect for surreal, fantastical, and abstract concepts
- Great for combining unusual elements creatively
-
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
-
Batch Generation: Generate multiple variations with
nparameter- Creates diverse interpretations of the same prompt
- Useful for exploring different creative directions
-
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