ValyroUI Русская версия

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

PropTypeDefault
models *PlaygroundModel[]Models to choose from.
valuePlaygroundRequestThe request being edited (controlled).
defaultValuePlaygroundRequestInitial value when uncontrolled.
onValueChange(value: PlaygroundRequest) => voidCalled with the new value when it changes.
onSend(request: PlaygroundRequest) => Promise<PlaygroundResponse>Sends the request; resolve with the response to show it.
maxTokensLimitnumber4096Upper bound of the max tokens slider. Default 4096.
requestHeadersRecord<string, string>{ 'Content-Type': 'application/json', Authorization: 'Bearer $API_KEY' }Request headers shown before a response arrives.
headingLevel1 | 2 | 3 | 4 | 5 | 62Level of the title (default 2).
labelsPartial<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