Skip to content

Feature: Add /v1/images/edits endpoint #634

Description

@SantiagoDePolonia

Is your feature request related to a problem? Please describe.
GoModel does not implement the OpenAI-compatible /v1/images/edits endpoint (editing/inpainting an existing image given an image plus an optional mask and a prompt). No route, handler, or provider adapter exists anywhere in the codebase.

Describe the solution you'd like
Add a /v1/images/edits endpoint accepting the standard OpenAI multipart request shape (source image, optional mask image, prompt, model, size, n) and returning image data in the standard response shape.

This is harder than plain image generation (see the related image-generations issue) because it needs multipart/form-data request parsing for the image and mask uploads, which is a different request-parsing pattern than the JSON-only routes GoModel's router currently handles for most endpoints - the closest existing precedent would be whatever multipart handling already backs file uploads (/v1/files) or audio transcription uploads.

Describe alternatives you've considered
Building this at the same time as /v1/images/generations: reasonable if one contributor wants to take both, but they are filed separately since edits has materially more scope (multipart image/mask handling) than generations (plain JSON in/out).

Additional context
Suggested order: implement /v1/images/generations first (simpler, JSON-only), then use its provider adapter as a base for this endpoint's multipart handling.
First-provider target: OpenAI, since it expects the same multipart shape this endpoint needs to accept.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions