Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.endprompt.ai/llms.txt

Use this file to discover all available pages before exploring further.

Endprompt supports three image workflows:
  • Image Generation — Create images from text descriptions
  • Vision / Image Analysis — Analyze images and return structured JSON
  • Image Editing — Modify existing images based on instructions

Setting Up Image Generation

Generate images by combining an image output field with an image generation model.
1

Create an Endpoint

Create an endpoint with text input fields for the image description.
2

Add an Image Output Field

In the Output Schema tab, add a field with type Image. This signals that the endpoint produces images instead of JSON.
3

Set Default Config (Optional)

Use the output field’s Example Value to store default generation parameters as JSON:
{
  "size": "1024x1024",
  "quality": "high"
}
4

Create a Prompt

Create a prompt and select an image generation model (e.g., gpt-image-1).
5

Configure Custom Parameters

Open the Custom Parameters panel on the prompt to set generation options:
[
  { "name": "size", "value": "1024x1536" },
  { "name": "quality", "value": "high" }
]
6

Write the Prompt

Write a descriptive prompt — no JSON output instructions needed. The rendered prompt is sent directly as the image description.
A professional product photo of {{ inputs.product_name }}.
Style: {{ inputs.style | default: "minimalist" }}.
Background: clean white studio lighting.
{{ inputs.additional_instructions }}
7

Test

Use the test runner to generate images and iterate on your prompt.
When an endpoint has image output fields, Endprompt automatically skips JSON output instructions and routes the request to the model’s image generation API.

Setting Up Vision / Image Analysis

Analyze images and return structured data by combining image inputs with a vision-capable model.
1

Create an Endpoint

Create an endpoint for your analysis workflow.
2

Add an Image Input Field

In the Input Schema tab, add a field with type Image.
3

Add Text/JSON Output Fields

Define your output schema as normal (string, number, object, etc.).
4

Create a Prompt

Select a vision-capable model: GPT-4o, Claude 3 Sonnet/Opus, or Gemini.
5

Write the Template

Describe what to analyze — the image is automatically included as visual context.
Analyze this product image and provide:
- A detailed description
- Up to 10 relevant tags
- Dominant colors (hex values)
- Suggested category

{% if inputs.focus %}
Pay special attention to: {{ inputs.focus }}
{% endif %}
Image inputs are not available as Liquid template variables. You cannot use {{ inputs.photo }} — the image data is sent separately as visual context to the model.
6

Test

Upload an image in the test runner and verify the structured output.

Image Editing

Edit existing images by combining image inputs with image outputs.
1

Set Up the Endpoint

Create an endpoint with:
  • An Image input field (the reference image)
  • An Image output field (the edited result)
  • Optional text inputs for edit instructions
2

Create a Prompt

Select an image generation model (e.g., gpt-image-1) and write your edit instructions:
{{ inputs.edit_instructions | default: "Enhance this image" }}
3

Test

Upload a reference image, provide edit instructions, and run the test.
When input images are present, Endprompt automatically routes to the provider’s image editing API instead of the generation API.

Custom Parameters Reference

Image generation parameters are configured per-prompt via the Custom Parameters panel. These parameters are model/provider-specific — consult your provider’s API documentation for supported values.

Parameter Precedence

Parameters are applied in this order (later values override earlier ones):
  1. Hardcoded defaults — Built-in sensible defaults
  2. Output Field Example Value — JSON config set on the image output field
  3. Custom Parameters — Per-prompt overrides from the Custom Parameters panel

Common OpenAI Image Parameters

ParameterValuesDescription
size1024x1024, 1024x1536, 1536x1024Output image dimensions
qualitylow, medium, high, autoGeneration quality level
n1 - 4Number of images to generate
backgroundauto, transparent, opaqueBackground style (PNG output)
Other providers may support different parameters. For example, Anthropic and Google have their own image APIs with different options. Always check the provider’s documentation.

Pricing

Image generation models typically use different pricing than text models:
  • Per-token pricing: Some models (gpt-image-1) charge based on input and output tokens, where image output tokens reflect resolution
  • Quality impact: Higher quality settings produce more output tokens and cost more
  • Size impact: Larger image dimensions increase output token usage
Check the LLM Models admin page for current per-model pricing.

Limitations

  • Maximum 16 input images per request for editing workflows
  • Supported input formats: JPEG, PNG, WebP
  • Images are sent as base64 data URIs — very large images increase request size and latency
  • Bulk CSV testing does not support image inputs
  • Image generation responses don’t include standard JSON output fields

Next Steps

Input Schema

Define image input fields

Output Schema

Configure image output fields

Custom Parameters

Set up generation parameters

Code Examples

Image API integration examples