Ask Question
Endpoints
Ask Question
Ask a question to your Guru
POST
Ask Question
Ask a question to your AI-powered Q&A assistant and receive a detailed response with references.Documentation Index
Fetch the complete documentation index at: https://docs.gurubase.ai/llms.txt
Use this file to discover all available pages before exploring further.
To ask follow-up questions, include the
session_id from a previous response in your request. This allows the Guru to maintain context of the conversation.Path Parameters
The slug of the Guru to ask a question to
Headers
Your API key for authentication. You can obtain your API key from the Gurubase dashboard.
Body Parameters
The question to ask your Guru
Whether to stream the response or not. If true, only the content of the response will be returned in chunks.
Maintain conversation context for follow-up questions. When a question is asked, the response includes a session_id that can be used in subsequent requests. On the Gurubase platform, these conversation sessions are called “Binges”.
External user identifier for tracking user-specific conversation sessions. When provided, this ID is stored in the session. If a session already exists with a different external_user_id, the request will be rejected.
Fetch an existing answer. Do not ask a new question (generally used after streaming to fetch the answer fields like references etc.).
Optional list of image attachments to include with the question. Each item is an object with:
data(string): Base64-encoded image as a data URL, formatted asdata:<mime>;base64,<payload>(see theencode_binaryhelper in the “Asking With Attachments” example).name(string): File name (e.g.screenshot.png).type(string): MIME type (e.g.image/png).
Optional list of log file attachments to include with the question. Each item is an object with:
data(string): Raw UTF-8 log text (see theread_loghelper in the “Asking With Attachments” example). Not base64-encoded.name(string): File name (e.g.app.log).
Optional list of PDF attachments to include with the question. Each item is an object with:
data(string): Base64-encoded PDF as a data URL, formatted asdata:<mime>;base64,<payload>(see theencode_binaryhelper in the “Asking With Attachments” example).name(string): File name (e.g.doc.pdf).type(string): MIME type (typicallyapplication/pdf).
Response
Unique identifier for the question-answer pair
The answer in Markdown format
The original question
The date when the answer was generated
Confidence score of the answer (0-100)
Array of reference sources used to generate the answer
Unique identifier for the conversation session
URL link to open the question on the app
Whether the question can receive votes and feedback. Returns
false for simple interactions and clarifications, true for normal answers. See the Record Vote endpoint for more information on providing feedbacks and votes.When
stream=true, the response will be a text stream containing only the answer content in chunks, not the full JSON object. The JSON response format shown below applies only when stream=false (default).Code Examples
- Streaming and Fetching
- Asking With Attachments
Stream a response for real-time output, then fetch the completed answer to get metadata like
trust_score, references, and session_id.