Set these environment variables to your console-issued key, project ID and source ID. The examples contain no real credentials.
Read APIs
curl "https://dash.onecloud.im/api/v1/projects/$ONECLOUD_PROJECT_ID/costs?from=2026-10-01&to=2026-10-25&limit=100" \
-H "Authorization: Bearer $ONECLOUD_API_KEY"
Create or rename a source
curl -X POST "https://dash.onecloud.im/api/v1/projects/$ONECLOUD_PROJECT_ID/sources" \
-H "Authorization: Bearer $ONECLOUD_API_KEY" \
-H 'Content-Type: application/json' \
--data '{"externalId":"billing-production","provider":"KakaoCloud","name":"Production collector"}'
costs.json
{
"sourceId": "SOURCE_ID",
"records": [
{
"externalId": "invoice-202610-row-001",
"usageDate": "2026-10-24",
"service": "API requests",
"currency": "KRW",
"billedCost": 1200,
"usageQuantity": 1000,
"usageUnit": "requests",
"tags": {
"environment": "production"
}
}
]
}
Import cost and usage batches
curl -X POST "https://dash.onecloud.im/api/v1/projects/$ONECLOUD_PROJECT_ID/costs/import" \
-H "Authorization: Bearer $ONECLOUD_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: billing-2026-10-batch-001' \
--data-binary @costs.json