透過 RunAPI 使用 Grok Imagine Video API,包含 model skill、統一驗證與按用量計費。
# Available Endpoints
POST /v1/chat/completions # LLM
POST /v1/images/generations # Image
POST /api/v1/kling/text_to_video # Video
POST /v1/audio/speech # TTS
POST /v1/audio/transcriptions # STT
POST /api/v1/suno/text_to_music # Music
const response = await fetch("https://runapi.ai/v1/chat/completions", {
method: "POST",
headers: { Authorization: `Bearer ${RUNAPI_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ model: "your-model-id", messages: [{ role: "user", content: "Hello" }] })
})
const result = await response.json()
import os
import httpx
response = httpx.post(
"https://runapi.ai/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model": "your-model-id", "messages": [{"role": "user", "content": "Hello"}]}
)
<?php
$ch = curl_init("https://runapi.ai/v1/chat/completions");
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer $RUNAPI_API_KEY", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["model" => "your-model-id", "messages" => [["role" => "user", "content" => "Hello"]])]);
$result = json_decode(curl_exec($ch), true);
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(URI.create("https://runapi.ai/v1/chat/completions"))
.header("Authorization", "Bearer " + RUNAPI_API_KEY)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("{\"model\":\"your-model-id\",\"messages\":[]}")).build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
require "net/http"
uri = URI("https://runapi.ai/v1/chat/completions")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch('RUNAPI_API_KEY')}"
request["Content-Type"] = "application/json"
request.body = {model: "your-model-id", messages: []}.to_json
requestBody := strings.NewReader(`{"model":"your-model-id","messages":[]}`)
request, _ := http.NewRequest(http.MethodPost, "https://runapi.ai/v1/chat/completions", requestBody)
request.Header.Set("Authorization", "Bearer "+os.Getenv("RUNAPI_API_KEY"))
request.Header.Set("Content-Type", "application/json")
response, err := http.DefaultClient.Do(request)
defer response.Body.Close()
# Authenticate once
runapi login
# Inspect available models
runapi models list --modality video
# Use the selected model in your workflow
runapi models show <model-id>
一個 API,接入主流 AI 模型
-
Flux
-
Midjourney
-
Whisper
-
ElevenLabs
-
HappyHorse
-
GPT Image 2
-
Veo
-
Minimax
-
Luma
-
PixVerse
-
Recraft
-
Fish Audio
-
DeepSeek
-
Qwen
-
Claude
-
GPT
-
Gemini
-
Seedance
-
Kling
-
Suno
6 個模型
Kling API access for text and image-to-video up to 4K with multimodal audio and AI avatars.
透過 RunAPI 使用 Midjourney Video API,包含 model skill、統一驗證與按用量計費。
透過 RunAPI 使用 PixVerse V6 影片 API —— 從文字、圖片、參考圖組同轉場影格生成影片,並可延伸已完成嘅結果。
Video generation and editing — create and transform footage with text prompts.
High-fidelity video generation up to 4K with natively synthesized dialogue, sound effects, and ambience.
6 個模型 沒有符合的模型
立即試用模型
選擇任意模型,數秒內即可開始生成。
一個 API,涵蓋所有 AI 模型
統一介面
一個 SDK 涵蓋所有模態的 230+ 個模型。切換供應商毋須改動程式碼。
即時定價
透明的按用量付費定價。沒有訂閱制、沒有隱藏費用,額度永不過期。
企業級保障
支援團隊 API 金鑰、用量分析及優先支援。
數秒內立即開始
團隊用 200+ 個模型構建乜嘢
影片行銷
使用 Kling、Veo 及 Runway,為每個受眾群組生成廣告變體
產品攝影
使用 Flux 及 Midjourney 建立媲美影樓水準的產品照片
播客製作
使用 Fish Audio 及 ElevenLabs 克隆聲音並生成開場白
AI 代理
讓你的代理透過 MCP 或 REST 存取任何模型
內容配樂
使用 Suno 及 Udio 為影片和播客配樂
多語言 TTS
以自然聲音將應用程式本地化至 40 多種語言
目錄常見問題
如何瀏覽可用模型?
請前往 /models,或使用 CLI:runapi models list。可按模態、供應商篩選,或以名稱搜尋。
我可以在一個專案中使用多個模型嗎?
可以。一個 API 金鑰可用於所有 230+ 個模型。你可以自由切換影片、圖像、音樂、音訊及 LLM 模型。
新模型是如何加入的?
我們會持續加入新模型。重大版本通常會在發佈後數天內上架。請留意我們的更新日誌以掌握最新消息。
我可以要求加入特定模型嗎?
可以。請聯絡我們並提供模型名稱及供應商。我們會評估所有要求並按需求優先處理。
模型下架時會發生甚麼事?
我們會在下架前 30 天通知使用者。你現有的程式碼會繼續運作——只需將模型參數更新至較新版本即可。
模型如何定價?
文字模型按每百萬輸入及輸出 token 收費;媒體模型按秒、按張或按分鐘收費。每個模型頁面及定價表都列明具體費率。