---
title: "Create Artifact"
method: POST
path: "/api/artifacts/"
tags: ["Artifacts"]
---

# Create Artifact

`POST /api/artifacts/`

## Request

- The document declares no server URL.
- Auth: none declared

## Headers

- `x-prefect-api-version` string

## Request body

- ArtifactCreate: Data used by the Prefect REST API to create an artifact.
  - `key` string: An optional unique reference key for this artifact.
  - `type` string: An identifier that describes the shape of the data field. e.g. 'result', 'table', 'markdown'
  - `description` string: A markdown-enabled description of the artifact.
  - `data` union: Data associated with the artifact, e.g. a result.; structure depends on the artifact type.
    - object
    - unknown
  - `metadata_` object: User-defined artifact metadata. Content must be string key and value pairs.
  - `flow_run_id` string, uuid: The flow run associated with the artifact.
  - `task_run_id` string, uuid: The task run associated with the artifact.

## Response `200`

Successful Response

- Artifact: A PrefectBaseModel with an auto-generated UUID ID value and created / updated timestamps, intended for compatibility with our standard ORM models. The ID, created, and updated fields are reset on copy() and not included in equality comparisons.
  - `id` string, uuid
  - `created` string, date-time
  - `updated` string, date-time
  - `key` string: An optional unique reference key for this artifact.
  - `type` string: An identifier that describes the shape of the data field. e.g. 'result', 'table', 'markdown'
  - `description` string: A markdown-enabled description of the artifact.
  - `data` union: Data associated with the artifact, e.g. a result.; structure depends on the artifact type.
    - object
    - unknown
  - `metadata_` object: User-defined artifact metadata. Content must be string key and value pairs.
  - `flow_run_id` string, uuid: The flow run associated with the artifact.
  - `task_run_id` string, uuid: The task run associated with the artifact.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api.md) - [All operations](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api/llms.txt) - [OpenAPI document](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api/revisions/29ba6c4f8837?raw)
