Models
Playground
Playground 是 Grafilab Models 不用写代码的那一半。打开 Models Playground 浏览实时目录、运行提示 词、生成图像和视频、对比模型 —— 花的是你从代码里用的同一份额度和同一个 API 密钥。
目录分成三个分类标签页,每个都显示自己有多少模型:Text、Image 和 Video。
- Search models 按名称过滤网格;Clear 复位。
- Sort by 提供 Price: low to high、Price: high to low、 Context: high to low、Name: A to Z 和 Newly added。
- 旁边的 How this sort works 按钮解释价格排序的规则: Ranked on a blended rate: 3 parts input to 1 part output, the usual usage mix. Neither price column on its own will read in order.
- What’s New? 突出显示目录里最近新增的模型。
每张文本卡片显示 Context、Input、Cached 和 Output —— 也就是上下文
窗口和三种按 token 计的费率。图像卡片写作 from MYR 0.05 per generation,视频卡片
写作 from MYR 0.20 per second。对你未开放的模型,卡片上不是通常的 Try Model
按钮,而是一条标带:Coming Soon(附 Not yet available)或
By Invitation(附 Invitation required)。
要拿到作为 model 发送的确切字符串,请读
API 页面上的 Model ID 列,或调用
GET /v1/models。
运行一个文本模型
Section titled “运行一个文本模型”在文本卡片上点击 Try Model 打开对话视图。右侧的 Model Configuration 面板 控制这次调用:
- API Key —— 必填。选一个你的密钥;这次运行按它计费并归属到它。如果下拉框显 示 No API keys available,先创建一个 —— 参见 API 密钥。
- Pricing —— 所选模型的输入和输出费率,按计费单位计。
- Temperature —— 随机性,从 Precise 到 Creative。
- Top P —— 用核采样控制多样性。
- AI Insights —— 在回答之外附加分析。
输入提示词并发送。回答会流式写进对话记录,而同样的提示词、模型 id 和密钥通过 API 调用的行为完全一致。
生成图像和视频
Section titled “生成图像和视频”Image 和 Video 标签页把对话框换成生成参数。具体出现哪些取决于模型:
- Aspect Ratio —— Square 1:1、Portrait 9:16、Cinema 16:9、4:3、3:4、21:9。
- Resolution。
- Number of images。
- Negative Prompt —— 你不想出现在结果里的东西。
- Image Guidance / Omni Reference、Start frame 和 Reference images —— 供接受图像输入的模型使用,包括图生视频。
部分图像和视频模型的卡片上带有免费额度 —— Free 100 images per model 或 Free 10 videos per model —— 它会在你的额度之前被消耗。
要把同一个提示词一次发给多个模型,用工具栏里的 Compare models —— 参见 对比模型。
Playground 里的运行是真实的 API 调用,从你的余额扣费。有两个行为常让人意外:
工具栏里的 Your Usage 会打开 Inference API Usage,它把 Playground、对比和 API 调用一起汇总 —— 参见推理用量。
你在这里设置的每一项,都直接对应代码里的请求:
| Playground 上的 | 代码里的 |
|---|---|
| 模型卡片上的 id | model |
| API Key 下拉选的密钥 | 传给 SDK 的 api_key |
| Temperature / Top P | temperature / top_p |
在终端里发同一个请求:快速开始:你的第一次 API 调用。

