Ask Pyq AI with Formatted Output
This endpoint answers a query using documents in an index, and gives the output in a user-specified format.
Body Parameters
This is your account ID.
This is the query you wish to answer using documents from the given index.
This is the type you would like your answer to be in. str, int, float, bool, list[str], list[bool], list[int], list[float] are supported.
This is the name of the JSON field you wish to be populated.
This is a description of the field that will be populated. This helps the AI extract the correct information and make sure it is in the correct type.
This is the name of the index you wish to query with. This parameter is optional - if left blank will use auto indexing.
This is an optional parameter specifying if you would like to use Anthropic’s Claude instead of our default. The value “claude” will result in using that for your query.
Headers
This is your API token associated with your account.
Response
This will contain your response, formatted in the way you specified.
This contains a natural language response and relevant sources, as specified in the ask endpoint documentation.