Site AI
Build conversational AI agents for your docs site.
Build advanced conversational AI experiences within your docs site that go beyond basic Q&A.
Generate an AI response in a conversation.
Authorizations
Path parameters
organizationIdstringRequired
The unique id of the organization
siteIdstringRequired
The unique id of the site
Body
previousResponseIdstringOptional
The ID of the previous response to continue from
modelstring · enumOptionalPossible values:
Responses
200
OK
text/event-stream
Responseone of
or
or
or
or
or
or
post
POST /v1/orgs/{organizationId}/sites/{siteId}/ai/response HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 440
{
"previousResponseId": "text",
"input": [
{
"role": "user",
"content": "text",
"context": {
"location": {
"spaceId": "text",
"pageId": "text"
}
}
}
],
"model": "fast",
"tools": [
{
"name": "text",
"description": "text",
"inputSchema": {
"type": "object",
"properties": {
"ANY_ADDITIONAL_PROPERTY": {
"type": "string",
"description": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
}
}
],
"toolCall": {
"tool": "text",
"toolCallId": "text",
"output": {},
"summary": {
"icon": "gear",
"text": "text"
}
}
}200
OK
{
"type": "response_start",
"messageId": "text",
"task": {
"type": "respond_to_comment",
"spaceId": "text",
"changeRequestId": "text",
"commentId": "text"
}
}Last updated
Was this helpful?