{"id":51083765,"url":"https://github.com/iterationlayer/sdk-node","last_synced_at":"2026-06-23T20:55:27.837Z","repository":{"id":346900350,"uuid":"1175583409","full_name":"iterationlayer/sdk-node","owner":"iterationlayer","description":"Official Node.js/TypeScript SDK for the Iteration Layer API — document extraction, image transformation, image generation, document generation, and sheet generation.","archived":false,"fork":false,"pushed_at":"2026-05-13T09:31:45.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-04T03:05:34.304Z","etag":null,"topics":["api","document-extraction","document-generation","image-generation","image-processing","image-transformation","iteration-layer","javascript","mcp","nodejs","pdf-extraction","pdf-generation","sdk","sheet-generation","spreadsheet","typescript"],"latest_commit_sha":null,"homepage":"https://iterationlayer.com/docs","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iterationlayer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-07T22:43:59.000Z","updated_at":"2026-05-13T09:32:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/iterationlayer/sdk-node","commit_stats":null,"previous_names":["iterationlayer/sdk-node"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/iterationlayer/sdk-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iterationlayer%2Fsdk-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iterationlayer%2Fsdk-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iterationlayer%2Fsdk-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iterationlayer%2Fsdk-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iterationlayer","download_url":"https://codeload.github.com/iterationlayer/sdk-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iterationlayer%2Fsdk-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34706579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","document-extraction","document-generation","image-generation","image-processing","image-transformation","iteration-layer","javascript","mcp","nodejs","pdf-extraction","pdf-generation","sdk","sheet-generation","spreadsheet","typescript"],"created_at":"2026-06-23T20:55:27.041Z","updated_at":"2026-06-23T20:55:27.832Z","avatar_url":"https://github.com/iterationlayer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iteration Layer TypeScript / Node.js SDK\n\nOfficial TypeScript/Node.js SDK for the [Iteration Layer API](https://iterationlayer.com).\n\n## Installation\n\n```sh\nnpm install iterationlayer\n```\n\n## Usage\n\n```typescript\nimport { IterationLayer } from \"iterationlayer\";\n\nconst client = new IterationLayer({ apiKey: \"il_your_api_key\" });\n```\n\n### Document Extraction\n\nExtract structured data from documents using AI.\n\n```typescript\nconst result = await client.extractDocument({\n  files: [{ type: \"url\", name: \"invoice.pdf\", url: \"https://example.com/invoice.pdf\" }],\n  schema: {\n    fields: [\n      { type: \"TEXT\", name: \"company_name\", description: \"The company name\" },\n      { type: \"CURRENCY_AMOUNT\", name: \"total\", description: \"The invoice total\" },\n    ],\n  },\n});\n\nconsole.log(result.company_name.value); // \"Acme Corp\"\nconsole.log(result.company_name.confidence); // 0.95\n```\n\n### Website Extraction\n\nExtract structured data from public website pages. Static fetching is used by default; set `should_render_javascript` when a page needs browser rendering.\n\n```typescript\nconst result = await client.extractWebsite({\n  file: {\n    type: \"url\",\n    url: \"https://example.com/pricing\",\n    fetch_options: { should_render_javascript: true },\n  },\n  schema: {\n    fields: [\n      { type: \"TEXT\", name: \"plan_name\", description: \"The pricing plan name\" },\n      { type: \"CURRENCY_AMOUNT\", name: \"price\", description: \"The monthly price\" },\n    ],\n  },\n});\n\nconsole.log(result.plan_name.value); // \"Pro\"\n```\n\n### Image Transformation\n\nResize, crop, convert, and apply effects to images.\n\n```typescript\nconst result = await client.transformImage({\n  file: { type: \"url\", name: \"photo.jpg\", url: \"https://example.com/photo.jpg\" },\n  operations: [\n    { type: \"resize\", width_in_px: 800, height_in_px: 600, fit: \"cover\" },\n    { type: \"convert\", format: \"webp\", quality: 85 },\n  ],\n});\n\nconst imageBuffer = Buffer.from(result.buffer, \"base64\");\n```\n\n### Image Generation\n\nCompose images from layer definitions.\n\n```typescript\nconst result = await client.generateImage({\n  dimensions: { width_in_px: 1200, height_in_px: 630 },\n  layers: [\n    { type: \"solid-color\", index: 0, hex_color: \"#1a1a2e\" },\n    {\n      type: \"text\",\n      index: 1,\n      text: \"Hello World\",\n      font_name: \"Inter\",\n      font_size_in_px: 48,\n      text_color: \"#ffffff\",\n      position: { x_in_px: 50, y_in_px: 50 },\n      dimensions: { width_in_px: 1100, height_in_px: 530 },\n    },\n  ],\n  output_format: \"png\",\n});\n\nconst imageBuffer = Buffer.from(result.buffer, \"base64\");\n```\n\n### Document Generation\n\nGenerate PDF, DOCX, EPUB, or PPTX from structured data.\n\n```typescript\nconst result = await client.generateDocument({\n  format: \"pdf\",\n  document: {\n    metadata: { title: \"Invoice #123\" },\n    page: {\n      size: { preset: \"A4\" },\n      margins: { top_in_pt: 36, bottom_in_pt: 36, left_in_pt: 36, right_in_pt: 36 },\n    },\n    styles: {\n      text: { font_family: \"Helvetica\", font_size_in_pt: 12, line_height: 1.5, color: \"#000000\" },\n      headline: { font_family: \"Helvetica\", font_size_in_pt: 24, color: \"#000000\", spacing_before_in_pt: 12, spacing_after_in_pt: 6 },\n      link: { color: \"#0066cc\" },\n      list: { indent_in_pt: 18, spacing_between_items_in_pt: 4 },\n      table: {\n        header: { background_color: \"#f0f0f0\", font_family: \"Helvetica\", font_size_in_pt: 12, color: \"#000000\", padding_in_pt: 6 },\n        body: { font_family: \"Helvetica\", font_size_in_pt: 12, color: \"#000000\", padding_in_pt: 6 },\n      },\n      grid: { gap_in_pt: 12 },\n      separator: { color: \"#cccccc\", thickness_in_pt: 1, margin_top_in_pt: 12, margin_bottom_in_pt: 12 },\n      image: { alignment: \"center\", margin_top_in_pt: 8, margin_bottom_in_pt: 8 },\n    },\n    content: [\n      { type: \"headline\", level: \"h1\", text: \"Invoice #123\" },\n      { type: \"paragraph\", markdown: \"Thank you for your business.\" },\n    ],\n  },\n});\n\nconst pdfBuffer = Buffer.from(result.buffer, \"base64\");\n```\n\n### Sheet Generation\n\nGenerate CSV, Markdown, or XLSX spreadsheets from structured data.\n\n```typescript\nconst result = await client.generateSheet({\n  format: \"xlsx\",\n  sheets: [\n    {\n      name: \"Invoices\",\n      columns: [\n        { name: \"Company\", width: 20 },\n        { name: \"Total\", width: 15 },\n      ],\n      rows: [\n        [\n          { value: \"Acme Corp\" },\n          { value: 1500.5, format: \"currency\", currency_code: \"EUR\" },\n        ],\n      ],\n    },\n  ],\n});\n\nconst sheetBuffer = Buffer.from(result.buffer, \"base64\");\n```\n\n### Webhooks (Async)\n\nUse the `*Async` methods to receive results via webhook instead of waiting for the response.\n\n```typescript\nconst result = await client.extractDocumentAsync({\n  files: [{ type: \"url\", name: \"invoice.pdf\", url: \"https://example.com/invoice.pdf\" }],\n  schema: {\n    fields: [{ type: \"CURRENCY_AMOUNT\", name: \"total\", description: \"The invoice total\" }],\n  },\n  webhook_url: \"https://your-app.com/webhooks/extraction\",\n});\n\nconsole.log(result.message); // \"Request accepted...\"\n```\n\n### Error Handling\n\n```typescript\nimport { IterationLayerError } from \"iterationlayer\";\n\ntry {\n  await client.extractDocument({ ... });\n} catch (error) {\n  if (error instanceof IterationLayerError) {\n    console.log(error.statusCode); // 422\n    console.log(error.errorMessage); // \"Validation error: ...\"\n  }\n}\n```\n\n## Documentation\n\nFull documentation is available at [https://iterationlayer.com/docs](https://iterationlayer.com/docs).\n\n## Issues \u0026 Feedback\n\nPlease report bugs and request features in the [issues repository](https://github.com/iterationlayer/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiterationlayer%2Fsdk-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiterationlayer%2Fsdk-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiterationlayer%2Fsdk-node/lists"}