Skip to content

Commit d08cfb7

Browse files
authored
Apply suggestions from code review
1 parent 088bb2b commit d08cfb7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pages/generative-apis/faq.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ Note that:
3131

3232
## How can I give access to token consumption to my users outside of Scaleway?
3333
If your users do not have a Scaleway account, you can still give them access to their Generative API usage consumption by either:
34-
- Providing them an access to Grafana inside [Cockpit](https://console.scaleway.com/cockpit/overview). You can create dedicated [Grafana users](https://console.scaleway.com/cockpit/users) (unrelated to Scaleway IAM currently), with read-only accesses (**Viewer** Role). Note that these users will still have access to all other Cockpit dashboards for this project.
35-
- Collecting consumption data from [Billing API](https://www.scaleway.com/en/developers/api/billing/#path-consumption-get-monthly-consumption) and expose it to your users. Consumption can be detailed by projects.
36-
- Collecting consumption data from [Cockpit Data Source](https://console.scaleway.com/cockpit/dataSource) and expose it to your users. As an example, you can query consumption using the following query:
34+
- Providing them an access to Grafana inside [Cockpit](https://console.scaleway.com/cockpit/overview). You can create dedicated [Grafana users](https://console.scaleway.com/cockpit/users) with read-only access (**Viewer** Role). Note that these users will still have access to all other Cockpit dashboards for this project.
35+
- Collecting consumption data from the [Billing API](https://www.scaleway.com/en/developers/api/billing/#path-consumption-get-monthly-consumption) and exposing it to your users. Consumption can be detailed by Projects.
36+
- Collecting consumption data from [Cockpit data sources](https://console.scaleway.com/cockpit/dataSource) and exposing it to your users. As an example, you can query consumption using the following query:
3737
```curl
3838
curl -G 'https://{data-source-id}.metrics.cockpit.fr-par.scw.cloud/prometheus/api/v1/query_range' \
3939
--data-urlencode 'query=generative_apis_tokens_total{resource_name=~".*",type=~"(input_tokens|output_tokens)"}' \
@@ -42,15 +42,15 @@ curl -G 'https://{data-source-id}.metrics.cockpit.fr-par.scw.cloud/prometheus/ap
4242
--data-urlencode 'step=1h' \
4343
-H "Authorization: Bearer $COCKPIT_TOKEN" | jq
4444
```
45-
where:
46-
- `data-source-id` is the id of your [Scaleway Metrics data source](https://console.scaleway.com/cockpit/dataSource)
47-
- `$COCKPIT_TOKEN` is an environment variable storing your [Cockpit Token](https://console.scaleway.com/cockpit/tokens)
48-
- `start` and `end` time properties should be edited for your specific time range
45+
Make sure that you replace the following values:
46+
- `data-source-id`: ID of your [Scaleway metrics data source](https://console.scaleway.com/cockpit/dataSource)
47+
- `$COCKPIT_TOKEN`: your [Cockpit token](https://console.scaleway.com/cockpit/tokens)
48+
- `start` and `end` time properties: your specific time range
4949

50-
You can see your token consumption in [Scaleway Cockpit](/cockpit/). You can access it from the Scaleway console under the [Metrics tab](https://console.scaleway.com/generative-api/metrics).
50+
You can see your token consumption in [Scaleway Cockpit](https://console.scaleway.com/cockpit/). You can access it from the Scaleway console under the [Metrics tab](https://console.scaleway.com/generative-api/metrics).
5151
Note that:
52-
- Cockpits are isolated by Projects, hence you first need to select the right project in the Scaleway console before accessing Cockpit to see your token consumption for this Project (you can see the `project_id` in the Cockpit URL: `https://{project_id}.dashboard.obs.fr-par.scw.cloud/`.
53-
- Cockpit graphs can take up to 1 hour to update token consumption, see [Troubleshooting](https://www.scaleway.com/en/docs/generative-apis/troubleshooting/fixing-common-issues/#tokens-consumption-is-not-displayed-in-cockpit-metrics) for further details.
52+
- Cockpits are isolated by Projects. You first need to select the right Project in the Scaleway console before accessing Cockpit to see your token consumption for the desired Project (you can see the `project_id` in the Cockpit URL: `https://{project_id}.dashboard.obs.fr-par.scw.cloud/`.
53+
- Cockpit graphs can take up to 1 hour to update token consumption, see [Troubleshooting](/generative-apis/troubleshooting/fixing-common-issues/#tokens-consumption-is-not-displayed-in-cockpit-metrics) for further details.
5454

5555
## Can I configure a maximum billing threshold?
5656
Currently, you cannot configure a specific threshold after which your usage will blocked. However:

0 commit comments

Comments
 (0)