curl --request POST \
--url https://nano-gpt.com/api/v1/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "chatgpt-4o-latest",
"prompt": "<string>",
"max_tokens": 4000,
"temperature": 0.7,
"top_p": 1,
"stream": false,
"stop": "<string>",
"frequency_penalty": 0,
"presence_penalty": 0
}'
{
"id": "<string>",
"object": "<string>",
"created": 123,
"model": "<string>",
"choices": [
{
"text": "<string>",
"index": 123,
"logprobs": {},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}
curl --request POST \
--url https://nano-gpt.com/api/v1/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "chatgpt-4o-latest",
"prompt": "<string>",
"max_tokens": 4000,
"temperature": 0.7,
"top_p": 1,
"stream": false,
"stop": "<string>",
"frequency_penalty": 0,
"presence_penalty": 0
}'
{
"id": "<string>",
"object": "<string>",
"created": 123,
"model": "<string>",
"choices": [
{
"text": "<string>",
"index": 123,
"logprobs": {},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Parameters for text completion
The body is of type object
.
Text completion response
The response is of type object
.