Docs / API reference

Invoices API

Updated 2026-11-22. Published by PentestLLM.

Each time a top-up credits your balance it leaves an invoice, and two routes at https://api.pentestllm.ai/v1 read them. A number looks like INV-<year>-<n>, kept per account and begun afresh each UTC year.

List invoices

GET /v1/invoices hands back data: every credited top-up, card or crypto alike, latest first, each carrying its number, the amount, the method and the path to its PDF.

FieldNotes
numberThe invoice number, INV-<year>-<n>.
payment_idThe payment this invoice records.
amount_microThe sum paid, in micro-dollars.
refunded_microAnything refunded since, in micro-dollars; 0 if none.
bonus_microBonus credit that came with the payment, in micro-dollars, never charged.
methodCard or Crypto.
created_atWhen the credit landed, in Unix milliseconds.
pdf_urlThe PDF path, /v1/invoices/<number>.pdf.

Figures mirror whatever actually credited, so this page prints none of them.

Download one as a PDF

GET /v1/invoices/{invoice_number}.pdf builds the document when you request it, drawing on the billing details the account holds right then (the billing-details reference covers those): the seller and the customer, the amount paid, the method under the name the console gives it, the date, and the credit added. The response type is application/pdf, marked for download. Because every copy is composed at the moment of the call, getting a correct “Bill to” (company, address, tax id) in place beforehand is worth the minute.

Example

shell
1curl https://api.pentestllm.ai/v1/invoices \
2 -H "Authorization: Bearer sk-ptl-live-…"

Each entry’s pdf_url is the path you then request to fetch that invoice as a file. An admin key opens either route; a key scoped only to model calls will not. Without a valid key the route returns invalid_api_key (401); a PDF whose invoice number is not yours comes back not_found (404).

Questions

What turns into an invoice?

Every top-up that credits your balance, whichever way it was paid, by card or by crypto. A payment still pending or failed yields none; the INV-<year>-<n> number is issued the instant the credit posts.

Can my company and tax id show on it?

Yes. Each PDF is built from your current billing details, so fill in the company, address and tax number through the billing-details route first, and the following download carries them in the "Bill to" block.

Does an invoice double as a usage statement?

No. An invoice marks a top-up you funded, while a usage statement is the signed month-end record of your spend, which the public key on the verifier lets you validate.

Join on TelegramHelp