Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -852,7 +852,39 @@ MAX_VIDEO_RETRIES = 6
|
|
| 852 |
|
| 853 |
@app.get("/gen/video/airforce/{prompt}")
|
| 854 |
@app.post("/gen/video/airforce")
|
|
|
|
| 855 |
async def genvideo_airforce(request: Request, prompt: str = None):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 856 |
aspectRatio = "3:2"
|
| 857 |
inputMode = "normal"
|
| 858 |
|
|
|
|
| 852 |
|
| 853 |
@app.get("/gen/video/airforce/{prompt}")
|
| 854 |
@app.post("/gen/video/airforce")
|
| 855 |
+
@app.head("/gen/video/airforce")
|
| 856 |
async def genvideo_airforce(request: Request, prompt: str = None):
|
| 857 |
+
if request.method == "HEAD":
|
| 858 |
+
return Response(
|
| 859 |
+
status_code=200,
|
| 860 |
+
headers={
|
| 861 |
+
|
| 862 |
+
# Required field
|
| 863 |
+
"Y-prompt": "string — required. The text prompt used to generate the video.",
|
| 864 |
+
|
| 865 |
+
# Optional fields
|
| 866 |
+
"Y-ratio": "string — optional. Aspect ratio of the output video.",
|
| 867 |
+
"Y-ratio-values": "3:2,2:3,1:1",
|
| 868 |
+
"Y-ratio-default": "3:2",
|
| 869 |
+
|
| 870 |
+
"Y-mode": "string — optional. Controls generation style.",
|
| 871 |
+
"Y-mode-values": "normal,fun",
|
| 872 |
+
"Y-mode-default": "normal",
|
| 873 |
+
|
| 874 |
+
"Y-duration": "integer — optional. Duration in seconds.",
|
| 875 |
+
"Y-duration-default": "5",
|
| 876 |
+
|
| 877 |
+
"Y-image_urls": "array<string> — optional. Up to 2 image URLs for conditioning.",
|
| 878 |
+
"Y-image_urls-max": "2",
|
| 879 |
+
|
| 880 |
+
# Response format
|
| 881 |
+
"Y-response_format": "video/mp4",
|
| 882 |
+
|
| 883 |
+
# Model info
|
| 884 |
+
"Y-model": "grok-imagine-video"
|
| 885 |
+
}
|
| 886 |
+
)
|
| 887 |
+
|
| 888 |
aspectRatio = "3:2"
|
| 889 |
inputMode = "normal"
|
| 890 |
|