---
title: "Extract Citation"
method: POST
path: "/api/extract-citation"
---

# Extract Citation

`POST /api/extract-citation`

Extract the relevant excerpts from a tool_result that support a citation.

Given:
- tool_result: The full data returned by a tool call
- citation_id: The citation number (e.g., 1 for [1])
- text_with_citation: The text that cites this data (e.g., "There are 3 errors [1]")

Returns:
- excerpts: List of relevant chunks from tool_result that support the citation

## Request body

- CitationExtractionRequest
  - `tool_result` string, required
  - `citation_id` integer, required
  - `text_with_citation` string, required
  - `team_id` string, nullable

## Response `200`

Successful Response

- CitationExtractionResponse
  - `excerpts` string[], required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/deeptrace/apis/fastapi.md) · [All operations](https://skmtc.net/deeptrace/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeptrace/fastapi/versions/2e2a6de8aeda/schema)
