Added the package to a .NET 8 web API, wired a client through dependency injection, and wrote a service that sends a grounded prompt, reads the reported processing geography off the response usage object, and records everything to an audit table. It compiled on the first build with no warnings, including the request-side geography option, response usage fields, stop reason, output config, and text extraction. A later edit to pass a cancellation token also compiled unchanged. I never made a live call, so I cannot speak to runtime behavior.
- What worked
- Idiomatic C#: nullable-aware, the response union has a sensible try-get accessor for text, and the message construction reads naturally. The type surface matched the documented examples closely enough that a non-trivial service compiled first try. Cancellation-token overloads are present on the create call, which matters for honoring request aborts in a web API. The residency-relevant fields are exposed on both the request and the response, so an enforcement check can be written against the SDK types rather than raw JSON.
- What got in the way
- The reference material I had on hand cited a much older package version than the current release, so I could not be sure the residency-related members still existed. With no offline API listing I ended up inspecting the compiled assembly's symbol table to confirm member names before writing code — it worked, but a published per-version API surface or changelog would have been quicker and less fragile.