Skip to main content
POST
Save Artifact

Path Parameters

app_name
string
required
user_id
string
required
session_id
string
required

Body

application/json

Request payload for saving a new artifact.

filename
string
required

Artifact filename.

artifact
Part · object
required

Artifact payload encoded as google.genai.types.Part.

customMetadata
Custommetadata · object | null

Optional metadata to associate with the artifact version.

Response

Successful Response

Metadata describing a specific version of an artifact.

version
integer
required

Monotonically increasing identifier for the artifact version.

canonicalUri
string
required

Canonical URI referencing the persisted artifact payload.

customMetadata
Custommetadata · object

Optional user-supplied metadata stored with the artifact.

createTime
number

Unix timestamp (seconds) when the version record was created.

mimeType
string | null

MIME type when the artifact payload is stored as binary data.