靈活的參數
可設定 2 個已記錄的參數,包括 aspect_ratio, output_format。
curl -X POST https://runapi.ai/api/v1/nano_banana/text_to_image \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana",
"prompt": "Create a motivational poster with the text 'Never Give Up' in bold serif, sunset mountains in the background."
}'
import { NanoBananaClient } from "@runapi.ai/nano-banana";
const client = new NanoBananaClient();
const result = await client.textToImage.run({
model: "nano-banana",
prompt: "Create a motivational poster with the text 'Never Give Up' in bold serif, sunset mountains in the background.",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/nano_banana/text_to_image",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"nano-banana","prompt":"Create a motivational poster with the text 'Never Give Up' in bold serif, sunset mountains in the background."}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/nano_banana/text_to_image");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'nano-banana',
'prompt' => 'Create a motivational poster with the text \'Never Give Up\' in bold serif, sunset mountains in the background.',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.textToImage().run({"model":"nano-banana","prompt":"Create a motivational poster with the text 'Never Give Up' in bold serif, sunset mountains in the background."});
task.waitForResult();
require "runapi/nano_banana"
client = RunApi::NanoBanana::Client.new
result = client.text_to_image.run(
model: "nano-banana",
prompt: "Create a motivational poster with the text 'Never Give Up' in bold serif, sunset mountains in the background."
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.textToImage.Run({"model":"nano-banana","prompt":"Create a motivational poster with the text 'Never Give Up' in bold serif, sunset mountains in the background."})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model nano-banana \
--endpoint text_to_image \
--wait
5 個版本可用
選擇任意模型,數秒內即可開始生成。
選擇任意模型,數秒內即可開始生成。
| 提供者 | |
| 模型 ID | nano-banana |
| 模態 | Image |
| 任務類型 | Asynchronous |
| API 端點 | /api/v1/nano_banana/text_to_image |
| 計費單位 | call |
| 輸入參數 | aspect_ratio, output_format |
| 長寬比 | 1:1, 9:16, 16:9, 3:4, 4:3, 3:2, 2:3, 5:4, 4:5, 21:9, auto |
| 輸出格式 | png, jpeg, jpg |
| 目錄狀態 | 可正常運作 |
免費註冊後,在控制台建立 nano-banana 的 API 金鑰。
向 /api/v1/nano_banana/text_to_image 發送 POST 請求,並傳入 nano-banana 模型 ID 和參數。
輪詢工作或按照回呼取得已完成的 nano-banana 結果。
可設定 2 個已記錄的參數,包括 aspect_ratio, output_format。
開放 1 個公開 endpoint:text_to_image。
按 call 計量,無需訂閱。
aspect_ratio暫無描述。 (1:1, 9:16, 16:9, 3:4, 4:3, 3:2, 2:3, 5:4, 4:5, 21:9, auto)
output_format暫無描述。 (png, jpeg, jpg)
自動生成適合電商 catalog、但冇 studio 攝影的 lifestyle 產品相。
在落實最終美術之前,快速構思場景同角色。
大規模生成獨特封面圖同插畫,適合 blog post 同文章。
傳入 quickstart 顯示嘅 model ID。
每個 key 的 rate limit 會按使用層級而定。請查看定價頁了解最新限制。
可以——variant 只係一個旗標。只要更改 model 參數就可以切換。
在可用 streaming 的情況下,RunAPI 會端到端串流。
可以在公開 GitHub repo 開 issue,或者電郵支援團隊。