> ## Documentation Index
> Fetch the complete documentation index at: https://docs.poyo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Seedream-5.0-Flash Image Generation

> Fast Seedream image generation and reference-image editing

<Tip>
  1. After submission, a `task_id` will be returned. If you provided a `callback_url`, a POST request will be sent to it when the task finishes or fails.
  2. You can also retrieve the result through the unified [Query Task Status](/api-manual/task-management/status) endpoint.
</Tip>

# Seedream-5.0-Flash Image Generation

Seedream-5.0-Flash generates images from text or edits images using up to 10 references. Each request produces one image.

## Available Models

* **seedream-5.0-flash** - Text-to-image generation
* **seedream-5.0-flash-edit** - Image editing with 1–10 reference images

## Size Parameter

`input.size` controls the output aspect ratio. If omitted, the system uses `1:1`:

* Ratio preset: `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `2:3`, `3:2`, `21:9`

## Resolution Parameter

`input.resolution` controls the output resolution. If omitted, the system uses `1K`:

* Resolution preset: `1K`, `1.5K`, `2K`

## Pricing

Each request generates one image and uses the current Seedream-5.0-Flash price.

## How to Call

Use the unified submit endpoint: `POST /api/generate/submit`

Text-to-image example:

```bash theme={null}
curl --request POST \
  --url https://api.poyo.ai/api/generate/submit \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedream-5.0-flash",
    "callback_url": "https://your-domain.com/callback",
    "input": {
      "prompt": "A colorful editorial poster for a neighborhood flower shop, with crisp typography and warm morning light",
      "size": "3:4",
      "resolution": "1.5K",
      "output_format": "png"
    }
  }'
```

Edit example:

```bash theme={null}
curl --request POST \
  --url https://api.poyo.ai/api/generate/submit \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedream-5.0-flash-edit",
    "input": {
      "prompt": "Place the product from the second image on the table in the first image, preserving its shape and label",
      "image_urls": [
        "https://example.com/table.jpg",
        "https://example.com/product.png"
      ],
      "size": "4:3",
      "resolution": "2K",
      "enable_safety_checker": true
    }
  }'
```


## OpenAPI

````yaml api-manual/image-series/seedream-5-0-flash.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Seedream-5.0-Flash API
  description: Fast Seedream image generation and reference-image editing
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Seedream-5.0-Flash
      summary: Submit Seedream-5.0-Flash Generation Task
      description: >-
        Text-to-image and reference-image editing with aspect ratio and
        resolution controls
      operationId: submitSeedream50FlashTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              seedream-5-0-flash:
                summary: Text-to-Image Generation
                value:
                  model: seedream-5.0-flash
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A colorful editorial poster for a neighborhood flower
                      shop, with crisp typography and warm morning light
                    size: '3:4'
                    resolution: 1.5K
                    output_format: png
              seedream-5-0-flash-edit:
                summary: Image Editing with References
                value:
                  model: seedream-5.0-flash-edit
                  input:
                    prompt: >-
                      Place the product from the second image on the table in
                      the first image, preserving its shape and label
                    image_urls:
                      - https://example.com/table.jpg
                      - https://example.com/product.png
                    size: '4:3'
                    resolution: 2K
                    enable_safety_checker: true
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: Seedream-5.0-Flash model identifier
          enum:
            - seedream-5.0-flash
            - seedream-5.0-flash-edit
        callback_url:
          type: string
          format: uri
          description: Webhook callback URL for result notifications
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          description: Input parameters for generation or editing
          properties:
            prompt:
              type: string
              minLength: 1
              maxLength: 5000
              description: Generation or edit prompt describing the desired output
            image_urls:
              type: array
              items:
                type: string
                format: uri
              minItems: 1
              maxItems: 10
              description: >-
                Required for seedream-5.0-flash-edit only; provide 1–10
                reference image URLs
            size:
              type: string
              description: Output aspect ratio preset; defaults to 1:1 when omitted
              enum:
                - '1:1'
                - '4:3'
                - '3:4'
                - '16:9'
                - '9:16'
                - '2:3'
                - '3:2'
                - '21:9'
              default: '1:1'
            resolution:
              type: string
              description: Output resolution preset; defaults to 1K when omitted
              enum:
                - 1K
                - 1.5K
                - 2K
              default: 1K
            output_format:
              type: string
              description: Output image format
              enum:
                - jpeg
                - png
            enable_safety_checker:
              type: boolean
              description: Safety checker switch; defaults to true when omitted
              default: true
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
            status:
              type: string
              enum:
                - not_started
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-10-08T10:30:00'
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: All API endpoints require Bearer Token authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.