Reference
Artifacts API
Artifact storage and retrieval endpoints
Artifact storage and retrieval endpoints
GET /api/artifacts
List artifacts
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum number of artifacts to return |
offset | integer | No | Number of artifacts to skip |
memoryId | string | No | Filter by memory ID |
conversationId | string | No | Filter by conversation ID |
type | string | No | Filter by artifact type |
Response: 200 OK
| Field | Type | Required | Description |
|---|---|---|---|
data | Artifact[] | No | |
count | integer | No |
Example:
curl -X GET "https://api.memnexus.ai/api/artifacts" \
-H "Authorization: Bearer cmk_live_xxx.yyy"
POST /api/artifacts
Create artifact
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | Artifact content |
type | string | Yes | Artifact type (e.g., note, document, code) |
name | string | No | Artifact name |
description | string | No | Artifact description |
memoryId | string | No | Associated memory ID |
conversationId | string | No | Associated conversation ID |
metadata | object | No | Additional metadata |
Response: 201 Created
| Field | Type | Required | Description |
|---|---|---|---|
data | Artifact | No |
Example:
curl -X POST "https://api.memnexus.ai/api/artifacts" \
-H "Authorization: Bearer cmk_live_xxx.yyy" \
-H "Content-Type: application/json" \
-d '{}'
GET /api/artifacts/{id}
Get artifact by ID
Path parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The artifact ID |
Response: 200 OK
| Field | Type | Required | Description |
|---|---|---|---|
data | Artifact | No |
Example:
curl -X GET "https://api.memnexus.ai/api/artifacts/mem_abc123" \
-H "Authorization: Bearer cmk_live_xxx.yyy"
PATCH /api/artifacts/{id}
Update artifact
Path parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The artifact ID |
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
content | string | No | Artifact content |
type | string | No | Artifact type (e.g., note, document, code) |
name | string | No | Artifact name |
description | string | No | Artifact description |
metadata | object | No | Additional metadata |
Response: 200 OK
| Field | Type | Required | Description |
|---|---|---|---|
data | Artifact | No |
Example:
curl -X PATCH "https://api.memnexus.ai/api/artifacts/mem_abc123" \
-H "Authorization: Bearer cmk_live_xxx.yyy" \
-H "Content-Type: application/json" \
-d '{}'
DELETE /api/artifacts/{id}
Delete artifact
Path parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The artifact ID |
Response: 204 No Content
Example:
curl -X DELETE "https://api.memnexus.ai/api/artifacts/mem_abc123" \
-H "Authorization: Bearer cmk_live_xxx.yyy"