Request
curl -X POST https://api.iterationlayer.com/document-generation/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"format": "pdf",
"document": {
"metadata": {
"title": "Non-Disclosure Agreement",
"author": "Acme Technologies Inc."
},
"page": {
"size": { "preset": "A4" },
"margins": {
"top_in_pt": 72,
"right_in_pt": 72,
"bottom_in_pt": 72,
"left_in_pt": 72
}
},
"styles": {
"text": {
"font_family": "Helvetica",
"font_size_in_pt": 11.0,
"line_height": 1.5,
"color": "#333333"
},
"headline": {
"font_family": "Helvetica",
"font_size_in_pt": 24.0,
"color": "#111111",
"spacing_before_in_pt": 12.0,
"spacing_after_in_pt": 6.0,
"is_bold": true
},
"link": {
"color": "#0066CC",
"is_underlined": true
},
"list": {
"text_style": {
"font_family": "Helvetica",
"font_size_in_pt": 11.0,
"line_height": 1.5,
"color": "#333333"
},
"marker_color": "#333333",
"marker_gap_in_pt": 8.0
},
"table": {
"header": {
"background_color": "#333333",
"text_color": "#FFFFFF",
"font_size_in_pt": 11.0,
"is_bold": true
},
"body": {
"background_color": "#FFFFFF",
"text_color": "#333333",
"font_size_in_pt": 11.0
},
"border": {
"outer": {
"top": { "color": "#CCCCCC", "width_in_pt": 1.0 },
"right": { "color": "#CCCCCC", "width_in_pt": 1.0 },
"bottom": { "color": "#CCCCCC", "width_in_pt": 1.0 },
"left": { "color": "#CCCCCC", "width_in_pt": 1.0 }
},
"inner": {
"horizontal": { "color": "#EEEEEE", "width_in_pt": 0.5 },
"vertical": { "color": "#EEEEEE", "width_in_pt": 0.5 }
}
}
},
"grid": {
"background_color": "#FFFFFF",
"border_color": "#CCCCCC",
"border_width_in_pt": 0.0,
"gap_in_pt": 12.0
},
"separator": {
"color": "#CCCCCC",
"thickness_in_pt": 1.0,
"spacing_before_in_pt": 12.0,
"spacing_after_in_pt": 12.0
},
"image": {
"border_color": "#000000",
"border_width_in_pt": 0.0
}
},
"footer": [
{
"type": "paragraph",
"runs": [{
"text": "Confidential — Acme Technologies Inc. — NDA-2026-0389"
}]
}
],
"content": [
{ "type": "headline", "level": "h1", "text": "Non-Disclosure Agreement" },
{ "type": "paragraph", "runs": [
{ "text": "This Non-Disclosure Agreement (\"Agreement\") is entered into as of " },
{ "text": "March 14, 2026", "is_bold": true },
{ "text": " (the \"Effective Date\") by and between " },
{ "text": "Acme Technologies Inc.", "is_bold": true },
{ "text": ", a Delaware corporation with offices at 500 Innovation Drive, Austin, TX 78701 (the \"Disclosing Party\"), and " },
{ "text": "Globex Corporation", "is_bold": true },
{ "text": ", a California corporation with offices at 200 Market Street, San Francisco, CA 94105 (the \"Receiving Party\")." }
] },
{ "type": "separator" },
{ "type": "headline", "level": "h2", "text": "Terms and Conditions" },
{
"type": "list",
"variant": "ordered",
"items": [
{ "text": "Definition of Confidential Information. \"Confidential Information\" means any non-public information disclosed by the Disclosing Party to the Receiving Party, whether orally, in writing, or by inspection, including but not limited to trade secrets, business plans, financial data, software, and technical specifications." },
{ "text": "Obligations of Receiving Party. The Receiving Party agrees to hold all Confidential Information in strict confidence, use it solely for the purpose of evaluating a potential business relationship, and not disclose it to any third party without prior written consent." },
{ "text": "Exclusions. This Agreement does not apply to information that: (a) is or becomes publicly available through no fault of the Receiving Party; (b) was known to the Receiving Party prior to disclosure; (c) is independently developed without use of Confidential Information; or (d) is required to be disclosed by law or court order." },
{ "text": "Term and Termination. This Agreement shall remain in effect for a period of two (2) years from the Effective Date. The obligations of confidentiality shall survive termination for an additional three (3) years." },
{ "text": "Return of Materials. Upon termination or request, the Receiving Party shall promptly return or destroy all Confidential Information and any copies thereof, and certify such destruction in writing." },
{ "text": "Governing Law. This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to conflict of laws principles." }
]
},
{ "type": "separator" },
{
"type": "grid",
"columns": [
{
"column_span": 6,
"blocks": [
{ "type": "paragraph", "runs": [
{ "text": "Disclosing Party\n\n", "is_bold": true },
{ "text": "Signature: ________________________\n\n" },
{ "text": "Name: ", "is_bold": true },
{ "text": "____________________\n\n" },
{ "text": "Title: ", "is_bold": true },
{ "text": "____________________\n\n" },
{ "text": "Date: ", "is_bold": true },
{ "text": "____________________" }
] }
]
},
{
"column_span": 6,
"blocks": [
{ "type": "paragraph", "runs": [
{ "text": "Receiving Party\n\n", "is_bold": true },
{ "text": "Signature: ________________________\n\n" },
{ "text": "Name: ", "is_bold": true },
{ "text": "____________________\n\n" },
{ "text": "Title: ", "is_bold": true },
{ "text": "____________________\n\n" },
{ "text": "Date: ", "is_bold": true },
{ "text": "____________________" }
] }
]
}
]
}
]
}
}'Response
{
"success": true,
"data": {
"buffer": "JVBERi0xLjcKMSAwIG9iago8...",
"mime_type": "application/pdf"
}
}Request
import { IterationLayer } from "iterationlayer";
const client = new IterationLayer({ apiKey: "YOUR_API_KEY" });
const result = await client.generateDocument({
format: "pdf",
document: {
metadata: {
title: "Non-Disclosure Agreement",
author: "Acme Technologies Inc.",
},
page: {
size: { preset: "A4" },
margins: {
top_in_pt: 72,
right_in_pt: 72,
bottom_in_pt: 72,
left_in_pt: 72,
},
},
styles: {
text: {
font_family: "Helvetica",
font_size_in_pt: 11.0,
line_height: 1.5,
color: "#333333",
},
headline: {
font_family: "Helvetica",
font_size_in_pt: 24.0,
color: "#111111",
spacing_before_in_pt: 12.0,
spacing_after_in_pt: 6.0,
is_bold: true,
},
link: {
color: "#0066CC",
is_underlined: true,
},
list: {
text_style: {
font_family: "Helvetica",
font_size_in_pt: 11.0,
line_height: 1.5,
color: "#333333",
},
marker_color: "#333333",
marker_gap_in_pt: 8.0,
},
table: {
header: {
background_color: "#333333",
text_color: "#FFFFFF",
font_size_in_pt: 11.0,
is_bold: true,
},
body: {
background_color: "#FFFFFF",
text_color: "#333333",
font_size_in_pt: 11.0,
},
border: {
outer: {
top: { color: "#CCCCCC", width_in_pt: 1.0 },
right: { color: "#CCCCCC", width_in_pt: 1.0 },
bottom: { color: "#CCCCCC", width_in_pt: 1.0 },
left: { color: "#CCCCCC", width_in_pt: 1.0 },
},
inner: {
horizontal: { color: "#EEEEEE", width_in_pt: 0.5 },
vertical: { color: "#EEEEEE", width_in_pt: 0.5 },
},
},
},
grid: {
background_color: "#FFFFFF",
border_color: "#CCCCCC",
border_width_in_pt: 0.0,
gap_in_pt: 12.0,
},
separator: {
color: "#CCCCCC",
thickness_in_pt: 1.0,
spacing_before_in_pt: 12.0,
spacing_after_in_pt: 12.0,
},
image: {
border_color: "#000000",
border_width_in_pt: 0.0,
},
},
footer: [
{
type: "paragraph",
runs: [{
text: "Confidential — Acme Technologies Inc. — NDA-2026-0389",
}],
},
],
content: [
{ type: "headline", level: "h1", text: "Non-Disclosure Agreement" },
{ type: "paragraph", runs: [
{ text: "This Non-Disclosure Agreement (\"Agreement\") is entered into as of " },
{ text: "March 14, 2026", is_bold: true },
{ text: " (the \"Effective Date\") by and between " },
{ text: "Acme Technologies Inc.", is_bold: true },
{ text: ", a Delaware corporation with offices at 500 Innovation Drive, Austin, TX 78701 (the \"Disclosing Party\"), and " },
{ text: "Globex Corporation", is_bold: true },
{ text: ", a California corporation with offices at 200 Market Street, San Francisco, CA 94105 (the \"Receiving Party\")." },
] },
{ type: "separator" },
{ type: "headline", level: "h2", text: "Terms and Conditions" },
{
type: "list",
variant: "ordered",
items: [
{ text: "Definition of Confidential Information. \"Confidential Information\" means any non-public information disclosed by the Disclosing Party to the Receiving Party, whether orally, in writing, or by inspection, including but not limited to trade secrets, business plans, financial data, software, and technical specifications." },
{ text: "Obligations of Receiving Party. The Receiving Party agrees to hold all Confidential Information in strict confidence, use it solely for the purpose of evaluating a potential business relationship, and not disclose it to any third party without prior written consent." },
{ text: "Exclusions. This Agreement does not apply to information that: (a) is or becomes publicly available through no fault of the Receiving Party; (b) was known to the Receiving Party prior to disclosure; (c) is independently developed without use of Confidential Information; or (d) is required to be disclosed by law or court order." },
{ text: "Term and Termination. This Agreement shall remain in effect for a period of two (2) years from the Effective Date. The obligations of confidentiality shall survive termination for an additional three (3) years." },
{ text: "Return of Materials. Upon termination or request, the Receiving Party shall promptly return or destroy all Confidential Information and any copies thereof, and certify such destruction in writing." },
{ text: "Governing Law. This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to conflict of laws principles." },
],
},
{ type: "separator" },
{
type: "grid",
columns: [
{
column_span: 6,
blocks: [
{ type: "paragraph", runs: [
{ text: "Disclosing Party\n\n", is_bold: true },
{ text: "Signature: ________________________\n\n" },
{ text: "Name: ", is_bold: true },
{ text: "____________________\n\n" },
{ text: "Title: ", is_bold: true },
{ text: "____________________\n\n" },
{ text: "Date: ", is_bold: true },
{ text: "____________________" },
] },
],
},
{
column_span: 6,
blocks: [
{ type: "paragraph", runs: [
{ text: "Receiving Party\n\n", is_bold: true },
{ text: "Signature: ________________________\n\n" },
{ text: "Name: ", is_bold: true },
{ text: "____________________\n\n" },
{ text: "Title: ", is_bold: true },
{ text: "____________________\n\n" },
{ text: "Date: ", is_bold: true },
{ text: "____________________" },
] },
],
},
],
},
],
},
});
await Bun.write("nda-2026-0389.pdf", Buffer.from(result.data.buffer, "base64"));Response
{
"success": true,
"data": {
"buffer": "JVBERi0xLjcKMSAwIG9iago8...",
"mime_type": "application/pdf"
}
}Request
import base64
from iterationlayer import IterationLayer
client = IterationLayer(api_key="YOUR_API_KEY")
result = client.generate_document(
format="pdf",
document={
"metadata": {
"title": "Non-Disclosure Agreement",
"author": "Acme Technologies Inc.",
},
"page": {
"size": {"preset": "A4"},
"margins": {
"top_in_pt": 72,
"right_in_pt": 72,
"bottom_in_pt": 72,
"left_in_pt": 72,
},
},
"styles": {
"text": {
"font_family": "Helvetica",
"font_size_in_pt": 11.0,
"line_height": 1.5,
"color": "#333333",
},
"headline": {
"font_family": "Helvetica",
"font_size_in_pt": 24.0,
"color": "#111111",
"spacing_before_in_pt": 12.0,
"spacing_after_in_pt": 6.0,
"is_bold": True,
},
"link": {
"color": "#0066CC",
"is_underlined": True,
},
"list": {
"text_style": {
"font_family": "Helvetica",
"font_size_in_pt": 11.0,
"line_height": 1.5,
"color": "#333333",
},
"marker_color": "#333333",
"marker_gap_in_pt": 8.0,
},
"table": {
"header": {
"background_color": "#333333",
"text_color": "#FFFFFF",
"font_size_in_pt": 11.0,
"is_bold": True,
},
"body": {
"background_color": "#FFFFFF",
"text_color": "#333333",
"font_size_in_pt": 11.0,
},
"border": {
"outer": {
"top": {"color": "#CCCCCC", "width_in_pt": 1.0},
"right": {"color": "#CCCCCC", "width_in_pt": 1.0},
"bottom": {"color": "#CCCCCC", "width_in_pt": 1.0},
"left": {"color": "#CCCCCC", "width_in_pt": 1.0},
},
"inner": {
"horizontal": {"color": "#EEEEEE", "width_in_pt": 0.5},
"vertical": {"color": "#EEEEEE", "width_in_pt": 0.5},
},
},
},
"grid": {
"background_color": "#FFFFFF",
"border_color": "#CCCCCC",
"border_width_in_pt": 0.0,
"gap_in_pt": 12.0,
},
"separator": {
"color": "#CCCCCC",
"thickness_in_pt": 1.0,
"spacing_before_in_pt": 12.0,
"spacing_after_in_pt": 12.0,
},
"image": {
"border_color": "#000000",
"border_width_in_pt": 0.0,
},
},
"footer": [
{
"type": "paragraph",
"runs": [{
"text": "Confidential — Acme Technologies Inc. — NDA-2026-0389",
}],
},
],
"content": [
{"type": "headline", "level": "h1", "text": "Non-Disclosure Agreement"},
{"type": "paragraph", "runs": [
{"text": "This Non-Disclosure Agreement (\"Agreement\") is entered into as of "},
{"text": "March 14, 2026", "is_bold": True},
{"text": " (the \"Effective Date\") by and between "},
{"text": "Acme Technologies Inc.", "is_bold": True},
{"text": ", a Delaware corporation with offices at 500 Innovation Drive, Austin, TX 78701 (the \"Disclosing Party\"), and "},
{"text": "Globex Corporation", "is_bold": True},
{"text": ", a California corporation with offices at 200 Market Street, San Francisco, CA 94105 (the \"Receiving Party\")."},
]},
{"type": "separator"},
{"type": "headline", "level": "h2", "text": "Terms and Conditions"},
{
"type": "list",
"variant": "ordered",
"items": [
{"text": "Definition of Confidential Information. \"Confidential Information\" means any non-public information disclosed by the Disclosing Party to the Receiving Party, whether orally, in writing, or by inspection, including but not limited to trade secrets, business plans, financial data, software, and technical specifications."},
{"text": "Obligations of Receiving Party. The Receiving Party agrees to hold all Confidential Information in strict confidence, use it solely for the purpose of evaluating a potential business relationship, and not disclose it to any third party without prior written consent."},
{"text": "Exclusions. This Agreement does not apply to information that: (a) is or becomes publicly available through no fault of the Receiving Party; (b) was known to the Receiving Party prior to disclosure; (c) is independently developed without use of Confidential Information; or (d) is required to be disclosed by law or court order."},
{"text": "Term and Termination. This Agreement shall remain in effect for a period of two (2) years from the Effective Date. The obligations of confidentiality shall survive termination for an additional three (3) years."},
{"text": "Return of Materials. Upon termination or request, the Receiving Party shall promptly return or destroy all Confidential Information and any copies thereof, and certify such destruction in writing."},
{"text": "Governing Law. This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to conflict of laws principles."},
],
},
{"type": "separator"},
{
"type": "grid",
"columns": [
{
"column_span": 6,
"blocks": [
{"type": "paragraph", "runs": [
{"text": "Disclosing Party\n\n", "is_bold": True},
{"text": "Signature: ________________________\n\n"},
{"text": "Name: ", "is_bold": True},
{"text": "____________________\n\n"},
{"text": "Title: ", "is_bold": True},
{"text": "____________________\n\n"},
{"text": "Date: ", "is_bold": True},
{"text": "____________________"},
]},
],
},
{
"column_span": 6,
"blocks": [
{"type": "paragraph", "runs": [
{"text": "Receiving Party\n\n", "is_bold": True},
{"text": "Signature: ________________________\n\n"},
{"text": "Name: ", "is_bold": True},
{"text": "____________________\n\n"},
{"text": "Title: ", "is_bold": True},
{"text": "____________________\n\n"},
{"text": "Date: ", "is_bold": True},
{"text": "____________________"},
]},
],
},
],
},
],
},
)
with open("nda-2026-0389.pdf", "wb") as f:
f.write(base64.b64decode(result["data"]["buffer"]))Response
{
"success": true,
"data": {
"buffer": "JVBERi0xLjcKMSAwIG9iago8...",
"mime_type": "application/pdf"
}
}Request
package main
import (
"encoding/base64"
"os"
il "github.com/iterationlayer/sdk-go"
)
func main() {
client := il.NewClient("YOUR_API_KEY")
result, err := client.GenerateDocument(il.GenerateDocumentRequest{
Format: "pdf",
Document: il.DocumentDefinition{
Metadata: il.DocumentMetadata{
Title: "Non-Disclosure Agreement",
Author: "Acme Technologies Inc.",
},
Page: il.PageConfig{
Size: il.PageSize{Preset: "A4"},
Margins: il.Margins{TopInPt: 72, RightInPt: 72, BottomInPt: 72, LeftInPt: 72},
},
Content: []il.ContentBlock{
il.NewHeadlineBlock("h1", "Non-Disclosure Agreement"),
il.ParagraphBlock{Type: "paragraph", Markdown: "This Non-Disclosure Agreement is entered into as of **March 14, 2026** by and between **Acme Technologies Inc.** (the \"Disclosing Party\") and **Globex Corporation** (the \"Receiving Party\")."},
il.NewSeparatorBlock(),
il.NewHeadlineBlock("h2", "Terms and Conditions"),
il.ListBlock{Type: "list", Variant: "ordered", Items: []il.ListItem{
{Text: "Definition of Confidential Information. \"Confidential Information\" means any non-public information disclosed by the Disclosing Party."},
{Text: "Obligations of Receiving Party. The Receiving Party agrees to hold all Confidential Information in strict confidence."},
{Text: "Exclusions. This Agreement does not apply to information that is publicly available or independently developed."},
{Text: "Term and Termination. This Agreement shall remain in effect for two (2) years from the Effective Date."},
{Text: "Return of Materials. Upon termination, the Receiving Party shall return or destroy all Confidential Information."},
{Text: "Governing Law. This Agreement shall be governed by the laws of the State of Delaware."},
}},
il.NewSeparatorBlock(),
il.ParagraphBlock{Type: "paragraph", Markdown: "**Disclosing Party**\n\nSignature: ________________________"},
},
},
})
if err != nil {
panic(err)
}
decoded, _ := base64.StdEncoding.DecodeString(result.Data.Buffer)
os.WriteFile("nda-2026-0389.pdf", decoded, 0644)
}Response
{
"success": true,
"data": {
"buffer": "JVBERi0xLjcKMSAwIG9iago8...",
"mime_type": "application/pdf"
}
}