> ## Documentation Index
> Fetch the complete documentation index at: https://www.krea.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 交互式 Playground

> 在交互式 playground 中实时体验 Krea API——发送已认证的请求、查看响应，并直接复制可用的代码，全部在浏览器中完成。

Krea API playground 现在集成在应用内。登录你的 Krea 账户后，你可以构造请求、针对真实端点运行请求，并在任意受支持的语言中复制即用型代码。

<a href="https://www.krea.ai/app/api/playground" target="_blank" rel="noopener noreferrer" className="not-prose group block my-6 rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-black hover:border-black dark:hover:border-white transition-all duration-200 p-6">
  <div className="flex flex-col md:flex-row md:items-center gap-4">
    <div className="flex-1">
      <h2 className="text-xl font-semibold text-black dark:text-white mb-1">打开 playground →</h2>
      <p className="text-sm text-gray-600 dark:text-gray-400 m-0">krea.ai/app/api/playground — 在新标签页中打开。</p>
    </div>

    <div className="flex-shrink-0">
      <span className="inline-flex items-center px-4 py-2 rounded-lg bg-black dark:bg-white text-white dark:text-black text-sm font-medium group-hover:opacity-90 transition-opacity">
        启动

        <svg className="ml-1.5 w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M14 5l7 7m0 0l-7 7m7-7H3" />
        </svg>
      </span>
    </div>
  </div>
</a>

## 你可以在其中做什么

* **试用任意模型** — Krea 2、Flux、Seedream、Veo 以及所有通过 API 公开的端点。
* **查看你的 moodboards 和资产** — playground 会列出可以直接放入请求体的 ID。
* **一次认证** — 你的账户会话会自动处理 API token，让你无需切换凭证即可迭代。
* **复制代码** — 将请求原样导出为 cURL、Python、Node.js 或 Go 代码。

## 前置条件

生产环境调用仍然需要 API token。参见 [API Keys & Billing](/developers/api-keys-and-billing) 生成一个。

## 参见

<CardGroup cols={2}>
  <Card title="代码示例" icon="code" href="/developers/examples/text-to-image">
    针对最常见工作流，可直接复制粘贴的端到端脚本。
  </Card>

  <Card title="Model APIs" icon="book-open" href="/api-reference/introduction">
    每个端点的完整请求和响应 schema。
  </Card>
</CardGroup>
