postIntegrationsOpenrouterWebhookWithHttpInfo method

Future<Response> postIntegrationsOpenrouterWebhookWithHttpInfo({
  1. Map<String, Object>? requestBody,
})

Receive OpenRouter Broadcast traces as usage rows

OpenRouter's spend is invisible to every Hanzo money lens because those lenses read hanzo.cloud_usage and OpenRouter meters keys of its own. Point a Broadcast destination (Settings ▸ Observability ▸ Webhook) at this endpoint and each generation span becomes ONE row in that same ledger with provider openrouter, so one query answers what we spend everywhere. Enable the Cost and Identity field categories: cost is the money and identity carries openrouter.api_key_name, which is what says WHICH key spent it — it lands in account as openrouter/

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> postIntegrationsOpenrouterWebhookWithHttpInfo({ Map<String, Object>? requestBody, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/integrations/openrouter/webhook';

  // ignore: prefer_final_locals
  Object? postBody = requestBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}