---
title: " "
sidebarTitle: prefect artifact
---

# `prefect artifact`



```command
prefect artifact [OPTIONS] COMMAND [ARGS]...
```



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








## `prefect artifact ls`



```command
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>

</Accordion>

</AccordionGroup>



## `prefect artifact inspect`



```command
prefect artifact inspect [OPTIONS] KEY
```



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






<AccordionGroup>


<Accordion title="Arguments" defaultOpen>
<ResponseField name="KEY" type="string" required>
    \[required]
</ResponseField>
</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"`
```json
[
  {
    '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': None,
    'data': 'my markdown',
    'metadata_': None,
    'flow_run_id': '8dc54b6f-6e24-4586-a05c-e98c6490cb98',
    'task_run_id': None
  },
  {
    '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_': None,
    'flow_run_id': 'ffa91051-f249-48c1-ae0f-4754fcb7eb29',
    'task_run_id': None
  }
]
```
</Note>




## `prefect artifact delete`



```command
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:**

`$ prefect artifact delete "my-artifact"`
</Note>

