Skip to main content
POST
/
v1
/
insights
/
ai
/
generate
Generate a SbQL query from natural language
curl --request POST \
  --url https://public-api.sessionboard.com/v1/insights/ai/generate \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "eventId": 123,
  "eventIds": [
    123
  ],
  "conversationHistory": [
    {
      "role": "<string>",
      "content": "<string>"
    }
  ]
}
'
{
  "query": "<string>",
  "explanation": "<string>"
}

Authorizations

x-access-token
string
header
required

API key for authentication. Obtain from the Sessionboard admin dashboard.

Body

application/json
prompt
string
required

Natural language description of the data you want to query.

Example:

"Show me all accepted sessions with their speakers"

eventId
integer

Scope to a single event for context.

eventIds
integer[]

Scope to multiple events for context.

conversationHistory
object[]

Previous conversation turns for multi-turn query refinement.

Response

OK

query
string

The generated SbQL query.

explanation
string

Human-readable explanation of the generated query.