Skip to main content
This example demonstrates how to use the Cloud Code SDK to track and report API costs when running AI-assisted coding tasks locally. It also shows how to analyze cost history and export it for further analysis.

Example: cost_tracking_example.py

Note:
  • This example demonstrates cost tracking in a local environment, and how to analyze cost history.
  • Make sure to set your CLOUD_CODE_API_KEY environment variable before running.