---
title: "Api Ai Ask"
method: POST
path: "/api/ai/ask"
---

# Api Ai Ask

`POST /api/ai/ask`

## Request

- Base URL: `https://www.oxfordledge.com` (the document declares no server; this is the origin it was published from)
- URL: `https://www.oxfordledge.com/api/ai/ask`
- Auth: none declared

Server-side AI Q&A with mandatory retrieval + citations.

Body: {ticker: str, question: str, conversation_id?: str, request_id?: str,
       context?: {kind: "bdc", ticker?: str, borrower?: str, entry?: str}}
  `context` (SF-PRIVATE-CREDIT-COPILOT T3): the BDC / private-credit view the
  user is on. Validated by services/ai_copilot_grounding.parse_copilot_context
  (400 on a bad kind / ticker / borrower); effective only when
  PLATFORM_AI_PRIVATE_CREDIT is on.
Returns:
  - JSON (advisory refusal or error), or
  - SSE stream of LLM tokens terminated by a final
    `data: {"citations":[...], "grounded": bool, "grounding": ...}\n\n`
    then `data: [DONE]\n\n`.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api.md) · [All operations](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api/revisions/e832a1260f0b?raw)
