Skip to main content
POST
CreateArtifact

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
conversationId
string

Set to link the new artifact to a conversation at create time. Legal only for the conversation's author. Equivalent to a links entry with relation ATTACHED_TO, entity_type CONVERSATION, and this conversation_id as entity_id.

title
string
summary
string
storageClass
enum<string>
default:ARTIFACT_STORAGE_CLASS_UNSPECIFIED
  • ARTIFACT_STORAGE_CLASS_UNSPECIFIED: The storage class is not specified.
  • ARTIFACT_STORAGE_CLASS_FILE: Bytes in remote_files, previewable by MIME type.
  • ARTIFACT_STORAGE_CLASS_STRUCTURED: Content is the JSON payload, no file.
  • ARTIFACT_STORAGE_CLASS_BLOB: Bytes in remote_files, opaque, download only.
Available options:
ARTIFACT_STORAGE_CLASS_UNSPECIFIED,
ARTIFACT_STORAGE_CLASS_FILE,
ARTIFACT_STORAGE_CLASS_STRUCTURED,
ARTIFACT_STORAGE_CLASS_BLOB
createdVia
enum<string>
default:ARTIFACT_CREATED_VIA_UNSPECIFIED

Which surface wrote the artifact.

  • ARTIFACT_CREATED_VIA_UNSPECIFIED: The producing surface is not specified.
  • ARTIFACT_CREATED_VIA_AGENT: An agent wrote the artifact.
  • ARTIFACT_CREATED_VIA_CANVAS: Canvas wrote the artifact.
  • ARTIFACT_CREATED_VIA_UPLOAD: A direct upload wrote the artifact.
Available options:
ARTIFACT_CREATED_VIA_UNSPECIFIED,
ARTIFACT_CREATED_VIA_AGENT,
ARTIFACT_CREATED_VIA_CANVAS,
ARTIFACT_CREATED_VIA_UPLOAD
payload
object

Required for STRUCTURED and rejected otherwise. The serialized payload must not exceed 1 MiB.

Links written at version 1.

metadata
object[]

Metadata attached to the created version.

Response

A successful response.

artifact
object

An artifact and one of its versions: the one artifact_version_id pinned, or the latest.