---
title: "Completion"
method: POST
path: "/api/v2/completion"
tags: ["Completion"]
---

# Completion

`POST /api/v2/completion`

Harvey's Completion API provides access to Harvey's models via our orchestration engine, allowing users to ask complex, freeform questions and receive detailed legal-grade responses programmatically. It can also be used in conjunction with files attached to the request, Vaults, and Regional Knowledge Sources. 

<Info>Access to this API requires `Assistant access via API` permission, which is only available in your workspace with an additional purchase. To get started, contact your Account Manager or reach out to us at support@harvey.ai to discuss an agreement.</Info>

## Query parameters

- `include_citations` boolean

## Response `200`

The response object includes the response field which is the completion of the input prompt sent to the model.

- object
  - `response` string — The completion of the input prompt.
  - `response_with_citations` string, nullable — The completion with inline citations, e.g. `[1][2]`, which correspond to the sources below. Only returned when `include_citations=true`.
  - `sources` object[], nullable — Contains the list of cited source snippets to support the answer. Only returned when `include_citations=true` and documents/knowledge sources were provided.
    - `citation_num` integer
    - `document_name` string
    - `page` integer, nullable
    - `text` string

## Other responses

- `400` — Bad request.
- `401` — Unauthorized.
- `429` — Rate limit exceeded.
- `500` — Internal server error.

---

[API](https://skmtc.dev/harvey/apis/harvey-client-matter-api.md) · [All operations](https://skmtc.dev/harvey/apis/harvey-client-matter-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/harvey/harvey-client-matter-api/revisions/4a9e0925d49e/schema)
