Skip to content

Issue while invoking Edit Image API #601

Open
@mohitkanwar

Description

@mohitkanwar

Describe the bug
While integrating with the latest Edit Image API
(POST https://api.openai.com/v1/images/edits)
by using the following code :

req := openai.ImageEditRequest{Image: file, Mask: maskFile, Prompt: prompt, N: count, Size: size, ResponseFormat: responseFormat}

	response, err = srvc.client.CreateEditImage(context.Background(), req)

We are getting the following error response from openAI :

error, status code: 500, message: The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID XXXXXXXXXXX in your email.)

This is a consistent response.
However, if we hit the API using HTTP client directly, it works fine.

The examples do not contain the examples on using this API, and the tests are working fine with mock.
So I am a bit stuck on using this client for Edit Images API

Environment :

  • go-openai version: v1.16.0
  • Go version: 1.21
  • OpenAI API version: v1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions