// Code generated by @openmeter/typespec-go. DO NOT EDIT. // Package openmeter provides a Go client SDK for the OpenMeter API — usage // metering and billing for AI and DevTool companies. It is generated from the // OpenMeter TypeSpec definitions and exposes every operation as a method on a // typed service hanging off [Client] (for example Client.Meters), with typed // request and response models. // // Construct a [Client] with [New], passing the API base URL and a bearer // token via [WithToken]: // // om, err := openmeter.New( // "https://openmeter.cloud/api/v3", // openmeter.WithToken(os.Getenv("OPENMETER_API_KEY")), // ) // // Any non-2xx response is returned as an [APIError] carrying the HTTP status // code and the RFC 7807 problem fields; unwrap it with [errors.As] or // [AsAPIError]. Client-side validation failures such as an empty resource ID // are reported before any request is sent and match [ErrEmptyID] via // [errors.Is]. // // Paginated list operations additionally provide ...All variants returning // [iter.Seq2] sequences that fetch pages lazily and yield each item together // with an error. package openmeter