Connect Claude API (Anthropic) to Optimeter
These are the ways to get the cost of Claude API (Anthropic) into Optimeter, best first. They are the same steps the guide in the app shows.
Upload in Optimeter's format
Fill in Optimeter's template with usage and cost and upload it, once a month. The last resort when no other path works.
3 steps, about 12 min. Every month.
Download the template
In Optimeter
Download the template. It has only the header row, and each column is explained with an example value.
Fill in the template
At the provider
Write one row per day and key with the figures from Anthropic's usage page in the Console.
Upload the file
In Optimeter
Upload the file. Optimeter shows what would be saved before anything is saved.
Common mistakes
- The file has other columns than the template.
- Start from the template and do not change the column headers.
Send to Optimeter's API
Your own system sends the usage to Optimeter with an Optimeter key. Done once.
3 steps, about 5 min. Once.
What Optimeter may read: The Optimeter key can only send usage to your organization in Optimeter. It is shown once and stored only as a checksum.
Create an Optimeter key
In Optimeter
Create the key here in the step. It is shown only once; store it in your system.
Copy the example
In Optimeter
Copy the example: the address, the header Authorization: Bearer $OPTIMETER_KEY and one post in JSON with the source anthropic.
Send a test post
In Optimeter
Send the example with ?dry_run=1 in the address. The guide shows the answer, for example that one post would be created. The test post is never saved.
Common mistakes
- The posts end up under the wrong service.
- Use the source anthropic in every post.
Coming
These ways are in the guide but cannot be used yet.
Connect with an admin key
Optimeter reads usage and cost directly from Anthropic every day. You create an admin key in the Console once and paste it here. The vendor's pages are in English; the button names are therefore in English.
Opens when connections are switched on in Optimeter.
Upload the Console's own file
The Cost and Usage pages in the Console have their own export buttons that give a CSV file, once a month. Optimeter does not read the file yet, because the column names are not confirmed. The path opens when a sample file has been checked; until then Optimeter's template works.
Opens when the format has been checked against the vendor's file.