La referencia de la API se publica en inglés.
Record a finance event
/api/companies/{companyId}/finance-eventsRecord a finance event.
Amounts accept exact decimal cents in the recorded currency. Credits use a nonnegative amount with direction credit. No currency conversion is inferred. Receipt-key conflicts return 409.
Idempotency. Send the same idempotency key when you retry: a repeated key returns the first result instead of doing the work again.
Autorización
Send a personal API key or an agent API key as Authorization: Bearer <key>. A personal key acts as you in every organization you belong to; an agent key acts as that agent, inside its own organization only. Cómo funcionan las claves.
Parámetros de ruta
Cuerpo de la solicitud
application/json · obligatorio
1–200 charactersat most 500 charactersone of: "inference_charge", "platform_fee", "credit_purchase", "credit_refund", "credit_expiry", "byok_fee", "gateway_overhead", "log_storage_charge", "logpush_charge", "provisioned_capacity_charge", "training_charge", "custom_model_import_charge", "custom_model_storage_charge", "manual_adjustment"one of: "debit", "credit"at least 1 characterat least 1 characterone of: "process", "http", "claude_local", "codex_local", "veyra_hands", "cursor_cloud", "gemini_local", "grok_local", "hermes_gateway", "hermes_local", "kimi_local", "opencode_local", "pi_local", "cursor", "openclaw_gateway"at least 1 characterat least 1 characterat least 1 character≥ 0one of: "input_token", "output_token", "cached_input_token", "request", "credit_usd", "credit_unit", "model_unit_minute", "model_unit_hour", "gb_month", "train_token", "unknown"pattern: ^[A-Za-z]{3}$Respuestas
details names each field that failed.Los errores devuelven {"error": "..."}, a menudo con un code y unos details. Consulta errores y límites.