Skip to main content
Returns the content of a specific artifact. Text files are served inline. Binary files return metadata only.

Endpoint

GET /artifacts/:id/content?contextType={type}&contextId={id}

Query parameters

ParameterTypeRequiredDescription
contextType"conversation" or "task"YesContext for locating the artifact
contextIdstringYesThe conversation or task ID

Response

For text files (markdown, code, JSON, etc.):
{
  "artifact": {
    "id": "art-abc123",
    "name": "ai_research_summary.md",
    "mimeType": "text/markdown",
    "size": 4520
  },
  "content": "# AI Research Summary\n\n## Key Findings\n..."
}
For binary files (images, PDFs):
{
  "artifact": {
    "id": "art-def456",
    "name": "chart.png",
    "mimeType": "image/png",
    "size": 128000
  },
  "content": null,
  "note": "Binary file — use the file path to access directly"
}

Example

curl "http://localhost:3001/artifacts/art-abc123/content?contextType=task&contextId=task-456"