Image to Prompt
Convert images into descriptive text prompts using various AI models through the 1min.AI API. This endpoint analyzes your images and generates detailed text descriptions that can be used for various purposes.
Image Upload Requirement
Before using this API, you must first upload your image using the Asset API. The imageUrl parameter should contain the file path returned from the Asset API upload response.
📖 See Asset API documentation for details on how to upload images.
Available Models
Loading available models...
Request Parameters
All models share the same request structure:
| Field Name | Type | Supported Value | Description | Required |
|---|---|---|---|---|
| type | text | IMAGE_TO_PROMPT | Feature name | ✔️ |
| model | text | See available models | Model identifier | ✔️ |
| promptObject.imageUrl | string | File path | Path to uploaded image file (from Asset API) | ✔️ |
| promptObject.mode | string | describe | Processing mode (for some models) | ❌* |
| promptObject.n | number | 1-10 | Number of descriptions to generate | ❌* |
*Required for specific models (e.g., Midjourney requires mode and n)
Endpoint
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Code Example
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_TO_PROMPT",
"model": "midjourney",
"promptObject": {
"imageUrl": "development/images/sample_image.jpeg",
"mode": "describe",
"n": 1
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'IMAGE_TO_PROMPT',
model: 'midjourney',
promptObject: {
imageUrl: 'development/images/sample_image.jpeg',
mode: 'describe',
n: 1
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "IMAGE_TO_PROMPT",
"model": "midjourney",
"promptObject": {
"imageUrl": "development/images/sample_image.jpeg",
"mode": "describe",
"n": 1
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
Try the API directly in your browser:
Loading interactive playground...
Response Format
{}