Methexis (Stable Diffusion) - Image to Prompt
Convert images into descriptive text prompts using the Methexis (Stable Diffusion) AI model.
Endpoint
Request Body
The request must include the following parameters:
Parameter | Type | Required | Description |
---|---|---|---|
type | string | Yes | Feature type identifier. Must be IMAGE_TO_PROMPT |
model | string | Yes | Methexis (Stable Diffusion) model identifier |
promptObject | object | Yes | Feature-specific parameters |
Prompt Object Parameters
Parameter | Type | Required | Description |
---|---|---|---|
imageUrl | string | Yes | Path to the image that needs to be analyzed |
Example Request
- JavaScript
- cURL
- Python
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: 'methexis-inc/img2prompt:50adaf2d3ad20a6f911a8a9e3ccf777b263b8596fbd2c8fc26e8888f8a0edbb5',
promptObject: {
imageUrl: 'development/images/sample_image.jpeg'
}
})
})
curl --location 'https://api.1min.ai/api/features' --header 'API-KEY: <api-key>' --header 'Content-Type: application/json' --data '{
"type": "IMAGE_TO_PROMPT",
"model": "methexis-inc/img2prompt:50adaf2d3ad20a6f911a8a9e3ccf777b263b8596fbd2c8fc26e8888f8a0edb
b5",
"promptObject": {
"imageUrl": "development/images/2025_02_14_16_46_17_137_images.jpeg"
}
}'
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": "methexis-inc/img2prompt:50adaf2d3ad20a6f911a8a9e3ccf777b263b8596fbd2c8fc26e8888f8a0edbb5",
"promptObject": {
"imageUrl": "development/images/sample_image.jpeg"
}
}
response = requests.post(url, headers=headers, json=data)
Responses
Success Response (200)
Successful response contains the generated prompt.
{}