Skip to main content
Generate PDF invoices based on filters.

Signature

VastAI.generate_pdf_invoices(
    quiet: bool = False,
    start_date: Optional[str] = None,
    end_date: Optional[str] = None,
    only_charges: bool = False,
    only_credits: bool = False
) -> str

Parameters

quiet
bool
default:"False"
Suppress non-essential output.
start_date
Optional[str]
Start date for the invoice period (e.g. “2024-01-01”).
end_date
Optional[str]
End date for the invoice period (e.g. “2024-01-31”).
only_charges
bool
default:"False"
Include only charge items in the output.
only_credits
bool
default:"False"
Include only credit items in the output.

Returns

str — Result from the API call.

Example

from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.generate_pdf_invoices()
print(result)