Run Vynex Studio as a local HTTP server and trigger AI image & video generation programmatically — from scripts, automations, or your own apps. The server binds to 127.0.0.1 only and is protected by a token that refreshes every app launch.
Open Vynex Studio → Settings → Local API Server and turn on “Run local API server”. The card shows your API URL and API Token. Keep the app running while you make requests.
http://127.0.0.1:4747) and API Token.Authorization header.127.0.0.1).Every endpoint except /api/health requires the token. Provide it in any one of:
# 1. Bearer header (recommended) Authorization: Bearer <your-token> # 2. Custom header X-API-Token: <your-token> # 3. Query string http://127.0.0.1:4747/api/status?token=<your-token>
Requests without a valid token return 401 Unauthorized.
{ "ok": true, "name": "Vynex Studio", "running": false }
{
"running": true,
"stats": { "generated": 12, "failed": 1, "skipped": 3, "total": 20 },
"workers": [ { "name": "acct@gmail.com", "status": "Generating", "progress": "63%" } ]
}
{ "profiles": [ { "name": "acct@gmail.com", "active": true, "hasDevice": true } ] }
{ "credits": { "acct@gmail.com": { "credits": 1000, "updatedAt": "2026-06-21T11:00:00Z" } } }
{ "ok": true }
Request body (JSON):
| Field | Type | Description |
|---|---|---|
| prompts req* | string[] | One clip/image per prompt. (*or text) |
| text | string | Alternative to prompts — multi-line / numbered text is parsed into prompts. |
| engine | string | gemini, flow, or flow-video. Defaults to the engine selected in the app. |
| outputDir | string | Absolute folder to save into. Defaults to the app’s output folder. |
| fileNaming | string | number (1.jpg, 2.jpg…) or words. Defaults to the app setting. |
| overwrite | boolean | Regenerate files that already exist. Default false (skip existing). |
Response:
{ "ok": true, "engine": "flow", "total": 3, "toGenerate": 3, "outputDir": "D:\\images" }
If a run is already in progress it returns 400 with { "ok": false, "error": "busy" }. Other engine/model options (resolution, aspect, Veo model, duration) use the values selected in the app’s Advanced settings.
# Start a Flow image run curl -X POST http://127.0.0.1:4747/api/generate \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"engine":"flow","prompts":["a red fox in snow","a city at night"]}' # Check status curl http://127.0.0.1:4747/api/status -H "Authorization: Bearer <token>" # Stop curl -X POST http://127.0.0.1:4747/api/stop -H "Authorization: Bearer <token>"
const BASE = 'http://127.0.0.1:4747', TOKEN = '<token>'; const res = await fetch(`${BASE}/api/generate`, { method: 'POST', headers: { 'Authorization': `Bearer ${TOKEN}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ engine: 'flow-video', prompts: ['a white fox spirit transforms into a woman'], overwrite: false }) }); console.log(await res.json());
import requests BASE = 'http://127.0.0.1:4747' TOKEN = '<token>' h = {'Authorization': f'Bearer {TOKEN}'} r = requests.post(f'{BASE}/api/generate', headers=h, json={ 'engine': 'gemini', 'prompts': ['a serene mountain lake at dawn'], 'outputDir': r'D:\images\batch1', }) print(r.json())
Book a free 30-minute strategy call. We'll review your goals and match you with the right services.
We reply within 4 hours · No spam, ever