Mochi 1
Mochi 1 is a cutting-edge, open-source AI model that transforms text prompts into stunning, high-fidelity videos. Create captivating videos from simple text prompts with unparalleled quality and realism. Experience high-fidelity motion, strong prompt adherence, and limitless creative possibilities
1import requests
2import json
3
4url = "https://api.segmind.com/v1/mochi-1"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "Create a short, looped animation of a small, fluffy creature with big, round eyes and soft fur, similar to a baby Pikachu, emulating the adorable curiosity of baby animals. The creature should be sitting in a human hand, surrounded by a soft, natural forest setting with tiny flowers and gentle lighting. Subtle, lifelike movements include slight head tilts, gentle blinking, and small, curious paw or ear twitches. Its large eyes should glimmer with curiosity and warmth, occasionally widening as it looks around its environment, embodying the innocent curiosity and playfulness of a young animal. Keep the lighting soft, creating a warm, inviting atmosphere with faint sunlight filtering through, highlighting the softness of its fur.",
12 "negative_prompt": "blurry, low quality, distorted wings",
13 "guidance_scale": 4.5,
14 "fps": 16,
15 "steps": 30,
16 "seed": 985521,
17 "frames": 52
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23 result = response.json()
24 print(json.dumps(result, indent=2))
25else:
26 print(f"Error: {response.status_code}")
27 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/mochi-1"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "Create a short, looped animation of a small, fluffy creature with big, round eyes and soft fur, similar to a baby Pikachu, emulating the adorable curiosity of baby animals. The creature should be sitting in a human hand, surrounded by a soft, natural forest setting with tiny flowers and gentle lighting. Subtle, lifelike movements include slight head tilts, gentle blinking, and small, curious paw or ear twitches. Its large eyes should glimmer with curiosity and warmth, occasionally widening as it looks around its environment, embodying the innocent curiosity and playfulness of a young animal. Keep the lighting soft, creating a warm, inviting atmosphere with faint sunlight filtering through, highlighting the softness of its fur.",
12 "negative_prompt": "blurry, low quality, distorted wings",
13 "guidance_scale": 4.5,
14 "fps": 16,
15 "steps": 30,
16 "seed": 985521,
17 "frames": 52
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23 result = response.json()
24 print(json.dumps(result, indent=2))
25else:
26 print(f"Error: {response.status_code}")
27 print(response.text)API Endpoint
https://api.segmind.com/v1/mochi-1Parameters
promptrequiredstringPrompt to generate video
fpsoptionalnumberOutput frames per second
16Range: 7 - 30framesoptionalnumberTotal frames to be generated
52Range: 1 - 160guidance_scaleoptionalnumberClassifier-free guidance scale for text prompt
4.5Range: 2 - 10negative_promptoptionalstringNegative Prompt
seedoptionalintegerRandom seed.
985521stepsoptionalintegerNumber of denoising steps
30Range: 10 - 75Response Type
Returns: Video
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out