Test a gateway API key
Send a real streaming chat request with a cid_key_ token and read the response, latency and token usage.
- Version: 0.4
- Role: admin_user
- Type: task
API Key Testing proves a gateway API key end to end: it sends a real streaming chat request through the gateway with the key you paste, and shows the response, the latency and the token counts.
What do I need?
- Licence
- Any
- Role
admin_user
Prerequisites
- A gateway API key exists and you have its full value — it is shown only once, at creation.
- A provider credential is configured and reachable, so a completion can actually be produced.
- The Testing lab surface is enabled on this appliance.
Warning
The whole Testing group — Playground, Filter Testing, OCR Benchmark, API Key
Testing and ML Engine — is hidden on every licensed deployment. It renders only on an
unlicensed development box, on the issuer hub, or where CID_ENABLE_LAB is set to true. If
you cannot see the group in the sidebar, that is why.
This page tests gateway keys, not provider keys. To check whether an OpenAI or Anthropic key reaches its provider, use Test connection on Credentials.
/assets/screenshots/key-testing@0.4.pngRun a test
Open the page
Select Testing → API Key Testing.
The Test configuration tile sits beside an empty Response tile showing Run a test to see the response here.
Paste the key
Enter the key in API key.
The field is masked; use Show API key to check it. The key must begin with cid_key_ —
the helper text says Must start with cid_key_ and the form refuses anything else with
API key must start with "cid_key_".
Write the prompt
Type something into Test message.
Any prompt does; the point is that a completion comes back. Attachments are optional — Add file accepts PDF, DOCX, TXT, CSV and images.
Choose the model
Pick one from Model.
The list holds the active models the appliance can serve, each shown as the model name with its provider in brackets. The first is selected for you.
Adjust the sampling if you need to
Open Advanced options and set Temperature and Max tokens.
Temperature accepts 0 to 2 and defaults to 0.7. Max tokens accepts 1 to 4096
and defaults to 500.
Send it
Select Run test.
The button becomes Running…, the response tile's tag turns to Streaming, and text appears token by token. Cancel stops the stream and records the run as Test cancelled.
Read the result
When the stream ends the tag reads Success.
Four tiles report the outcome: Latency (to the last token), Prompt (input tokens), Completion (output tokens) and Total (tokens). The run is added to Test history.
Review earlier runs
Open a run
In Test history, select Open menu → View details on a row.
Test details shows the same four stat tiles plus the key prefix, model, provider, message and full response.
Clear the history when you are done
Select Clear history, then Clear all.
The confirmation warns This will permanently delete all test history. This action cannot be undone.
Note
Test history is stored in your browser only, capped at the last 50 runs, and holds only the first 16 characters of each key. Nothing about a test run is stored on the appliance — but the request itself is a real request, so it appears in the gateway's own detections and event logs like any other traffic.
Fields reference
Test configuration
| Field | Required | Rule | What it does |
|---|---|---|---|
| API key | Yes | Must start with cid_key_ | The gateway key the request authenticates with |
| Test message | Yes | Free text | The user message sent to the model |
| Attachments (optional) | No | PDF, DOCX, TXT, CSV or images | Sent alongside the message as multimodal content |
| Model | Yes | An active model | Which model and provider the request targets |
| Temperature | No | 0 – 2, default 0.7 | Sampling temperature passed to the provider |
| Max tokens | No | 1 – 4096, default 500 | Upper bound on the completion length |
Response tile
| Element | Shows |
|---|---|
| Status tag | Ready, Streaming, Success or Error |
| Latency | Milliseconds to the last token |
| Prompt | Input tokens counted by the gateway |
| Completion | Output tokens |
| Total | Prompt plus completion |
| Request failed | The error text the gateway or provider returned |
Test history
| Column | Shows |
|---|---|
| Tested | When the run happened |
| API key | The first characters of the key used |
| Message | The prompt sent |
| Model | The model targeted |
| Status | Success, Error or Streaming |
| Latency | Milliseconds to the last token |
Verify
- The response tile reaches Success and the token tiles are non-zero.
- Open Access keys. The key's Last used timestamp has moved and its request counter has advanced — within a minute, since the timestamp is written at most once per minute per key.
- Open All detections. The request appears attributed to the account the key resolves to — for a group-bound key, that is the group's earliest-added member, not the group.
- Send a prompt containing something your filters catch. The request is blocked or masked and
writes a
MESSAGE_BLOCKEDorMESSAGE_MASKEDevent, proving the key runs under a real policy.
If it fails
- API key is required / API key must start with "cid_key_" / Message is required — the form refused before sending. Nothing reached the gateway.
- Request failed with Invalid API key — the key does not match any stored hash. Check for a truncated paste, or regenerate the key.
- Request failed with API key is not active — the key is inactive or revoked on Access keys.
- Request failed with API key request quota exceeded or API key token quota exceeded — the key's monthly quota is spent.
- Request failed with No active credential found for tenant
{id}and provider{code}— the key resolves to an account that has no credential for that provider, directly or through a group. Fix it on Credentials or Tenant groups. - Request failed with a licence message and the code
LICENSE_EXPIRED— the appliance is refusing product traffic until a licence is installed. - Test cancelled — you pressed Cancel. The partial response is kept in the history row.
- The Model list is empty — no active model is reachable. See Models.
- The Testing group is missing from the sidebar — the lab surface is hidden on this appliance.
Next steps
- Access keys — issue, rotate and revoke the keys this page exercises.
- Credentials — the provider keys behind every completion.
- All detections — see what the detection pipeline made of your test prompt.
Last updated on