Segmind Orbiton Serverless API

Turn one photo into a shot with the camera move you choose: orbit, push in, rise, track, dolly zoom and more, with the amount and pace you set, or Auto to let Segmind Orbiton pick. For filmmakers, brands and creators. Up to 1080p.

~5m 51s
~$2.7795
 1import requests
 2import time
 3import json
 4
 5api_key = "YOUR_API_KEY"
 6url = "https://api.segmind.com/workflows/v2/6af7725d4d438d04dd364fab-v2"
 7
 8data = {
 9    "image": "https://images.segmind.com/public/16d3a7fc460f582d48d46ecef78e39d4.jpg",
10    "camera_move": "Orbit right",
11    "amount": "Auto",
12    "pace": "Auto",
13    "then_move": "None",
14    "shot_notes": "She holds her pose while the camera circles her.",
15    "duration": "5",
16    "resolution": "1080p"
17}
18
19def poll_for_result(poll_url):
20    """Poll the API until the generation is complete"""
21    while True:
22        response = requests.get(
23            poll_url,
24            headers={'x-api-key': api_key}
25        )
26        result = response.json()
27
28        if result['status'] == 'COMPLETED':
29            # Parse the output (it's a JSON string)
30            outputs = json.loads(result['output'])
31            return outputs
32        elif result['status'] == 'FAILED':
33            raise Exception(result.get('error', 'Generation failed'))
34
35        # Wait 7 seconds before polling again
36        time.sleep(7)
37
38# Make the initial request
39response = requests.post(
40    url,
41    json=data,
42    headers={
43        'x-api-key': api_key,
44        'Content-Type': 'application/json'
45    }
46)
47
48if response.status_code == 200:
49    result = response.json()
50    print('Request queued:', result)
51
52    # Start polling for results
53    outputs = poll_for_result(result['poll_url'])
54    print('Generation complete:', outputs)
55else:
56    print(f"Error: {response.status_code}")
57    print(response.text)

API Endpoint

POSThttps://api.segmind.com/workflows/v2/6af7725d4d438d04dd364fab-v2

Parameters

imageoptional
string (uri)

Photo

Default: "https://images.segmind.com/public/16d3a7fc460f582d48d46ecef78e39d4.jpg"
camera_moveoptional
string

Camera move

Default: "Orbit right"
amountoptional
string

Amount

Default: "Auto"
paceoptional
string

Pace

Default: "Auto"
then_moveoptional
string

Then

Default: "None"
shot_notesoptional
string

Shot notes (optional)

Default: "She holds her pose while the camera circles her."
durationoptional
string

Length in seconds

Default: "5"
resolutionoptional
string

Resolution

Default: "1080p"

Response Format

Returns: Polling-based asynchronous response

Initial request returns a poll_url. Poll every 7 seconds until status is COMPLETED.

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Workflow not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out