# Is Edit endpoint Documentation incorrect?

**URL:** <https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361>\
**Category:** API\
**Created:** [November 29, 2022, 2:20pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361 "2022-11-29T14:20:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tolga](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/tolga/32/12782_2.png) [@tolga](https://community.openai.com/u/tolga)\
**Post date:** [November 29, 2022, 2:20pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/1 "2022-11-29T14:20:39Z")

</div>

Edit Endpoint Documentation says the edit endpoint is

> POST [https://api.openai.com/v1/edits](https://api.openai.com/v1/edits)  
> but I get the below response whenever I want to use the endpoint.

```auto
{
  "error": {
    "message": "Invalid URL (POST /v1/edits)",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}

```

But also playground uses edit API as below

> Post [https://api.openai.com/v1/engines/text-davinci-edit-001/edits](https://api.openai.com/v1/engines/text-davinci-edit-001/edits)  
> Playground Request Body:  
> ![image](https://us1.discourse-cdn.com/openai1/original/2X/a/a0ed019d32ddfcde17b518ec05f2f06e107505ab.png)

Which one is the correct way to use API?

– PART 2 –

While I was playing with API to figure out how to use it, I realized that only some models are allowed to use with “Edit API”. Neither documentation nor error response doesn’t include information about this limitation. “Invalid URL (POST /v1/edits)” error disappeared after I started to use “text-davinci-edit-001” model. The error message was misleading. I think it should be more clear which models are good to use (or I couldn’t read the documentation properly, please help me find where it is 🙂 ).

---

<div class="post-metadata">

**Author:** ![paul.armstrong](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/paul.armstrong/32/15511_2.png) [@paul.armstrong](https://community.openai.com/u/paul.armstrong)\
**Post date:** [December 28, 2022, 10:37pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/2 "2022-12-28T22:37:23Z")

</div>

Thank you! This has been doing my head in. If you have any further insights on this endpoint I would be most grateful.

---

<div class="post-metadata">

**Author:** ![PaulBellow](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/paulbellow/32/597962_2.png) [@PaulBellow](https://community.openai.com/u/PaulBellow)\
**Post date:** [December 29, 2022, 2:21am UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/3 "2022-12-29T02:21:11Z")

</div>

I don’t use edit endpoint a lot at this time. With that said, the documentation does lag behind sometimes because OpenAI is moving as such a quick speed (even with all the safeguards they have in place). I know we just had someone using the wrong answers endpoint…

Thanks for sharing, though. It’s how we all improve!

---

<div class="post-metadata">

**Author:** ![karaatanasov](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/karaatanasov/32/15580_2.png) [@karaatanasov](https://community.openai.com/u/karaatanasov)\
**Post date:** [December 29, 2022, 11:33am UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/4 "2022-12-29T11:33:18Z")

</div>

I just hit the same error. The endpoint reports 404 Not Found with “Invalid URL (POST /v1/edits)” whenever it does not like the input. For example if TopP and Temperature are both set even to their default values of 1 this error comes up.

I had to add a bit of code to skip inputs when using the default values.

---

<div class="post-metadata">

**Author:** ![maccman](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/maccman/32/13680_2.png) [@maccman](https://community.openai.com/u/maccman)\
**Post date:** [January 3, 2023, 2:15am UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/5 "2023-01-03T02:15:15Z")

</div>

Just ran into this too. Error messages are very confusing.

---

<div class="post-metadata">

**Author:** ![dschnurr](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/dschnurr/32/1258_2.png) [@dschnurr](https://community.openai.com/u/dschnurr)\
**Post date:** [January 3, 2023, 8:32pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/6 "2023-01-03T20:32:44Z")

</div>

Our team is looking into this – thank you for raising the issue!

---

<div class="post-metadata">

**Author:** ![dzd123](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/dzd123/32/24307_2.png) [@dzd123](https://community.openai.com/u/dzd123)\
**Post date:** [January 27, 2023, 6:24pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/7 "2023-01-27T18:24:01Z")

</div>

Any update on this? Still happening…

![image](https://us1.discourse-cdn.com/openai1/original/3X/9/7/97f98b5b815ba69605571fb0610a86c189c82198.png)

---

<div class="post-metadata">

**Author:** ![logankilpatrick](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/logankilpatrick/32/14116_2.png) [@logankilpatrick](https://community.openai.com/u/logankilpatrick)\
**Post date:** [January 28, 2023, 1:03am UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/8 "2023-01-28T01:03:27Z")

</div>

Hey folks, thanks for calling this out and being patient, we have [updated the model parameter](https://beta.openai.com/docs/api-reference/edits/create#edits/create-model) to make it clear that the edits API only works with `text-davinci-edit-001` or the `code-davinci-edit-001` model.

---

<div class="post-metadata">

**Author:** ![ruby\_coder](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ruby_coder/32/19875_2.png) [@ruby\_coder](https://community.openai.com/u/ruby_coder)\
**Post date:** [January 28, 2023, 2:21am UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/9 "2023-01-28T02:21:12Z")

</div>

> [@logankilpatrick](#):
>
> Hey folks, thanks for calling this out and being patient

Thank you and the OpenAI team for being so responsive to developers in the community during this time of super-busy exponential growth for OpenAI.

Documentation always lags code and “who wants to polish documents anyway” haha

---

<div class="post-metadata">

**Author:** ![logankilpatrick](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/logankilpatrick/32/14116_2.png) [@logankilpatrick](https://community.openai.com/u/logankilpatrick)\
**Post date:** [January 30, 2023, 5:19pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/10 "2023-01-30T17:19:15Z")

</div>

Thanks for being patient! We are here to help, please keep the feedback coming : )

---

<div class="post-metadata">

**Author:** ![pauliewasson](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/pauliewasson/32/33664_2.png) [@pauliewasson](https://community.openai.com/u/pauliewasson)\
**Post date:** [February 23, 2023, 1:28pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/11 "2023-02-23T13:28:37Z")

</div>

Hi everyone, rookie here - ChatGPT has been helping me learn to code!  
I’ve specified the model as text-davinci-edit-001 but i’m still getting the { “error”: { “message”: “Invalid URL (POST /v1/edits)”, “type”: “invalid\_request\_error”, “param”: null, “code”: null }

Any ideas?

---

<div class="post-metadata">

**Author:** ![russell.powers45](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/russell.powers45/32/37615_2.png) [@russell.powers45](https://community.openai.com/u/russell.powers45)\
**Post date:** [March 2, 2023, 7:58pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/12 "2023-03-02T19:58:14Z")

</div>

so if you look in the new playground:[OpenAI API](https://platform.openai.com/playground/), you can do a call to say: “Mode” = “Complete” in the dropdown and use the model = “text-davinci-003”. then when you switch over to the example for “mode” = “edit” you cant use Model = “text-davinci-003” you need to change the Model to equal “text-davinci-edit-001” and it kinda works…but if you dont change the model, even in playground you see the error everyone is seeing here.

it is clear via the logic, you need more than one call to understand how this is working, and you must change the model to text-davinci-edit-001. im still seeing an issue, as I only get some kind of code back, not text when I try this in python. but im past the 404 error:)

it also works in the playground. API explorers are a most to learn this stuff:)

---

<div class="post-metadata">

**Author:** ![m.haziq.frt](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/m.haziq.frt/32/54196_2.png) [@m.haziq.frt](https://community.openai.com/u/m.haziq.frt)\
**Post date:** [March 24, 2023, 10:51am UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/13 "2023-03-24T10:51:57Z")

</div>

HI  
facing this issue on both models that are allowed for edit.

> openai.error.InvalidRequestError: The model: `code-davinci-edit-001` does not exist  
> openai.error.InvalidRequestError: The model: `text-davinci-edit-001` does not exist

any ideahow to resolve it?

openai version 0.27.0

---

<div class="post-metadata">

**Author:** ![alreadydeadxd](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/alreadydeadxd/32/35261_2.png) [@alreadydeadxd](https://community.openai.com/u/alreadydeadxd)\
**Post date:** [March 24, 2023, 5:25pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/14 "2023-03-24T17:25:15Z")

</div>

Hey! I’m facing the same issue here.

> The model: `text-davinci-edit-001` does not exist.

---

<div class="post-metadata">

**Author:** ![arzoop](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/arzoop/32/49500_2.png) [@arzoop](https://community.openai.com/u/arzoop)\
**Post date:** [March 25, 2023, 1:04pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/15 "2023-03-25T13:04:11Z")

</div>

`The model: 'text-davinci-edit-001' does not exist` This error persists when calling API through the endpoint `POST https://api.openai.com/v1/edits` and also in the Playground. Proof for the playground:

 ![image](https://us1.discourse-cdn.com/openai1/original/3X/c/5/c56ad3106795b3b37b185eed9a15e928ca998076.png)

---

<div class="post-metadata">

**Author:** ![zetepo\_openai](https://avatars.discourse-cdn.com/v4/letter/z/ee7513/32.png) [@zetepo\_openai](https://community.openai.com/u/zetepo_openai)\
**Post date:** [March 26, 2023, 9:16am UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/16 "2023-03-26T09:16:08Z")

</div>

I’ve been playing around with it using the Java OpenAI package and also got the 404 error. After finding this I tried the text-davinci-edit-001 model and also got the error that this model doesn’t exist.  
I made a call to get all the models ([OpenAI API](https://platform.openai.com/docs/api-reference/models)) and then pick one from there. But it’s always either the 404 or a 500 error.  
Following the link to the playground above shows that there is no model that you can select when picking “edit”. So I guess you have to simply use the Chat option and alter the prompt to include the input and instruction at the same time. That seems to work fine.

---

<div class="post-metadata">

**Author:** ![Xeen](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/xeen/32/56376_2.png) [@Xeen](https://community.openai.com/u/Xeen)\
**Post date:** [March 27, 2023, 9:29am UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/17 "2023-03-27T09:29:28Z")

</div>

Also facing this issue today. I’ve tried multiple models (including `text-davinci-edit-001` and `code-davinci-edit-001`)

The playground for “Edit” also doesn’t work with an error “The model: `text-davinci-edit-001` does not exist”

 ![image](https://us1.discourse-cdn.com/openai1/original/3X/b/a/ba4d5fd70675f776bc82b9527e56e111dd6ebc42.png)

---

<div class="post-metadata">

**Author:** ![hollat15](https://avatars.discourse-cdn.com/v4/letter/h/13edae/32.png) [@hollat15](https://community.openai.com/u/hollat15)\
**Post date:** [March 28, 2023, 7:55am UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/18 "2023-03-28T07:55:22Z")

</div>

Seems model “text-davinci-edit-001” start working but via API’s route /v1/edits. In Playground output remains the same as input.

---

<div class="post-metadata">

**Author:** ![morpeese](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@morpeese](https://community.openai.com/u/morpeese)\
**Post date:** [April 14, 2023, 2:12pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/19 "2023-04-14T14:12:42Z")

</div>

Having same issue as others with the API call via code not working but playground works and shows the following code but using the exact same values in app code does not work (completion api seems to be the only one that works):

curl [https://api.openai.com/v1/edits](https://api.openai.com/v1/edits)   
-H “Content-Type: application/json”   
-H “Authorization: Bearer $OPENAI\_API\_KEY”   
-d ‘{  
“model”: “code-davinci-edit-001”,  
“input”: “how are you”,  
“instruction”: “punctuate”,  
“temperature”: 0,  
“top\_p”: 1  
}’

---

<div class="post-metadata">

**Author:** ![logankilpatrick](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/logankilpatrick/32/14116_2.png) [@logankilpatrick](https://community.openai.com/u/logankilpatrick)\
**Post date:** [April 14, 2023, 2:22pm UTC](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361/20 "2023-04-14T14:22:18Z")

</div>

Can you share more details here? I am unable to replicate this error. The models and endpoint are both working for me.

[Next page](https://community.openai.com/t/is-edit-endpoint-documentation-incorrect/23361.md?page=2)
