Skip to main content
POST
/
v1
/
sql
/
aiCompletion
cURL
curl --request POST \
  --url https://api.example.com/v1/sql/aiCompletion \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "role": "<string>",
      "content": "<string>"
    }
  ]
}
'
{
  "candidates": [
    {
      "content": {
        "parts": [
          {
            "text": "<string>"
          }
        ]
      }
    }
  ]
}

Body

application/json
messages
object[]

Response

OK

candidates
object[]

candidates is used for results with multiple choices and candidates. Used for OpenAI and Gemini.