AI Gateway GraphQL to retrieve tokens cost, request & response.

Hello! I'm trying AI Gateway to log the token cost. I followed the guide https://developers.cloudflare.com/ai-gateway/get-started/configuring-settings/ to use GraphQL. However, the graphql query only responses like:
{"data":{"viewer":{"accounts":[{"requests":[{"count":2,"dimensions":{"gateway":"mygateway","model":"gpt-3.5-turbo-0613","provider":"openai","ts":"2024-01-02T01:05:00Z"}}]}]}},"errors":null}
{"data":{"viewer":{"accounts":[{"requests":[{"count":2,"dimensions":{"gateway":"mygateway","model":"gpt-3.5-turbo-0613","provider":"openai","ts":"2024-01-02T01:05:00Z"}}]}]}},"errors":null}
How to retrieve more detailed logs using GraphQL? Where to find the schema for GraphQL?
Observe and control · Cloudflare AI Gateway docs
Now that your application is connected to the AI Gateway, you should be able to see see requests coming in through your Cloudflare Dashboard - AI …
1 Reply
Metriusz
Metriusz11mo ago
Explore the GraphQL schema · Cloudflare Analytics docs
Many GraphQL clients are support browsing GraphQL schema by taking care of introspection. In this page, we will cover GraphiQL and Altair clients.
Want results from more Discord servers?
Add your server