Api Playground
API playground: model, parameters, prompts and JSON request/response. Pro · Developer tools › API and integrations
Installation
npx valyro-cli@latest login
npx valyro-cli@latest add api-playground
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { ApiPlayground } from 'valyro-ui-pro';
Props
| Prop | Type | Default | |
|---|---|---|---|
models * | PlaygroundModel[] | Models to choose from. | |
value | PlaygroundRequest | The request being edited (controlled). | |
defaultValue | PlaygroundRequest | Initial value when uncontrolled. | |
onValueChange | (value: PlaygroundRequest) => void | Called with the new value when it changes. | |
onSend | (request: PlaygroundRequest) => Promise<PlaygroundResponse> | Sends the request; resolve with the response to show it. | |
maxTokensLimit | number | 4096 | Upper bound of the max tokens slider. Default 4096. |
requestHeaders | Record<string, string> | { 'Content-Type': 'application/json', Authorization: 'Bearer $API_KEY' } | Request headers shown before a response arrives. |
headingLevel | 1 | 2 | 3 | 4 | 5 | 6 | 2 | Level of the title (default 2). |
labels | Partial<ApiPlaygroundLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Related components
- API Key Manager — API keys: create with scopes and expiry, show the secret once, revoke
- Webhook Endpoints — Webhooks: endpoints, events, toggles and delivery rate
- Certificate List — SSL/TLS certificates: time to expiry, auto-renewal, legend
- Code Block — Syntax-highlighted code
- Diff Viewer — Multi-file diff: file list with stats, unified and split views, word highlights
- Log Viewer — Streaming logs: levels, highlighted search, tail follow, JSON lines
- Request Inspector — HTTP request log: filters, headers, bodies and a timing waterfall
- Status Page — Status page: overall banner, 90-day uptime, incidents and subscriptions
- Storage Usage — Storage: usage by category and cleanup actions
- Download Center — Exports: file types, size, link expiry and re-request
- Feature Flag Simulator — Preview the product under different feature flags and segments, no production access
Previous: API Key Manager · Next: Webhook Endpoints · All Developer tools