EYE AI
Search
K
Comment on page

Create completion

Creates a completion for the provided prompt and parameters
Example request
1
curl https://api.eye-ai.com/v1/completions \
2
-H 'Content-Type: application/json' \
3
-H 'Authorization: Bearer YOUR_API_KEY' \
4
-d '{
5
"model": "text-ada-001",
6
"prompt": "Say this is a test",
7
"max_tokens": 7,
8
"temperature": 0
9
}
Parameters
1
{
2
"model": "text-ada-001",
3
"prompt": "Say this is a test",
4
"max_tokens": 7,
5
"temperature": 0,
6
"top_p": 1,
7
"n": 1,
8
"stream": false,
9
"logprobs": null,
10
"stop": "\n"
11
}
Response
1
{
2
"id": "cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7",
3
"object": "text_completion",
4
"created": 1589478378,
5
"model": "text-ada-001",
6
"choices": [
7
{
8
"text": "\n\nThis is indeed a test",
9
"index": 0,
10
"logprobs": null,
11
"finish_reason": "length"
12
}
13
],
14
"usage": {
15
"prompt_tokens": 5,
16
"completion_tokens": 7,
17
"total_tokens": 12
18
}
19
}
Last modified 11mo ago