Skip to content

Azure OpenAI missing edits endpoint for gpt-image-1 #1485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
illgitthat opened this issue Apr 25, 2025 · 0 comments
Open
1 task done

Azure OpenAI missing edits endpoint for gpt-image-1 #1485

illgitthat opened this issue Apr 25, 2025 · 0 comments
Labels
azure Related to the Azure client / API bug Something isn't working

Comments

@illgitthat
Copy link

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

In https://github.com/openai/openai-node/blob/master/src/index.ts#L753

The AzureOpenAI client has an endpoint for /images/generations but does not contain an endpoint for '/images/edits'.

This causes a 404 error when attempting to call the edits endpoint with an AzureOpenAI client.

To Reproduce

const client = new AzureOpenAI({
  apiKey:   process.env.AZURE_OPENAI_API_KEY,
  endpoint: process.env.AZURE_OPENAI_ENDPOINT,
  apiVersion: process.env.OPENAI_API_VERSION,
});

(async () => {
  await client.images.edit({
    model: 'gpt-image-1',
    prompt: 'Make this black and white',
    image: await toFile('image_to_edit.png'),
    mask:  await toFile('mask.png'),
  });
})().catch(console.error);

Code snippets

OS

Linux

Node version

20.17

Library version

4.96.0

@illgitthat illgitthat added the bug Something isn't working label Apr 25, 2025
@RobertCraigie RobertCraigie added the azure Related to the Azure client / API label Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure Related to the Azure client / API bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants