Playground
Try chat, image generation and text-to-speech models in the console without writing code.
The Playground is a model testing tool built into the console. You can try chat, image generation and text-to-speech models without writing code. Use it to compare models and tune parameters and prompts before you integrate.
Before you start
- The LLM API service is activated and your account has quota.
- You have at least one enabled API key. The Playground sends requests with one of your enabled keys automatically, preferring a key in the default group. If you have no usable key, the page says Please create an API key first. Create one under LLM API → API tokens.
Playground calls are billed the same way as API calls. They use up the quota of the key in use and of your account, and they appear in Usage logs.
Opening the Playground
In the left menu, choose LLM API → Playground (/llm/playground). The Settings panel is on the left, and its Mode tabs switch between Chat, Image generation and Speech. The matching workspace is on the right.
Chat
- Under Mode, select Chat.
- Pick a model from the Model dropdown. You can type to search.
- Optional: set the assistant's role and behaviour in System prompt. The default is "You are a helpful assistant.".
- Optional: Streaming output is on by default, so replies appear as they are generated. Turn it off to get the full reply at once.
- Type a message in the box on the right. Press Enter to send and Shift+Enter for a new line.
Expand Advanced parameters to adjust:
| Parameter | Range | Default | Effect |
|---|---|---|---|
| Temperature | 0 – 2 | 0.7 | Higher values give more varied answers, lower values more consistent ones |
| Max Tokens | 1 – 128000 | 2000 | Maximum tokens per reply. The real limit depends on the model. |
| Top P | 0 – 1 | 1 | Nucleus sampling threshold. Usually adjust either this or Temperature, not both. |
You can copy, regenerate or delete individual messages. Click Empty to clear the conversation.
Image
- Under Mode, select Image generation.
- Choose an image model and describe the image you want.
- If the model supports them, set Dimensions (1024x1024, 1024x1792, 1792x1024, 512x512 or 256x256), Quality (Standard or HD) and Style (Vivid or Natural).
- Submit and wait for the result. You can download the generated images.
Not every image model supports size, quality and style. Unsupported parameters may be ignored or may cause an error.
Audio (text-to-speech)
- Under Mode, select Speech, then Text to speech (TTS).
- Choose a model, such as
tts-1ortts-1-hd, and a Voice: Alloy, Echo, Fable, Nova, Onyx or Shimmer. - Use the slider to set Speed from 0.25x to 4x. The default is 1x.
- Enter your text and submit. You can play the generated audio in the browser or download it.
From the Playground to code
Once you have settings you like, send the same parameters through the API. For example, the chat settings above map to this request:
curl https://llm.yeap.cloud/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YEAP_LLM_API_KEY" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello"}
],
"temperature": 0.7,
"max_tokens": 2000,
"top_p": 1
}'Text-to-speech maps to POST /v1/audio/speech (parameters model, input, voice and speed). Image generation maps to POST /v1/images/generations.
Troubleshooting
- A model in the dropdown fails: the Playground lists models on the platform, but not all of them are open to your key's group. Try another model, or check the Models page and change the key's group.
- Insufficient quota: transfer quota to your account, or check the quota cap on the key the Playground is using.
- Testing with a specific key: the Playground picks a key for you. To test a key with a particular group or limits, call the API directly with curl or an SDK. See the Quickstart.