> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usehindsight.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Response

<Accordion title="Copy for AI context">
  ```text theme={null}
  POST https://app.usehindsight.com/api/v1/responses
  Authorization: Bearer YOUR_API_KEY
  Content-Type: application/json

  Request body:
  {
    "messages": [
      { "role": "user | assistant | system", "content": "string" }
    ],
    "stream": false
  }

  200 Response:
  {
    "message": {
      "role": "assistant",
      "content": "AI-generated response with inline citations",
      "citations": [
        {
          "document_id": "string",
          "document_name": "string",
          "deal_id": "string | null",
          "deal_name": "string | null",
          "url": "https://app.usehindsight.com/deals/deal_123/documents/viewer/doc_abc123",
          "excerpt": "string"
        }
      ]
    },
    "tool_calls": ["search_across_deals", "search_deal_documents"]
  }

  Rate limits: 10 req/min (Essentials), 60 req/min (Growth), 300 req/min (Enterprise)
             10,000/mo (Essentials), 30,000/mo (Growth), 100,000/mo (Enterprise)
  ```
</Accordion>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://app.usehindsight.com/api/v1/responses \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "messages": [
        {
          "role": "user",
          "content": "What security objections have we encountered with Enterprise customers?"
        }
      ],
      "stream": false
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://app.usehindsight.com/api/v1/responses', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      messages: [{ role: 'user', content: 'What security objections have we encountered?' }],
      stream: false
    })
  });

  const data = await response.json();
  console.log(data.message.content);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://app.usehindsight.com/api/v1/responses',
      headers={
          'Authorization': f'Bearer {API_KEY}',
          'Content-Type': 'application/json'
      },
      json={
          'messages': [{'role': 'user', 'content': 'What security objections have we encountered?'}],
          'stream': False
      }
  )

  data = response.json()
  print(data['message']['content'])
  ```
</RequestExample>
