Company logoTrust Center Documentation

Create ask request

Submit a question for AI-assisted answer generation. The endpoint creates a persisted ask record and queues a background generation job. If the job reaches a…

POST
/api/v1/ask

Submit a question for AI-assisted answer generation.

The endpoint creates a persisted ask record and queues a background generation job. If the job reaches a terminal state quickly, a terminal response is returned with HTTP 200. Otherwise, an in-progress response is returned with HTTP 202.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/ask" \  -H "Content-Type: application/json" \  -d '{    "question": "Do you have a SOC 2 report available?",    "question_type": "text"  }'

{  "id": "ask_1",  "object": "response",  "status": "completed",  "created_at": 1771920000,  "output": [    {      "type": "message",      "id": "msg_ask1",      "role": "assistant",      "status": "completed",      "content": [        {          "type": "output_text",          "text": "Yes, a SOC 2 report is available under NDA."        }      ]    }  ],  "usage": {    "input_tokens": 125,    "output_tokens": 42,    "total_tokens": 167  }}

How is this guide?