Download the self-billed invoice
Response is application/pdf (binary), not JSON. Call it only for a payout whose canDownloadSelfBill is true. The first download issues the invoice and gives it its number (SBI-), which then never changes. See Payout statements and self-billed invoices.
canDownloadSelfBill in List payouts first. A payout of platform fees only, or a payout that failed or came back, has no self-billed invoice and returns 400.AgentaOS-Account header.Authorizations
Your secret key, from app.agentaos.ai -> Settings -> Developers -> API Keys. The key's prefix is both its identity and its environment: sk_test_... (sandbox, free, no verification) or sk_live_... (real money, requires business verification). A missing or invalid key returns 401.
Path Parameters
The payout id, from GET /gateway/mor-settlements.
Response
The self-billed invoice PDF.
The response is of type file.