POST
/
query
curl --request POST \
  --url https://api.greptile.com/v2/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-GitHub-Token: <api-key>' \
  --data '{
  "messages": [
    {
      "id": "<string>",
      "content": "<string>",
      "role": "<string>"
    }
  ],
  "repositories": [
    {
      "remote": "<string>",
      "branch": "<string>",
      "repository": "<string>"
    }
  ],
  "sessionId": "<string>",
  "stream": true,
  "genius": true
}'
{
  "type": "<string>",
  "message": "<string>"
}

Submits a query and returns the response, with optional streaming.

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

X-GitHub-Token
string
headerrequired

Body

application/json
messages
object[]
repositories
object[]
sessionId
string

Optional, defaults to a new session.

stream
boolean

Optional, default false.

genius
boolean

Optional, default false. Genius requests are smarter but slower, great for heavy usecases like PR reviews and documentation updaters.

Response

200 - application/json
type
string
message
string