Authentication
This endpoint requires a valid API key in the Authorization header.Path Parameters
The ID of the assistant that processed the question. Use
"default"
for the
general Wordsmith assistant, or the specific assistant ID used in the original
request.The session ID returned when the question was originally created.
Response
The unique identifier for this specific question.
The session ID that contains this question. This remains constant for all
questions within the same conversation session.
A direct URL to view this session in the Wordsmith web application. This
allows users to access the full conversation history and interact with the
assistant through the web interface.
The current status of the question:
"in_progress"
: The assistant is still
processing your question. "completed"
: Processing is complete and the answer
is available. "error"
: An error occurred during processing.The assistant’s response to your question. Only present when
status
is
"completed"
.Array of files generated by the assistant during processing. Only present when
status
is "completed"
and files were generated.Understanding IDs
ID vs Session ID
The response includes two important identifiers:id
: The unique identifier for this specific question. For the first question in a session, this equals the session_id. For follow-up questions, this is a unique feed item ID.session_id
: The session ID that contains this question. This remains constant for all questions within the same conversation.
- First question in a new session:
id
andsession_id
are the same - Follow-up question:
id
is a unique question ID,session_id
is the original session ID
id
field to check the status of individual questions, and the session_id
to identify which conversation session the question belongs to.
Polling Strategy
When using async mode, you can poll this endpoint to check for completion. Here’s a recommended polling strategy:Error Responses
File Download
When the response includes attachments, you can download them using the provided URLs:Best Practices
Polling Guidelines
- Start with short intervals: Begin with 2-3 second intervals for quick questions
- Use exponential backoff: Gradually increase intervals to reduce API calls
- Set reasonable timeouts: Most questions complete within 2-5 minutes
- Handle errors gracefully: Always check for error status and handle appropriately
File Management
- Download promptly: Attachment URLs expire after 24 hours
- Store locally if needed: Download and store important generated files
- Check file sizes: Large files may take time to generate and download
Performance Optimization
- Use webhooks when possible: More efficient than polling for production applications
- Cache results: Store completed responses to avoid unnecessary API calls
- Batch requests: If checking multiple questions, consider batching your requests
Use Cases
- Status checking: Monitor progress of long-running document analysis
- Result retrieval: Get answers after receiving webhook notifications
- Error handling: Check for and handle processing errors
- File downloads: Retrieve generated reports and analysis documents
- Integration workflows: Build automated systems that process legal documents