Documents

Report PDF generation

Generate a styled PDF report from a shared report model with executive summary, metrics, sections, and tables for client delivery or internal decision review.

Browser note: GET on this URL serves human-readable docs. Paid execution still requires POST with x402 settlement.

Best for final distribution when the report needs a fixed layout and a clean presentation layer.

Example request body

Use this payload shape for the paid POST call.

{
  "report_meta": {
    "report_type": "ops-brief",
    "title": "Weekly Ops Brief",
    "author": "AurelianFlo"
  },
  "executive_summary": [
    "Core routes stayed available through the reporting window.",
    "Manual review remains recommended for billing anomalies."
  ],
  "headline_metrics": [
    {
      "label": "Uptime",
      "value": "99.9%",
      "unit": "percent"
    },
    {
      "label": "Incidents",
      "value": 1,
      "unit": "count"
    }
  ],
  "tables": {
    "route_health": {
      "columns": [
        "route",
        "status"
      ],
      "rows": [
        {
          "route": "/api/tools/report/generate",
          "status": "healthy"
        }
      ]
    }
  }
}

Request schema

The canonical body contract as exposed through discovery and OpenAPI.

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "report_meta": {
          "type": "object",
          "properties": {
            "report_type": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "report_title": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "author": {
              "type": "string"
            },
            "owner": {
              "type": "string"
            },
            "date": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "executive_summary": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "headline_metrics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string"
              },
              "value": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "unit": {
                "type": "string"
              }
            },
            "required": [
              "label"
            ],
            "additionalProperties": true
          }
        },
        "tables": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "columns": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "rows": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "integer"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "integer"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            },
            "additionalProperties": true
          }
        },
        "export_artifacts": {
          "type": "object",
          "properties": {
            "workbook_rows": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "integer"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "integer"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            }
          },
          "additionalProperties": true
        },
        "chart_hints": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "result": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "required": [
        "report_meta"
      ],
      "additionalProperties": true
    },
    {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "subtitle": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "sections": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "heading": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "body": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "bullets": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "table": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "integer"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            },
            "additionalProperties": true
          }
        }
      },
      "required": [
        "title"
      ],
      "additionalProperties": true
    }
  ]
}

Example response

A representative output payload for the route.

{
  "success": true,
  "data": {
    "endpoint": "/api/tools/report/generate",
    "tool": "Report PDF",
    "handlerMode": "auto_local",
    "previewToken": "7-report-pdf"
  },
  "source": "auto-local-engine"
}

cURL

Use this as the starting point for HTTP execution after the initial 402 challenge.

curl -X POST "https://api.aurelianflo.com/api/tools/report/pdf/generate" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  # include x402 settlement headers after the initial 402 challenge \
  -d '{
  "report_meta": {
    "report_type": "ops-brief",
    "title": "Weekly Ops Brief",
    "author": "AurelianFlo"
  },
  "executive_summary": [
    "Core routes stayed available through the reporting window.",
    "Manual review remains recommended for billing anomalies."
  ],
  "headline_metrics": [
    {
      "label": "Uptime",
      "value": "99.9%",
      "unit": "percent"
    },
    {
      "label": "Incidents",
      "value": 1,
      "unit": "count"
    }
  ],
  "tables": {
    "route_health": {
      "columns": [
        "route",
        "status"
      ],
      "rows": [
        {
          "route": "/api/tools/report/generate",
          "status": "healthy"
        }
      ]
    }
  }
}'

Related routes

Use these when you want the lower-level primitive, the buyer-facing memo workflow, or the agent install surface around this endpoint.