Playground
Compare original and optimized prompts, choose which version to route, then inspect the answer and recorded execution evidence.
On this page
What you see
Compose holds the API key, optional system prompt, message and routing settings. Cloud Score automatically chooses the answer model using the selected routing strategy and workspace policies. The Include system prompt switch excludes the draft from counting and requests when disabled. Result shows the accepted request, routing trace, response and execution receipt. On small screens, the Compose and Result tabs switch panes.
Guardrails come from the selected key (see AI Security). Under the key picker, Guardrails: links the key's profile name to the Guardrails page, above its block: … · redact: … · log only (not enforced): … line, or Disabled, not enforced for a disabled profile. A key without a profile reads No guardrails on this key. Requests are not scanned.; manual entry reads Guardrails come from this key's profile. After a run, Result opens with one verdict chip per direction that acted, for example Blocked before sending: PCI or Detected, not enforced: PII, beside a Change in Guardrails link. A guardrail block shows only its chip, not an error line. A run with nothing to report reads Guardrails: No findings, or Guardrails: No guardrails on this key when the key has no profile. The Request pipeline starts with Input guardrails, which checks the message, system prompt and attached documents before anything else runs and always shows its summary, for example Redacted: PCI or No guardrails on this key. Response checks shows the output guardrail verdict.
Prompt Optimization is one ON/OFF control and follows the workspace default until you change it. ON prepares a comparison for any prompt length. No minimum token count applies. OFF sends the original directly. While settings load, the control shows an unknown/pending state and the primary action explains why it is disabled. A failed settings load offers Retry; a failed refresh keeps the last known setting with a notice.
What you can do
| Action | Behavior |
|---|---|
| Attach files | Use the + button at the bottom left of the Message box, or drop PDF, DOCX, TXT or MD documents onto the box; each file appears as a chip beside the button. Attach up to 32 files with a combined size of 5 MB; remove files individually before sending. |
| Optimize prompt | Checks the input, requests a bounded Balanced rewrite and measures the complete result before answer routing. No answer is generated yet. |
| Run original | Consumes this comparison with an explicit original choice, then routes the reviewed source. |
| Run optimized | Consumes the same comparison with the optimized choice. Available only when the server permits it. |
| Optimized prompt | Shows removed and rewritten text directly beside Original prompt, with separate system/user roles. Show clean text switches to the selectable optimized version; Copy always copies that clean version. Large changes are grouped into passages. |
| Edit input or settings | Invalidates the comparison. Optimize again before either choice can be sent. |
| Stop / Check request status | Stops the browser stream, then reads the accepted request status. It does not cancel provider billing or send another generation. |
Step-by-step
Choose a platform API key and write your message.
Select an enabled platform key by name and prefix. Its secret is not exposed. Manual entry is also available. A provider credential is not a platform key. Manage keys in API keys. Check the
Guardrails:line under the picker for what the key's profile does. Enable a separate system prompt and select routing constraints as needed. Character and word counts describe the user field; live token counts describe the enabled messages. Open the Exact token counts help button by keyboard or touch for the full per-message figures.Attach documents when the answer needs their context.
Use the
+(Attach files) button at the bottom left of theMessagebox, or drop documents onto the box. Each file appears as a chip beside the button, with its name and a remove button. Valid files remain selected when another file fails validation. The gateway extracts document text when you run the request, using OCR for scanned PDFs when needed. It includes up to 10,000 context tokens from each file and reports any omitted tokens inDocument context.Prompt Optimization and the live count cover your authored message and enabled system prompt. Document text is added unchanged when the chosen prompt runs and is included in final routing and usage accounting. Adding or removing a file invalidates the current comparison; optimize again before choosing a version.
Keep Prompt Optimization ON and select Optimize prompt.
Review the original and optimized versions, expanded diff and estimated input savings. Input estimates span the available model catalog; each saving compares both prompts on the same model. When you run a prompt, Cloud Score chooses the answer model automatically and shows that selection with the result.
Choose the original or optimized prompt.
Neither version is routed until you choose. A blocked input has no send choice. An unchanged or unavailable result may allow only the original. Expired comparisons require a fresh comparison. Changing the message, system prompt, execution key or request settings invalidates an earlier proposal.
Read the answer and the execution receipt.
The receipt distinguishes your choice from the prompt actually sent for the answer. If a cache or deduplication supplies the answer, it can report no provider send for that execution. Historical paid optimizer expenses remain visible on older receipts. Open Details for Routing, Decision, Usage, History and Savings. Request insights starts collapsed in Result; historical compression details remain available when that run carries legacy evidence.
Examples
A short request with filler or a long prompt with repeated requirements may produce a shorter rewrite. A system-only prompt can be optimized and copied; add a user message and optimize again before running an answer. A concise prompt or protected literal may remain unchanged. Missing tokenization, bounded work limits and failed validation can also retain the original; those outcomes do not prove that the prompt cannot be shortened.
Review instructions, facts and constraints in the diff. Select the original when the changed wording does not meet your needs. Structural checks are not a semantic quality guarantee. Quality and latency claims require separate evaluations.
Reading the numbers
| Measurement | Meaning |
|---|---|
| Original / optimized tokens | Message-text counts. Final usage is measured after routing. |
| Input cost and reduction | A paired estimate at the same model price. Output charges, cache effects and choosing a different routed model are separate. |
| Local passes / Accepted edits | Rule transformations, edit counts and the rewrite outcome reported by preparation. Hosted rewriting has a separately recorded API expense; deterministic fallback still uses compute resources. |
| Estimated net API savings | Same-model estimated input savings less any recorded optimizer API expense. Live counting has no optimizer API expense; explicit rewriting can incur one even when its candidate is rejected. Historical paid or unknown costs retain their original values. Actual-send credit is recorded separately after execution. |
| Fully loaded net | Also subtracts allocated infrastructure cost. Unallocated compute keeps this result unknown. |
| Optimization time | Measured optimization work, with queue time shown separately. Fewer prompt tokens do not establish a faster total request; no fixed duration is promised. |
| Negative savings | A negative server saving is a cost increase, keeps a true minus and uses error ink. Missing values retain their cause instead of becoming zero. |
| Provider usage | Recorded actual or provider-estimated request usage, kept separate from text-token comparisons. |
| Document context | File sizes, extracted and included tokens, per-file truncation, OCR use and measured processing time. Document processing completes before the response starts streaming. |
Good to know
Request recovery does not repeat the request
An accepted request ID arrives before generation completes. If the stream disconnects, use Check request status. The full response may not be retained; Cloud Score states when only the receipt or a stored preview is available. Do not assume a disconnected stream cancelled the backend call.
Prepared prompt bodies and sealed proposal tokens stay in browser memory and expire server-side. The draft, results and comparison survive navigation within the signed-in console. Reloading loses this volatile state; signing out or switching accounts clears Playground drafts, keys, stored preferences and query state. The API key keeps its existing optional per-tab storage control, and the system-prompt editor keeps its existing per-tab preference.
Selected files stay in Playground page memory for retry and are discarded on removal, Reset, reload or navigation away. File bytes and extracted text are never written to browser storage. Document run history keeps file metadata, not the uploaded files. The gateway processes documents without retaining the source files or extracted text. A validation error preserves the selected files so you can remove the affected document and retry.
Ctrl+Enter (Command+Enter on Mac) follows the primary action. With optimization ON it prepares a comparison and never silently selects a version. Escape stops an active stream. Reset clears the message, attachments and run history.
On Optimizations › Prompt Optimization, preparation, selections and dispatched savings are reported separately, and each request's record is in Observability. Historical compression records retain their original evidence and do not establish missing choices or optimizer costs.
Related
- API keysIssue the platform keys that authenticate every gateway request, and set what each key carries: a monthly budget, body storage, a security profile, sandbox rights, and cost attribution defaults.
- OptimizationsRead what the optimization engine applied and what it saved against the reference model, on the Optimizations and Prompt Optimization pages in Analytics.
- Gateway health and where Analytics wentGateway health shows latency, request outcomes, retries, fallbacks and the routing strategy mix on an hourly-capable range. This page also maps each former Analytics view to its new home, and covers ROI configuration and saved reports.
- ObservabilityThe per-request audit trail and the gateway's health: filter the request list, open a request for its route, attempts, cost and savings receipt, and read latency, outcomes and retries on Gateway health.
- Send requests through Cloud ScoreCall POST /v1/requests with a gateway key: the request fields, the response envelope, status versus HTTP code, error types, SSE streaming, and the two GET endpoints.