> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/002_company/011_documents/025__get_company_ai_task.md).

# Get One Company AI Task

GraphQL endpoint: `/company`

A single task by id, for a client that has one and nothing else — a link to a task's runs, say. Null when the id isn't the caller's, which reads the same as one that doesn't exist.

## Query

```graphql
query ($id: ID!) {
  aiTask(id: $id) {
    id
    name
    runOnRoot
    folders { id name }
    prompt
    outputShape
    documentCount
    inFlightCount
  }
}

```

## Variables

```json
{
  "id": "00000000-0000-4000-8000-000000000001"
}
```

## Response

```json
{
  "data": {
    "aiTask": {
      "documentCount": 1,
      "folders": [],
      "id": "00000000-0000-4000-8000-000000000001",
      "inFlightCount": 0,
      "name": "task-8",
      "outputShape": {
        "total": "number"
      },
      "prompt": "Extract the invoice details from this document.",
      "runOnRoot": true
    }
  }
}
```
