> ## Documentation Index
> Fetch the complete documentation index at: https://prefect-bd373955-codex-docket-background-task-ha.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

#  

# `prefect artifact`

```command theme={null}
prefect artifact [OPTIONS] COMMAND [ARGS]...
```

<Info>
  Inspect and delete artifacts.
</Info>

## `prefect artifact ls`

```command theme={null}
prefect artifact ls [OPTIONS]
```

<Info>
  List artifacts.
</Info>

<AccordionGroup>
  <Accordion title="Options" defaultOpen>
    <ResponseField name="--limit">
      The maximum number of artifacts to return.
    </ResponseField>

    <ResponseField name="--all">
      Whether or not to only return the latest version of each artifact.
    </ResponseField>

    <ResponseField name="--output">
      Specify an output format. Currently supports: json
    </ResponseField>
  </Accordion>
</AccordionGroup>

## `prefect artifact inspect`

```command theme={null}
prefect artifact inspect [OPTIONS] KEY
```

<Info>
  View details about an artifact.
</Info>

<AccordionGroup>
  <Accordion title="Arguments" defaultOpen>
    <ResponseField name="KEY" type="string" required />
  </Accordion>

  <Accordion title="Options" defaultOpen>
    <ResponseField name="--limit">
      The maximum number of artifacts to return.
    </ResponseField>

    <ResponseField name="--output">
      Specify an output format. Currently supports: json
    </ResponseField>
  </Accordion>
</AccordionGroup>

<Note>
  **Example:**

  `$ prefect artifact inspect "my-artifact" --output json`

  ```json theme={null}
  [
    {
      "id": "ba1d67be-0bd7-452e-8110-247fe5e6d8cc",
      "created": "2023-03-21T21:40:09.895910+00:00",
      "updated": "2023-03-21T21:40:09.895910+00:00",
      "key": "my-artifact",
      "type": "markdown",
      "description": null,
      "data": "my markdown",
      "metadata_": null,
      "flow_run_id": "8dc54b6f-6e24-4586-a05c-e98c6490cb98",
      "task_run_id": null
    },
    {
      "id": "57f235b5-2576-45a5-bd93-c829c2900966",
      "created": "2023-03-27T23:16:15.536434+00:00",
      "updated": "2023-03-27T23:16:15.536434+00:00",
      "key": "my-artifact",
      "type": "markdown",
      "description": "my-artifact-description",
      "data": "my markdown",
      "metadata_": null,
      "flow_run_id": "ffa91051-f249-48c1-ae0f-4754fcb7eb29",
      "task_run_id": null
    }
  ]
  ```
</Note>

## `prefect artifact delete`

```command theme={null}
prefect artifact delete [OPTIONS] [KEY]
```

<Info>
  Delete an artifact.
</Info>

<AccordionGroup>
  <Accordion title="Arguments" defaultOpen>
    <ResponseField name="KEY" type="string">
      The key of the artifact to delete.
    </ResponseField>
  </Accordion>

  <Accordion title="Options" defaultOpen>
    <ResponseField name="--id">
      The ID of the artifact to delete.
    </ResponseField>
  </Accordion>
</AccordionGroup>

<Note>
  **Example:**

  ```bash theme={null}
  $ prefect artifact delete "my-artifact"
  ```
</Note>
