# Edits

*Given a prompt and an instruction, the model will return an edited version of the prompt.*

#### *Create edit*

*Creates a new edit for the provided input, instruction, and parameters*

{% code title="Example request" lineNumbers="true" %}

```
curl https://api.eye-ai.com/v1/edits \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
  "model": "text-davinci-edit-001",
  "input": "What day of the wek is it?",
  "instruction": "Fix the spelling mistakes"
}'
```

{% endcode %}

{% code title="Parameters" lineNumbers="true" %}

```
{
  "model": "text-davinci-edit-001",
  "input": "What day of the wek is it?",
  "instruction": "Fix the spelling mistakes",
}
```

{% endcode %}

{% code title="Response" lineNumbers="true" %}

```
{
  "object": "edit",
  "created": 1589478378,
  "choices": [
    {
      "text": "What day of the week is it?",
      "index": 0,
    }
  ],
  "usage": {
    "prompt_tokens": 25,
    "completion_tokens": 32,
    "total_tokens": 57
  }
}
```

{% endcode %}

\
[<br>](https://beta.openai.com/docs/api-reference/edits/create)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://eye-ai.gitbook.io/eye-ai/overview/introduction-of-the-eye-ai-api/edits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
