Story shots
ใช้งานได้Describe what happens in a scene. Get a shot list: each shot a plain description of the camera and the action, with its length in seconds.
Story shots
อินพุต
descriptionWhat happens in the scene, where and with whom.total_durationSeconds the scene should last (3 to 60).10 sstyleThe visual style, e.g. anime or film noir.location_nameWhere the scene happens.$0.078 per run.
These tools need an API key with the api:opennan scope: paste one under Use API key to run them.
ทำงานอย่างไร
- 01Describe the sceneWhat happens, who is in it and where.
- 02We plan the shotsCamera moves and action, checked to flow as one scene.
- 03Get the listPlain descriptions with their lengths, ready to film or generate.
เรียก Story shots จากโค้ดของคุณ
One endpoint and one key, on the same balance as the playground. The request below is the example's own.
https:/ / api.opennan.com/ v1/ story/ shotsรับคีย์ API
สร้างคีย์ในคอนโซล คีย์ใช้ยอดเงินเดียวกับส่วนทดลองใช้
สร้างคีย์ส่งคำขอแรก
คำขอเดียวกับที่ส่วนทดลองใช้ส่ง ตั้งค่า OPENNAN_KEY เป็นคีย์ของคุณ
curl https://api.opennan.com/v1/story/shots \ -H "Authorization: Bearer $OPENNAN_KEY" \ -H "Content-Type: application/json" \ -d '{"description":"A traveler runs toward a train as its doors begin to close.","total_duration":10}' # Then poll until "status" is "succeeded" or "failed": curl https://api.opennan.com/v1/tasks/<task id> -H "Authorization: Bearer $OPENNAN_KEY"ตรวจสถานะงาน
การเรียกจะตอบกลับทันทีด้วย id งาน ตรวจงานนั้นจนกว่าจะเสร็จ:
GEThttps:// api.opennan.com/ v1/ tasks/ {id} - queued
- รอเครื่องว่าง
- running
- กำลังสร้าง
- succeeded
- เสร็จแล้ว: outputs[].url มีไฟล์
- failed
- ไม่สำเร็จ: ไม่เสียเงิน
ข้อผิดพลาดและวิธีแก้
401ไม่มีคีย์หรือคีย์ผิด
ส่งเฮดเดอร์ Authorization: Bearer พร้อมคีย์จากคอนโซล
402ยอดเงินไม่พอ
เติมเงินในหน้าการเรียกเก็บเงิน แล้วส่งคำขอเดิมอีกครั้ง
400มีค่าที่ระบบไม่รับ
อ่าน error.message ซึ่งบอกชื่อช่อง แล้วใช้ค่าจากตารางพารามิเตอร์
429คำขอมากเกินไป
รอสักครู่แล้วลองใหม่ และรอนานขึ้นทุกครั้งที่เจอ 429
เพิ่ม Opennan ในแอป AI ของคุณ
ติดตั้งครั้งเดียว AI ของคุณใช้ได้ทุกเครื่องมือของ Opennan: วิดีโอ รูปภาพ แชต เสียงพูด เพลง เอฟเฟกต์เสียง 3D คำบรรยาย และพากย์เสียง เลือกแอปของคุณแล้วทำตามขั้นตอน
https:/ / api.opennan.com/ v1/ mcpใช้ได้กับ Codex CLI, แอป Codex และส่วนขยาย Codex ใน IDE เพราะใช้ ~/.codex/config.toml ร่วมกัน ถ้าแอปหรือ IDE มองไม่เห็น OPENNAN_KEY ให้ใช้แบบ config.toml ที่ใส่คีย์ไว้ Codex จะถามก่อนเรียกเครื่องมือแต่ละครั้ง กดอนุมัติเพื่อไปต่อ
บันทึกคีย์เป็น OPENNAN_KEY
# macOS / Linux (zsh shown; bash: ~/.bashrc) echo 'export OPENNAN_KEY="sk-..."' >> ~/.zshrc source ~/.zshrc # Windows (PowerShell), then open a new terminal setx OPENNAN_KEY "sk-..."ติดตั้งปลั๊กอิน Opennan: ได้ทั้งเซิร์ฟเวอร์และสกิลที่สอนให้ AI เลือกโมเดล ยืนยันราคา และรอผลลัพธ์
codex plugin marketplace add Opennan/opennan-ai-plugin codex plugin add opennan@opennanหรือเพิ่มแค่เซิร์ฟเวอร์
codex mcp add opennan --url https://api.opennan.com/v1/mcp --bearer-token-env-var OPENNAN_KEYหรือเพิ่มสิ่งนี้ใน ~/.codex/config.toml
[mcp_servers.opennan] url = "https://api.opennan.com/v1/mcp" http_headers = { Authorization = "Bearer sk-..." }ตรวจว่ามี opennan อยู่ในรายการ
codex mcp listรีสตาร์ต Codex แล้วสั่งได้เลย
“ทำวิดีโอ 5 วินาทีเป็นฝนตกบนถนนแสงนีออน พร้อมเพลงประกอบและภาพโปสเตอร์”
แทน sk-... ด้วยคีย์ของคุณและเก็บเป็นความลับ ใครมีคีย์นี้ก็ใช้ยอดเงินของคุณได้ แอปแสดงรายการเครื่องมือได้ก่อนใส่คีย์ แต่การสร้างงานต้องใช้คีย์
ใช้จากเอเจนต์ AI
เพิ่มเซิร์ฟเวอร์ MCP ของ Opennan ให้เอเจนต์ แล้วเรียกเครื่องมือนี้
- เครื่องมือ
- generate_camera_shots
- ตัวอย่างอาร์กิวเมนต์
{ "description": "A traveler runs toward a train as its doors begin to close.", "total_duration": 10 }
Story shots: คำถามที่พบบ่อย
Story shots ราคาเท่าไร
$0.078 per run. The Run button shows the exact price for your input before you start.
เรียกจากโค้ดของฉันอย่างไร
ส่ง POST https://api.opennan.com/v1/story/shots พร้อมคีย์ API ของคุณ ระบบตอบกลับด้วย id งาน: ตรวจ https://api.opennan.com/v1/tasks/{id} จนกว่างานจะสำเร็จหรือไม่สำเร็จ
เอเจนต์ AI ของฉันใช้ได้ไหม
ได้ เพิ่มเซิร์ฟเวอร์ MCP https://api.opennan.com/v1/mcp แล้วเรียกเครื่องมือ generate_camera_shots หรือให้เอเจนต์อ่าน https://api.opennan.com/llms.txt
ถ้ารันไม่สำเร็จจะเป็นอย่างไร
การรันที่ไม่สำเร็จไม่คิดเงิน คุณจ่ายเฉพาะผลลัพธ์
Which API key do I need?
A key with the api:opennan scope. A full api key does not include it: create one with that scope in the console, then use it here under Use API key or in your code.