zedge/bagel
Run zedge/bagel with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
| Field | Type | Default value | Description |
|---|---|---|---|
| prompt |
string
|
Text prompt for generation, editing, or understanding
|
|
| image |
string
|
Input image for editing or understanding tasks
|
|
| task |
None
|
text-to-image
|
Task to perform
|
| enable_thinking |
boolean
|
False
|
Enable chain-of-thought reasoning for better results
|
| cfg_text_scale |
number
|
4
Min: 1 Max: 20 |
Text guidance scale for how closely to follow the prompt
|
| cfg_img_scale |
number
|
1.5
Min: 1 Max: 10 |
Image guidance scale for preserving input image details
|
| num_inference_steps |
integer
|
50
Min: 1 Max: 100 |
Number of denoising steps
|
| timestep_shift |
number
|
3
Min: 1 Max: 10 |
Distribution of denoising steps between composition and details
|
| cfg_renorm_type |
None
|
global
|
CFG renormalization method
|
| cfg_renorm_min |
number
|
1
Max: 1 |
Minimum CFG renorm value
|
| seed |
integer
|
Random seed for reproducible results
|
|
| output_format |
None
|
webp
|
Output image format
|
| output_quality |
integer
|
90
Min: 1 Max: 100 |
Image compression quality for lossy formats
|
{
"type": "object",
"title": "Input",
"required": [
"prompt"
],
"properties": {
"seed": {
"type": "integer",
"title": "Seed",
"x-order": 10,
"description": "Random seed for reproducible results"
},
"task": {
"enum": [
"text-to-image",
"image-editing",
"image-understanding"
],
"type": "string",
"title": "task",
"description": "Task to perform",
"default": "text-to-image",
"x-order": 2
},
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 1,
"description": "Input image for editing or understanding tasks"
},
"prompt": {
"type": "string",
"title": "Prompt",
"x-order": 0,
"description": "Text prompt for generation, editing, or understanding"
},
"cfg_img_scale": {
"type": "number",
"title": "Cfg Img Scale",
"default": 1.5,
"maximum": 10,
"minimum": 1,
"x-order": 5,
"description": "Image guidance scale for preserving input image details"
},
"output_format": {
"enum": [
"webp",
"jpg",
"png"
],
"type": "string",
"title": "output_format",
"description": "Output image format",
"default": "webp",
"x-order": 11
},
"cfg_renorm_min": {
"type": "number",
"title": "Cfg Renorm Min",
"default": 1,
"maximum": 1,
"minimum": 0,
"x-order": 9,
"description": "Minimum CFG renorm value"
},
"cfg_text_scale": {
"type": "number",
"title": "Cfg Text Scale",
"default": 4,
"maximum": 20,
"minimum": 1,
"x-order": 4,
"description": "Text guidance scale for how closely to follow the prompt"
},
"output_quality": {
"type": "integer",
"title": "Output Quality",
"default": 90,
"maximum": 100,
"minimum": 1,
"x-order": 12,
"description": "Image compression quality for lossy formats"
},
"timestep_shift": {
"type": "number",
"title": "Timestep Shift",
"default": 3,
"maximum": 10,
"minimum": 1,
"x-order": 7,
"description": "Distribution of denoising steps between composition and details"
},
"cfg_renorm_type": {
"enum": [
"global",
"local",
"text_channel"
],
"type": "string",
"title": "cfg_renorm_type",
"description": "CFG renormalization method",
"default": "global",
"x-order": 8
},
"enable_thinking": {
"type": "boolean",
"title": "Enable Thinking",
"default": false,
"x-order": 3,
"description": "Enable chain-of-thought reasoning for better results"
},
"num_inference_steps": {
"type": "integer",
"title": "Num Inference Steps",
"default": 50,
"maximum": 100,
"minimum": 1,
"x-order": 6,
"description": "Number of denoising steps"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "object",
"title": "BagelOutput",
"properties": {
"text": {
"type": "string",
"title": "Text"
},
"image": {
"type": "string",
"title": "Image",
"format": "uri"
}
},
"description": "Output from BAGEL model inference"
}