Flows
What is a Flow?
A Flow is an automated, multi-step workflow that transforms your input into a finished 3D model. We have built the Flows API with the best UX in mind for 3D model creators and developers.
How Flows Work
3D model creation through our API is a streamlined process:
-
Input
Start with a resource such as an image, text prompt, or existing 3D model. -
Processing
The Flow executes an AI pipeline that may include:- Generating intermediate representations (for example, 2D images from text prompts)
- Creating the 3D geometry
- Applying PBR textures
-
Output
Once a flow is completed the generated 3D model can be retrieved. Download your generated 3D model in glTF / GLB format.
Each Flow template is optimized for different input types:
model_generate_fromprompt– Text → 3D modelmodel_generate_fromimage– Image → 3D modelmodel_optimize– 3D model → Optimized 3D model
You simply create a Flow with your desired template and parameters, monitor its progress, and download the result when complete.
All intermediate steps are handled automatically by the API.
Example: Creating and Running a Flow
This example shows the full lifecycle of a Flow:
- Create a Flow
- Poll its status until completion
- Download the generated 3D model
Python Example
import requests
import time
from creds import GENERIO_API_KEY
API_KEY = GENERIO_API_KEY
BASE_URL = "https://flows.generio.ai"
headers = {
"Authorization": f"Bearer {API_KEY}"
}
# Define the Flow configuration
payload = {
"template": "model_generate_fromprompt",
"parameters": {
"quality": "high"
},
"inputs": [
{
"data": "A modern office chair",
"additional": None
}
],
"additional": None
}
# 1. Create and start the Flow
response = requests.post(
f"{BASE_URL}/flows",
headers=headers,
json=payload
)
flow_id = response.json()["flow_id"]
print(f"Flow created: {flow_id}")
# 2. Poll the Flow until it finishes
while True:
status = requests.get(
f"{BASE_URL}/flows/{flow_id}",
headers=headers
).json()
print(f"Progress: {status['progress'] * 100:.0f}% | State: {status['state']}")
if status["state"] in ["completed", "failed", "aborted"]:
break
time.sleep(5)
# 3. Download the output model(s)
if status["state"] == "completed":
outputs = requests.get(
f"{BASE_URL}/flows/{flow_id}/outputs",
headers=headers
).json()["outputs"]
for output in outputs:
model = requests.get(
f"{BASE_URL}/flows/{flow_id}/outputs/{output['id']}",
headers=headers
)
with open(f"model_{output['id']}.glb", "wb") as f:
f.write(model.content)
print(f"✓ Model saved: model_{output['id']}.glb")