imagineart/imagineart-2.0
See pricing & more on mynth.io.
Capabilities
| |
|---|
| Modes | Text-to-image · Image-to-image |
| Inputs | Up to 4 images (image-to-image) |
| Native auto size | Yes (image-to-image) |
| Magic prompt | Improved (model-tuned) |
Magic prompt for this model is model-tuned for better results. Set magic_prompt: true to use
it.
Generate
import Mynth from "@mynthio/sdk";
const mynth = new Mynth();
const task = await mynth.image.generate({
prompt: "Architectural photograph of a brutalist library at golden hour",
model: "imagineart/imagineart-2.0",
size: "landscape",
count: 1,
});
console.log(task.urls);
curl https://api.mynth.io/image/generate \
-X POST \
-H "Authorization: Bearer $MYNTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Architectural photograph of a brutalist library at golden hour",
"model": "imagineart/imagineart-2.0",
"size": "landscape",
"count": 1
}'
Pass up to 4 input images for image-to-image. URLs or uploaded files both work. See Upload input images.
const task = await mynth.image.generate({
prompt: "Restyle this photo as a cinematic still",
model: "imagineart/imagineart-2.0",
inputs: ["https://example.com/input-image.jpg"],
size: "landscape",
});
curl https://api.mynth.io/image/generate \
-X POST \
-H "Authorization: Bearer $MYNTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Restyle this photo as a cinematic still",
"model": "imagineart/imagineart-2.0",
"inputs": [
{
"type": "image",
"source": { "type": "url", "url": "https://example.com/input-image.jpg" }
}
],
"size": "landscape"
}'
Auto size
This model supports native auto size in image-to-image mode.
size: "auto";
// or
size: {
type: "auto";
}
See Control size.
Magic prompt
Set magic_prompt: true to let Mynth rewrite your prompt before generation. This model has improved, model-tuned magic prompts.
const task = await mynth.image.generate({
prompt: "Architectural photograph of a brutalist library at golden hour",
model: "imagineart/imagineart-2.0",
magic_prompt: true,
size: "landscape",
});
curl https://api.mynth.io/image/generate \
-X POST \
-H "Authorization: Bearer $MYNTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Architectural photograph of a brutalist library at golden hour",
"model": "imagineart/imagineart-2.0",
"magic_prompt": true,
"size": "landscape"
}'
See Control prompts.