You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl -X POST http://localhost:30081/v1/images/generations \
143
181
-H "Content-Type: application/json" \
144
182
-d '{
145
183
"model": "Qwen/Qwen-Image",
@@ -149,7 +187,7 @@ curl -X POST http://localhost:30081/generate \
149
187
}'
150
188
151
189
# Decode and save the image locally
152
-
curl -s -X POST http://localhost:30081/generate \
190
+
curl -s -X POST http://localhost:30081/v1/images/generations \
153
191
-H "Content-Type: application/json" \
154
192
-d '{
155
193
"model": "Qwen/Qwen-Image",
@@ -165,12 +203,74 @@ with open('output.png', 'wb') as f:
165
203
print('Saved to output.png')
166
204
"
167
205
206
+
# Video generation request
207
+
curl -X POST http://localhost:30081/v1/videos \
208
+
-H "Content-Type: application/json" \
209
+
-d '{"model": "Qwen/Qwen-Image", "prompt": "a flowing river"}'
210
+
211
+
# Poll a specific video job by video_id
212
+
curl http://localhost:30081/v1/videos/<video_id>
213
+
168
214
169
215
curl -X POST http://localhost:30081/update_weights_from_disk \
170
216
-H "Content-Type: application/json" \
171
217
-d '{"model_path": "Qwen/Qwen-Image-2512"}'
172
218
```
173
219
220
+
---
221
+
222
+
## Router API
223
+
224
+
### Inference Endpoints
225
+
226
+
| Method | Path | Description |
227
+
|---|---|---|
228
+
|`POST`|`/v1/images/generations`| Entrypoint for text-to-image generation |
229
+
|`POST`|`/v1/videos`| Entrypoint for text-to-video generation |
230
+
231
+
### Videos Result Query
232
+
233
+
| Method | Path | Description |
234
+
|---|---|---|
235
+
|`GET`|`/v1/videos`| List or poll video jobs |
236
+
|`GET`|`/v1/videos/{video_id}`| Get status/details of a single video job |
237
+
|`GET`|`/v1/videos/{video_id}/content`| Download generated video content |
238
+
239
+
Video query routing is stable by `video_id`: router caches `video_id -> worker` on create (`POST /v1/videos`), then forwards detail/content queries to the same worker. Unknown `video_id` returns `404`.
240
+
241
+
### Model Discovery and Health Checks
242
+
243
+
| Method | Path | Description |
244
+
|---|---|---|
245
+
|`GET`|`/v1/models`| OpenAI-style model discovery |
246
+
|`GET`|`/health`| Basic health probe |
247
+
248
+
`GET /v1/models` aggregates model lists from healthy workers and de-duplicates by model `id`.
249
+
250
+
### Worker Management APIs
251
+
252
+
| Method | Path | Description |
253
+
|---|---|---|
254
+
|`POST`|`/workers`| Register a worker |
255
+
|`GET`|`/workers`| List workers (including health/load) |
256
+
|`GET`|`/workers/{worker_id}`| Get worker details |
0 commit comments