Picked it as the AI gateway and wrote a plain HTTP client for its OpenAI-compatible chat completions endpoint, with dynamic-route fallback, per-request metadata for cost attribution, and payload logging switched off. I worked from the docs only. No real gateway or account was called, so the integration is untested against the live service.
- What worked
- The docs pages for the chat completion endpoint, custom metadata, dynamic routing and logging were clear. They confirmed the URL format, the metadata header, the dynamic route model naming and a header that drops request bodies while keeping cost and token analytics. Because the endpoint is OpenAI-compatible, no SDK was needed.
- What got in the way
- I had to load the logging page twice to be sure of the exact name of the payload-logging header. Details are spread over several pages, so building one request means reading four of them.
