POST
/
talk-to-gpt
curl --request POST \
  --url https://nano-gpt.com/api/talk-to-gpt \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "prompt": "Please explain the concept of artificial intelligence.",
  "model": "chatgpt-4o-latest",
  "messages": [
    {
      "role": "user",
      "content": "Hi, I'\''m just testing!"
    }
  ]
}'
"<string>"

Authorizations

x-api-key
string
header
required

Body

application/json

Parameters for talking to GPT

The body is of type object.

Response

200
text/plain

Talk to GPT response

Text response followed by metadata in <NanoGPT> tags