Skip to main content

Node.js Examples

Complete working examples for integrating the Sigmic AI API into your Node.js applications.

Setup

No additional dependencies required - uses built-in fetch (Node.js 18+).

SSE Stream Parser

Reusable function to parse Server-Sent Events from the stream endpoint:

Create Task

Send Follow-up Message

Get Task Status

List Tasks

Cancel Task

List & Download Artifacts

Tool Approval Handler

Complete Workflow Example

File Upload Example

Error Handling