Organization AI ask
Unlock AI-driven answers for your organization's content and data.
Enhance your team's knowledge base with the Organization AI ask endpoint, which allows you to query AI models trained on your organization's GitBook content for quick, intelligent responses.
Ask a question to an AI across spaces that is accessible by the currently authenticated target.
The unique id of the organization
Output format for the content.
Return query details in the result
OK
POST /v1/orgs/{organizationId}/ask HTTP/1.1 Host: api.gitbook.com Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* Content-Length: 16 { "query": "text" }
OK
{ "answer": { "answer": { "markdown": "text" }, "followupQuestions": [ "text" ], "sources": [ { "type": "page", "reason": "text", "page": "text", "revision": "text", "space": "text", "sections": [ "text" ] } ] } }
The unique id of the organization
OK
GET /v1/orgs/{organizationId}/ask/questions HTTP/1.1 Host: api.gitbook.com Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
OK
{ "questions": [ "text" ] }
The unique id of the organization
OK
GET /v1/orgs/{organizationId}/ask/questions/stream HTTP/1.1 Host: api.gitbook.com Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
OK
{ "question": "text" }
Ask a question to an AI across spaces that is accessible by the currently authenticated target and stream the answer as a Server-Sent Events URL.
The unique id of the organization
Output format for the content.
Return query details in the result
OK
GET /v1/orgs/{organizationId}/ask/stream?query=text HTTP/1.1 Host: api.gitbook.com Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
OK
{ "type": "answer", "answer": { "answer": { "markdown": "text" }, "followupQuestions": [ "text" ], "sources": [ { "type": "page", "reason": "text", "page": "text", "revision": "text", "space": "text", "sections": [ "text" ] } ] } }
Was this helpful?