Pengguna baharuPelan DNS dan CDN percuma untuk setiap akaun baharu.Cipta akaun anda

Playground

Try chat, image generation and text-to-speech models in the console without writing code.

3 minit bacaan Dikemas kini 6 Okt 2026

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 请先创建 API 密钥 ("Please create an API key first"). Create one under LLM API → 密钥管理 (API Keys).
Note

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) and 语音 (Audio). The matching workspace is on the right.

Chat

  1. Under 模式 (Mode), select 对话 (Chat).
  2. Pick a model from the 模型 (Model) dropdown. You can type to search.
  3. Optional: set the assistant's role and behaviour in 系统提示 (System prompt). The default is "你是一个有帮助的助手。" ("You are a helpful assistant.").
  4. Optional: 流式输出 (Streaming) is on by default, so replies appear as they are generated. Turn it off to get the full reply at once.
  5. 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:

ParameterRangeDefaultEffect
Temperature0 – 20.7Higher values give more varied answers, lower values more consistent ones
Max Tokens1 – 1280002000Maximum tokens per reply. The real limit depends on the model.
Top P0 – 11Nucleus sampling threshold. Usually adjust either this or Temperature, not both.

You can copy, regenerate or delete individual messages. Click 清空 (Clear) to clear the conversation.

Image

  1. Under 模式 (Mode), select 绘图 (Image).
  2. Choose an image model and describe the image you want.
  3. If the model supports them, set 尺寸 (Size) (1024x1024, 1024x1792, 1792x1024, 512x512 or 256x256), 质量 (Quality) (标准 Standard or HD) and 风格 (Style) (生动 Vivid or 自然 Natural).
  4. Submit and wait for the result. You can download the generated images.
Note

Not every image model supports size, quality and style. Unsupported parameters may be ignored or may cause an error.

Audio (text-to-speech)

  1. Under 模式 (Mode), select 语音 (Audio), then 文字转语音 (TTS).
  2. Choose a model, such as tts-1 or tts-1-hd, and a 音色 (Voice): Alloy, Echo, Fable, Nova, Onyx or Shimmer.
  3. Use the slider to set 语速 (Speed) from 0.25x to 4x. The default is 1x.
  4. 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:

bash
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.
Adakah halaman ini membantu?