@volter/twin-openrouter 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +131 -0
  3. package/client/openrouter-mirror.css +131 -0
  4. package/client/openrouter-mirror.tsx +221 -0
  5. package/dist/client/openrouter-mirror.bundle.js +235 -0
  6. package/dist/client/openrouter-mirror.css +131 -0
  7. package/dist/client/openrouter-mirror.d.ts +1 -0
  8. package/dist/client/openrouter-mirror.js +95 -0
  9. package/dist/client/openrouter-mirror.tsx +221 -0
  10. package/dist/src/cli.d.ts +2 -0
  11. package/dist/src/cli.js +31 -0
  12. package/dist/src/index.d.ts +15 -0
  13. package/dist/src/index.js +66 -0
  14. package/dist/src/openrouter-budget.d.ts +58 -0
  15. package/dist/src/openrouter-budget.js +133 -0
  16. package/dist/src/openrouter-capabilities.d.ts +3 -0
  17. package/dist/src/openrouter-capabilities.js +720 -0
  18. package/dist/src/openrouter-conformance.d.ts +11 -0
  19. package/dist/src/openrouter-conformance.js +53 -0
  20. package/dist/src/openrouter-connector.d.ts +90 -0
  21. package/dist/src/openrouter-connector.js +245 -0
  22. package/dist/src/openrouter-local-generation.d.ts +17 -0
  23. package/dist/src/openrouter-local-generation.js +271 -0
  24. package/dist/src/openrouter-mirror-ui.d.ts +12 -0
  25. package/dist/src/openrouter-mirror-ui.js +78 -0
  26. package/dist/src/openrouter-models.d.ts +39 -0
  27. package/dist/src/openrouter-models.js +78 -0
  28. package/dist/src/openrouter-scenario.d.ts +36 -0
  29. package/dist/src/openrouter-scenario.js +145 -0
  30. package/dist/src/openrouter-server.d.ts +20 -0
  31. package/dist/src/openrouter-server.js +144 -0
  32. package/dist/src/openrouter-stub.d.ts +8 -0
  33. package/dist/src/openrouter-stub.js +58 -0
  34. package/dist/src/openrouter-twin.d.ts +4 -0
  35. package/dist/src/openrouter-twin.js +1506 -0
  36. package/dist/src/openrouter-types.d.ts +50 -0
  37. package/dist/src/openrouter-types.js +1 -0
  38. package/dist/test-fixtures/openrouter-openapi-operations.SOURCE.md +16 -0
  39. package/dist/test-fixtures/openrouter-openapi-operations.json +1041 -0
  40. package/package.json +71 -0
  41. package/src/cli.ts +29 -0
  42. package/src/index.ts +108 -0
  43. package/src/openrouter-budget.ts +159 -0
  44. package/src/openrouter-capabilities.ts +861 -0
  45. package/src/openrouter-conformance.ts +60 -0
  46. package/src/openrouter-connector.ts +264 -0
  47. package/src/openrouter-local-generation.ts +207 -0
  48. package/src/openrouter-mirror-ui.ts +84 -0
  49. package/src/openrouter-models.ts +118 -0
  50. package/src/openrouter-scenario.ts +156 -0
  51. package/src/openrouter-server.ts +158 -0
  52. package/src/openrouter-stub.ts +60 -0
  53. package/src/openrouter-twin.ts +1441 -0
  54. package/src/openrouter-types.ts +49 -0
  55. package/test-fixtures/openrouter-openapi-operations.SOURCE.md +16 -0
  56. package/test-fixtures/openrouter-openapi-operations.json +1041 -0
@@ -0,0 +1,1041 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "OpenRouter API (spec-census scoped subset)",
5
+ "version": "1.0.0",
6
+ "description": "A scope-filtered SUBSET of the upstream spec (https://openrouter.ai/openapi.json), derived by scripts/spec-census-bootstrap.ts: every operation under the committed scopePaths, operation metadata only (operationId, summary, tags, servers) \u2014 schemas AND response codes dropped, which makes this an operation INVENTORY in OpenAPI's shape rather than a valid OpenAPI document: it says which operations exist and nothing about what they answer. It carried the FIRST response code per operation, which reads as the whole set \u2014 diff status codes against the freshly fetched spec instead. It is ONLY the operation-inventory denominator for ../openrouter-spec-census.json; see openrouter-openapi-operations.SOURCE.md for provenance."
7
+ },
8
+ "servers": [
9
+ {
10
+ "description": "Production server",
11
+ "url": "https://openrouter.ai/api/v1",
12
+ "x-speakeasy-server-id": "production"
13
+ }
14
+ ],
15
+ "x-source": {
16
+ "vendor": "openrouter",
17
+ "upstream": "https://openrouter.ai/openapi.json",
18
+ "upstreamFile": "openapi.json",
19
+ "vendored": "derived by scripts/spec-census-bootstrap.ts from openapi.json fetched 2026-09-02 \u2014 scope-filtered to scopePaths, schemas and response codes dropped",
20
+ "curatedOn": "2026-09-02",
21
+ "scope": "/analytics, /audio, /auth, /byok, /chat/, /credits, /datasets, /embeddings, /files, /generation, /guardrails, /key, /messages, /models, /observability/destinations, /organization/members, /presets, /providers, /rerank, /responses, /videos, /workspaces"
22
+ },
23
+ "paths": {
24
+ "/analytics/meta": {
25
+ "servers": [
26
+ {
27
+ "url": "https://openrouter.ai/api/v1"
28
+ }
29
+ ],
30
+ "get": {
31
+ "operationId": "getAnalyticsMeta",
32
+ "summary": "Get available analytics metrics and dimensions",
33
+ "tags": [
34
+ "Analytics"
35
+ ]
36
+ }
37
+ },
38
+ "/analytics/query": {
39
+ "servers": [
40
+ {
41
+ "url": "https://openrouter.ai/api/v1"
42
+ }
43
+ ],
44
+ "post": {
45
+ "operationId": "queryAnalytics",
46
+ "summary": "Query analytics data",
47
+ "tags": [
48
+ "Analytics"
49
+ ]
50
+ }
51
+ },
52
+ "/audio/speech": {
53
+ "servers": [
54
+ {
55
+ "url": "https://openrouter.ai/api/v1"
56
+ }
57
+ ],
58
+ "post": {
59
+ "operationId": "createAudioSpeech",
60
+ "summary": "Create speech",
61
+ "tags": [
62
+ "TTS"
63
+ ]
64
+ }
65
+ },
66
+ "/audio/transcriptions": {
67
+ "servers": [
68
+ {
69
+ "url": "https://openrouter.ai/api/v1"
70
+ }
71
+ ],
72
+ "post": {
73
+ "operationId": "createAudioTranscriptions",
74
+ "summary": "Create transcription",
75
+ "tags": [
76
+ "STT"
77
+ ]
78
+ }
79
+ },
80
+ "/auth/keys": {
81
+ "servers": [
82
+ {
83
+ "url": "https://openrouter.ai/api/v1"
84
+ }
85
+ ],
86
+ "post": {
87
+ "operationId": "exchangeAuthCodeForAPIKey",
88
+ "summary": "Exchange authorization code for API key",
89
+ "tags": [
90
+ "OAuth"
91
+ ]
92
+ }
93
+ },
94
+ "/auth/keys/code": {
95
+ "servers": [
96
+ {
97
+ "url": "https://openrouter.ai/api/v1"
98
+ }
99
+ ],
100
+ "post": {
101
+ "operationId": "createAuthKeysCode",
102
+ "summary": "Create authorization code",
103
+ "tags": [
104
+ "OAuth"
105
+ ]
106
+ }
107
+ },
108
+ "/byok": {
109
+ "servers": [
110
+ {
111
+ "url": "https://openrouter.ai/api/v1"
112
+ }
113
+ ],
114
+ "get": {
115
+ "operationId": "listBYOKKeys",
116
+ "summary": "List BYOK provider credentials",
117
+ "tags": [
118
+ "BYOK"
119
+ ]
120
+ },
121
+ "post": {
122
+ "operationId": "createBYOKKey",
123
+ "summary": "Create a BYOK provider credential",
124
+ "tags": [
125
+ "BYOK"
126
+ ]
127
+ }
128
+ },
129
+ "/byok/{id}": {
130
+ "servers": [
131
+ {
132
+ "url": "https://openrouter.ai/api/v1"
133
+ }
134
+ ],
135
+ "delete": {
136
+ "operationId": "deleteBYOKKey",
137
+ "summary": "Delete a BYOK provider credential",
138
+ "tags": [
139
+ "BYOK"
140
+ ]
141
+ },
142
+ "get": {
143
+ "operationId": "getBYOKKey",
144
+ "summary": "Get a BYOK provider credential",
145
+ "tags": [
146
+ "BYOK"
147
+ ]
148
+ },
149
+ "patch": {
150
+ "operationId": "updateBYOKKey",
151
+ "summary": "Update a BYOK provider credential",
152
+ "tags": [
153
+ "BYOK"
154
+ ]
155
+ }
156
+ },
157
+ "/chat/completions": {
158
+ "servers": [
159
+ {
160
+ "url": "https://openrouter.ai/api/v1"
161
+ }
162
+ ],
163
+ "post": {
164
+ "operationId": "sendChatCompletionRequest",
165
+ "summary": "Create a chat completion",
166
+ "tags": [
167
+ "Chat"
168
+ ]
169
+ }
170
+ },
171
+ "/credits": {
172
+ "servers": [
173
+ {
174
+ "url": "https://openrouter.ai/api/v1"
175
+ }
176
+ ],
177
+ "get": {
178
+ "operationId": "getCredits",
179
+ "summary": "Get remaining credits",
180
+ "tags": [
181
+ "Credits"
182
+ ]
183
+ }
184
+ },
185
+ "/credits/coinbase": {
186
+ "servers": [
187
+ {
188
+ "url": "https://openrouter.ai/api/v1"
189
+ }
190
+ ],
191
+ "post": {
192
+ "operationId": "createCoinbaseCharge",
193
+ "summary": "Deprecated Coinbase Commerce charge endpoint",
194
+ "tags": [
195
+ "Credits"
196
+ ]
197
+ }
198
+ },
199
+ "/datasets/app-rankings": {
200
+ "servers": [
201
+ {
202
+ "url": "https://openrouter.ai/api/v1"
203
+ }
204
+ ],
205
+ "get": {
206
+ "operationId": "getAppRankings",
207
+ "summary": "Top apps by token usage",
208
+ "tags": [
209
+ "Datasets"
210
+ ]
211
+ }
212
+ },
213
+ "/datasets/rankings-daily": {
214
+ "servers": [
215
+ {
216
+ "url": "https://openrouter.ai/api/v1"
217
+ }
218
+ ],
219
+ "get": {
220
+ "operationId": "getRankingsDaily",
221
+ "summary": "Daily token totals for top 50 models",
222
+ "tags": [
223
+ "Datasets"
224
+ ]
225
+ }
226
+ },
227
+ "/datasets/session-cost": {
228
+ "servers": [
229
+ {
230
+ "url": "https://openrouter.ai/api/v1"
231
+ }
232
+ ],
233
+ "get": {
234
+ "operationId": "getSessionCost",
235
+ "summary": "Cost per session by harness and model",
236
+ "tags": [
237
+ "Datasets"
238
+ ]
239
+ }
240
+ },
241
+ "/embeddings": {
242
+ "servers": [
243
+ {
244
+ "url": "https://openrouter.ai/api/v1"
245
+ }
246
+ ],
247
+ "post": {
248
+ "operationId": "createEmbeddings",
249
+ "summary": "Submit an embedding request",
250
+ "tags": [
251
+ "Embeddings"
252
+ ]
253
+ }
254
+ },
255
+ "/embeddings/models": {
256
+ "servers": [
257
+ {
258
+ "url": "https://openrouter.ai/api/v1"
259
+ }
260
+ ],
261
+ "get": {
262
+ "operationId": "listEmbeddingsModels",
263
+ "summary": "List all embeddings models",
264
+ "tags": [
265
+ "Embeddings"
266
+ ]
267
+ }
268
+ },
269
+ "/files": {
270
+ "servers": [
271
+ {
272
+ "url": "https://openrouter.ai/api/v1"
273
+ }
274
+ ],
275
+ "get": {
276
+ "operationId": "listFiles",
277
+ "summary": "List files",
278
+ "tags": [
279
+ "Files"
280
+ ]
281
+ },
282
+ "post": {
283
+ "operationId": "uploadFile",
284
+ "summary": "Upload a file",
285
+ "tags": [
286
+ "Files"
287
+ ]
288
+ }
289
+ },
290
+ "/files/{file_id}": {
291
+ "servers": [
292
+ {
293
+ "url": "https://openrouter.ai/api/v1"
294
+ }
295
+ ],
296
+ "delete": {
297
+ "operationId": "deleteFile",
298
+ "summary": "Delete a file",
299
+ "tags": [
300
+ "Files"
301
+ ]
302
+ },
303
+ "get": {
304
+ "operationId": "getFileMetadata",
305
+ "summary": "Get file metadata",
306
+ "tags": [
307
+ "Files"
308
+ ]
309
+ }
310
+ },
311
+ "/files/{file_id}/content": {
312
+ "servers": [
313
+ {
314
+ "url": "https://openrouter.ai/api/v1"
315
+ }
316
+ ],
317
+ "get": {
318
+ "operationId": "downloadFileContent",
319
+ "summary": "Download file content",
320
+ "tags": [
321
+ "Files"
322
+ ]
323
+ }
324
+ },
325
+ "/generation": {
326
+ "servers": [
327
+ {
328
+ "url": "https://openrouter.ai/api/v1"
329
+ }
330
+ ],
331
+ "get": {
332
+ "operationId": "getGeneration",
333
+ "summary": "Get request & usage metadata for a generation",
334
+ "tags": [
335
+ "Generations"
336
+ ]
337
+ }
338
+ },
339
+ "/generation/content": {
340
+ "servers": [
341
+ {
342
+ "url": "https://openrouter.ai/api/v1"
343
+ }
344
+ ],
345
+ "get": {
346
+ "operationId": "listGenerationContent",
347
+ "summary": "Get stored prompt, completion, and error content for a generation",
348
+ "tags": [
349
+ "Generations"
350
+ ]
351
+ }
352
+ },
353
+ "/generation/feedback": {
354
+ "servers": [
355
+ {
356
+ "url": "https://openrouter.ai/api/v1"
357
+ }
358
+ ],
359
+ "post": {
360
+ "operationId": "submitGenerationFeedback",
361
+ "summary": "Submit feedback for a generation",
362
+ "tags": [
363
+ "Generations"
364
+ ]
365
+ }
366
+ },
367
+ "/guardrails": {
368
+ "servers": [
369
+ {
370
+ "url": "https://openrouter.ai/api/v1"
371
+ }
372
+ ],
373
+ "get": {
374
+ "operationId": "listGuardrails",
375
+ "summary": "List guardrails",
376
+ "tags": [
377
+ "Guardrails"
378
+ ]
379
+ },
380
+ "post": {
381
+ "operationId": "createGuardrail",
382
+ "summary": "Create a guardrail",
383
+ "tags": [
384
+ "Guardrails"
385
+ ]
386
+ }
387
+ },
388
+ "/guardrails/{id}": {
389
+ "servers": [
390
+ {
391
+ "url": "https://openrouter.ai/api/v1"
392
+ }
393
+ ],
394
+ "delete": {
395
+ "operationId": "deleteGuardrail",
396
+ "summary": "Delete a guardrail",
397
+ "tags": [
398
+ "Guardrails"
399
+ ]
400
+ },
401
+ "get": {
402
+ "operationId": "getGuardrail",
403
+ "summary": "Get a guardrail",
404
+ "tags": [
405
+ "Guardrails"
406
+ ]
407
+ },
408
+ "patch": {
409
+ "operationId": "updateGuardrail",
410
+ "summary": "Update a guardrail",
411
+ "tags": [
412
+ "Guardrails"
413
+ ]
414
+ }
415
+ },
416
+ "/guardrails/{id}/assignments/keys": {
417
+ "servers": [
418
+ {
419
+ "url": "https://openrouter.ai/api/v1"
420
+ }
421
+ ],
422
+ "get": {
423
+ "operationId": "listGuardrailKeyAssignments",
424
+ "summary": "List key assignments for a guardrail",
425
+ "tags": [
426
+ "Guardrails"
427
+ ]
428
+ },
429
+ "post": {
430
+ "operationId": "bulkAssignKeysToGuardrail",
431
+ "summary": "Bulk assign keys to a guardrail",
432
+ "tags": [
433
+ "Guardrails"
434
+ ]
435
+ }
436
+ },
437
+ "/guardrails/{id}/assignments/keys/remove": {
438
+ "servers": [
439
+ {
440
+ "url": "https://openrouter.ai/api/v1"
441
+ }
442
+ ],
443
+ "post": {
444
+ "operationId": "bulkUnassignKeysFromGuardrail",
445
+ "summary": "Bulk unassign keys from a guardrail",
446
+ "tags": [
447
+ "Guardrails"
448
+ ]
449
+ }
450
+ },
451
+ "/guardrails/{id}/assignments/members": {
452
+ "servers": [
453
+ {
454
+ "url": "https://openrouter.ai/api/v1"
455
+ }
456
+ ],
457
+ "get": {
458
+ "operationId": "listGuardrailMemberAssignments",
459
+ "summary": "List member assignments for a guardrail",
460
+ "tags": [
461
+ "Guardrails"
462
+ ]
463
+ },
464
+ "post": {
465
+ "operationId": "bulkAssignMembersToGuardrail",
466
+ "summary": "Bulk assign members to a guardrail",
467
+ "tags": [
468
+ "Guardrails"
469
+ ]
470
+ }
471
+ },
472
+ "/guardrails/{id}/assignments/members/remove": {
473
+ "servers": [
474
+ {
475
+ "url": "https://openrouter.ai/api/v1"
476
+ }
477
+ ],
478
+ "post": {
479
+ "operationId": "bulkUnassignMembersFromGuardrail",
480
+ "summary": "Bulk unassign members from a guardrail",
481
+ "tags": [
482
+ "Guardrails"
483
+ ]
484
+ }
485
+ },
486
+ "/guardrails/assignments/keys": {
487
+ "servers": [
488
+ {
489
+ "url": "https://openrouter.ai/api/v1"
490
+ }
491
+ ],
492
+ "get": {
493
+ "operationId": "listKeyAssignments",
494
+ "summary": "List all key assignments",
495
+ "tags": [
496
+ "Guardrails"
497
+ ]
498
+ }
499
+ },
500
+ "/guardrails/assignments/members": {
501
+ "servers": [
502
+ {
503
+ "url": "https://openrouter.ai/api/v1"
504
+ }
505
+ ],
506
+ "get": {
507
+ "operationId": "listMemberAssignments",
508
+ "summary": "List all member assignments",
509
+ "tags": [
510
+ "Guardrails"
511
+ ]
512
+ }
513
+ },
514
+ "/key": {
515
+ "servers": [
516
+ {
517
+ "url": "https://openrouter.ai/api/v1"
518
+ }
519
+ ],
520
+ "get": {
521
+ "operationId": "getCurrentKey",
522
+ "summary": "Get current API key",
523
+ "tags": [
524
+ "API Keys"
525
+ ]
526
+ }
527
+ },
528
+ "/keys": {
529
+ "servers": [
530
+ {
531
+ "url": "https://openrouter.ai/api/v1"
532
+ }
533
+ ],
534
+ "get": {
535
+ "operationId": "list",
536
+ "summary": "List API keys",
537
+ "tags": [
538
+ "API Keys"
539
+ ]
540
+ },
541
+ "post": {
542
+ "operationId": "createKeys",
543
+ "summary": "Create a new API key",
544
+ "tags": [
545
+ "API Keys"
546
+ ]
547
+ }
548
+ },
549
+ "/keys/{hash}": {
550
+ "servers": [
551
+ {
552
+ "url": "https://openrouter.ai/api/v1"
553
+ }
554
+ ],
555
+ "delete": {
556
+ "operationId": "deleteKeys",
557
+ "summary": "Delete an API key",
558
+ "tags": [
559
+ "API Keys"
560
+ ]
561
+ },
562
+ "get": {
563
+ "operationId": "getKey",
564
+ "summary": "Get a single API key",
565
+ "tags": [
566
+ "API Keys"
567
+ ]
568
+ },
569
+ "patch": {
570
+ "operationId": "updateKeys",
571
+ "summary": "Update an API key",
572
+ "tags": [
573
+ "API Keys"
574
+ ]
575
+ }
576
+ },
577
+ "/messages": {
578
+ "servers": [
579
+ {
580
+ "url": "https://openrouter.ai/api/v1"
581
+ }
582
+ ],
583
+ "post": {
584
+ "operationId": "createMessages",
585
+ "summary": "Create a message",
586
+ "tags": [
587
+ "Anthropic Messages"
588
+ ]
589
+ }
590
+ },
591
+ "/models": {
592
+ "servers": [
593
+ {
594
+ "url": "https://openrouter.ai/api/v1"
595
+ }
596
+ ],
597
+ "get": {
598
+ "operationId": "getModels",
599
+ "summary": "List all models and their properties",
600
+ "tags": [
601
+ "Models"
602
+ ]
603
+ }
604
+ },
605
+ "/models/{author}/{slug}/endpoints": {
606
+ "servers": [
607
+ {
608
+ "url": "https://openrouter.ai/api/v1"
609
+ }
610
+ ],
611
+ "get": {
612
+ "operationId": "listEndpoints",
613
+ "summary": "List all endpoints for a model",
614
+ "tags": [
615
+ "Endpoints"
616
+ ]
617
+ }
618
+ },
619
+ "/models/count": {
620
+ "servers": [
621
+ {
622
+ "url": "https://openrouter.ai/api/v1"
623
+ }
624
+ ],
625
+ "get": {
626
+ "operationId": "listModelsCount",
627
+ "summary": "Get total count of available models",
628
+ "tags": [
629
+ "Models"
630
+ ]
631
+ }
632
+ },
633
+ "/models/user": {
634
+ "servers": [
635
+ {
636
+ "url": "https://openrouter.ai/api/v1"
637
+ }
638
+ ],
639
+ "get": {
640
+ "operationId": "listModelsUser",
641
+ "summary": "List models filtered by user provider preferences, privacy settings, and guardrails",
642
+ "tags": [
643
+ "Models"
644
+ ]
645
+ }
646
+ },
647
+ "/observability/destinations": {
648
+ "servers": [
649
+ {
650
+ "url": "https://openrouter.ai/api/v1"
651
+ }
652
+ ],
653
+ "get": {
654
+ "operationId": "listObservabilityDestinations",
655
+ "summary": "List observability destinations",
656
+ "tags": [
657
+ "Observability"
658
+ ]
659
+ },
660
+ "post": {
661
+ "operationId": "createObservabilityDestination",
662
+ "summary": "Create an observability destination",
663
+ "tags": [
664
+ "Observability"
665
+ ]
666
+ }
667
+ },
668
+ "/observability/destinations/{id}": {
669
+ "servers": [
670
+ {
671
+ "url": "https://openrouter.ai/api/v1"
672
+ }
673
+ ],
674
+ "delete": {
675
+ "operationId": "deleteObservabilityDestination",
676
+ "summary": "Delete an observability destination",
677
+ "tags": [
678
+ "Observability"
679
+ ]
680
+ },
681
+ "get": {
682
+ "operationId": "getObservabilityDestination",
683
+ "summary": "Get an observability destination",
684
+ "tags": [
685
+ "Observability"
686
+ ]
687
+ },
688
+ "patch": {
689
+ "operationId": "updateObservabilityDestination",
690
+ "summary": "Update an observability destination",
691
+ "tags": [
692
+ "Observability"
693
+ ]
694
+ }
695
+ },
696
+ "/organization/members": {
697
+ "servers": [
698
+ {
699
+ "url": "https://openrouter.ai/api/v1"
700
+ }
701
+ ],
702
+ "get": {
703
+ "operationId": "listOrganizationMembers",
704
+ "summary": "List organization members",
705
+ "tags": [
706
+ "Organization"
707
+ ]
708
+ }
709
+ },
710
+ "/presets": {
711
+ "servers": [
712
+ {
713
+ "url": "https://openrouter.ai/api/v1"
714
+ }
715
+ ],
716
+ "get": {
717
+ "operationId": "listPresets",
718
+ "summary": "List presets",
719
+ "tags": [
720
+ "Presets"
721
+ ]
722
+ }
723
+ },
724
+ "/presets/{slug}": {
725
+ "servers": [
726
+ {
727
+ "url": "https://openrouter.ai/api/v1"
728
+ }
729
+ ],
730
+ "get": {
731
+ "operationId": "getPreset",
732
+ "summary": "Get a preset",
733
+ "tags": [
734
+ "Presets"
735
+ ]
736
+ }
737
+ },
738
+ "/presets/{slug}/chat/completions": {
739
+ "servers": [
740
+ {
741
+ "url": "https://openrouter.ai/api/v1"
742
+ }
743
+ ],
744
+ "post": {
745
+ "operationId": "createPresetsChatCompletions",
746
+ "summary": "Create a preset from a chat-completions request body",
747
+ "tags": [
748
+ "Presets"
749
+ ]
750
+ }
751
+ },
752
+ "/presets/{slug}/messages": {
753
+ "servers": [
754
+ {
755
+ "url": "https://openrouter.ai/api/v1"
756
+ }
757
+ ],
758
+ "post": {
759
+ "operationId": "createPresetsMessages",
760
+ "summary": "Create a preset from a messages request body",
761
+ "tags": [
762
+ "Presets"
763
+ ]
764
+ }
765
+ },
766
+ "/presets/{slug}/responses": {
767
+ "servers": [
768
+ {
769
+ "url": "https://openrouter.ai/api/v1"
770
+ }
771
+ ],
772
+ "post": {
773
+ "operationId": "createPresetsResponses",
774
+ "summary": "Create a preset from a responses request body",
775
+ "tags": [
776
+ "Presets"
777
+ ]
778
+ }
779
+ },
780
+ "/presets/{slug}/versions": {
781
+ "servers": [
782
+ {
783
+ "url": "https://openrouter.ai/api/v1"
784
+ }
785
+ ],
786
+ "get": {
787
+ "operationId": "listPresetVersions",
788
+ "summary": "List versions of a preset",
789
+ "tags": [
790
+ "Presets"
791
+ ]
792
+ }
793
+ },
794
+ "/presets/{slug}/versions/{version}": {
795
+ "servers": [
796
+ {
797
+ "url": "https://openrouter.ai/api/v1"
798
+ }
799
+ ],
800
+ "get": {
801
+ "operationId": "getPresetVersion",
802
+ "summary": "Get a specific version of a preset",
803
+ "tags": [
804
+ "Presets"
805
+ ]
806
+ }
807
+ },
808
+ "/providers": {
809
+ "servers": [
810
+ {
811
+ "url": "https://openrouter.ai/api/v1"
812
+ }
813
+ ],
814
+ "get": {
815
+ "operationId": "listProviders",
816
+ "summary": "List all providers",
817
+ "tags": [
818
+ "Providers"
819
+ ]
820
+ }
821
+ },
822
+ "/rerank": {
823
+ "servers": [
824
+ {
825
+ "url": "https://openrouter.ai/api/v1"
826
+ }
827
+ ],
828
+ "post": {
829
+ "operationId": "createRerank",
830
+ "summary": "Submit a rerank request",
831
+ "tags": [
832
+ "Rerank"
833
+ ]
834
+ }
835
+ },
836
+ "/responses": {
837
+ "servers": [
838
+ {
839
+ "url": "https://openrouter.ai/api/v1"
840
+ }
841
+ ],
842
+ "post": {
843
+ "operationId": "createResponses",
844
+ "summary": "Create a response",
845
+ "tags": [
846
+ "Responses",
847
+ "beta.responses"
848
+ ]
849
+ }
850
+ },
851
+ "/videos": {
852
+ "servers": [
853
+ {
854
+ "url": "https://openrouter.ai/api/v1"
855
+ }
856
+ ],
857
+ "post": {
858
+ "operationId": "createVideos",
859
+ "summary": "Submit a video generation request",
860
+ "tags": [
861
+ "Video Generation"
862
+ ]
863
+ }
864
+ },
865
+ "/videos/{jobId}": {
866
+ "servers": [
867
+ {
868
+ "url": "https://openrouter.ai/api/v1"
869
+ }
870
+ ],
871
+ "get": {
872
+ "operationId": "getVideos",
873
+ "summary": "Poll video generation status",
874
+ "tags": [
875
+ "Video Generation"
876
+ ]
877
+ }
878
+ },
879
+ "/videos/{jobId}/content": {
880
+ "servers": [
881
+ {
882
+ "url": "https://openrouter.ai/api/v1"
883
+ }
884
+ ],
885
+ "get": {
886
+ "operationId": "listVideosContent",
887
+ "summary": "Download generated video content",
888
+ "tags": [
889
+ "Video Generation"
890
+ ]
891
+ }
892
+ },
893
+ "/videos/models": {
894
+ "servers": [
895
+ {
896
+ "url": "https://openrouter.ai/api/v1"
897
+ }
898
+ ],
899
+ "get": {
900
+ "operationId": "listVideosModels",
901
+ "summary": "List all video generation models",
902
+ "tags": [
903
+ "Video Generation"
904
+ ]
905
+ }
906
+ },
907
+ "/workspaces": {
908
+ "servers": [
909
+ {
910
+ "url": "https://openrouter.ai/api/v1"
911
+ }
912
+ ],
913
+ "get": {
914
+ "operationId": "listWorkspaces",
915
+ "summary": "List workspaces",
916
+ "tags": [
917
+ "Workspaces"
918
+ ]
919
+ },
920
+ "post": {
921
+ "operationId": "createWorkspace",
922
+ "summary": "Create a workspace",
923
+ "tags": [
924
+ "Workspaces"
925
+ ]
926
+ }
927
+ },
928
+ "/workspaces/{id}": {
929
+ "servers": [
930
+ {
931
+ "url": "https://openrouter.ai/api/v1"
932
+ }
933
+ ],
934
+ "delete": {
935
+ "operationId": "deleteWorkspace",
936
+ "summary": "Delete a workspace",
937
+ "tags": [
938
+ "Workspaces"
939
+ ]
940
+ },
941
+ "get": {
942
+ "operationId": "getWorkspace",
943
+ "summary": "Get a workspace",
944
+ "tags": [
945
+ "Workspaces"
946
+ ]
947
+ },
948
+ "patch": {
949
+ "operationId": "updateWorkspace",
950
+ "summary": "Update a workspace",
951
+ "tags": [
952
+ "Workspaces"
953
+ ]
954
+ }
955
+ },
956
+ "/workspaces/{id}/budgets": {
957
+ "servers": [
958
+ {
959
+ "url": "https://openrouter.ai/api/v1"
960
+ }
961
+ ],
962
+ "get": {
963
+ "operationId": "listWorkspaceBudgets",
964
+ "summary": "List workspace budgets",
965
+ "tags": [
966
+ "Workspaces"
967
+ ]
968
+ }
969
+ },
970
+ "/workspaces/{id}/budgets/{interval}": {
971
+ "servers": [
972
+ {
973
+ "url": "https://openrouter.ai/api/v1"
974
+ }
975
+ ],
976
+ "delete": {
977
+ "operationId": "deleteWorkspaceBudget",
978
+ "summary": "Delete a workspace budget",
979
+ "tags": [
980
+ "Workspaces"
981
+ ]
982
+ },
983
+ "get": {
984
+ "operationId": "getWorkspaceBudget",
985
+ "summary": "Get a workspace budget",
986
+ "tags": [
987
+ "Workspaces"
988
+ ]
989
+ },
990
+ "put": {
991
+ "operationId": "upsertWorkspaceBudget",
992
+ "summary": "Create or update a workspace budget",
993
+ "tags": [
994
+ "Workspaces"
995
+ ]
996
+ }
997
+ },
998
+ "/workspaces/{id}/members": {
999
+ "servers": [
1000
+ {
1001
+ "url": "https://openrouter.ai/api/v1"
1002
+ }
1003
+ ],
1004
+ "get": {
1005
+ "operationId": "listWorkspaceMembers",
1006
+ "summary": "List workspace members",
1007
+ "tags": [
1008
+ "Workspaces"
1009
+ ]
1010
+ }
1011
+ },
1012
+ "/workspaces/{id}/members/add": {
1013
+ "servers": [
1014
+ {
1015
+ "url": "https://openrouter.ai/api/v1"
1016
+ }
1017
+ ],
1018
+ "post": {
1019
+ "operationId": "bulkAddWorkspaceMembers",
1020
+ "summary": "Bulk add members to a workspace",
1021
+ "tags": [
1022
+ "Workspaces"
1023
+ ]
1024
+ }
1025
+ },
1026
+ "/workspaces/{id}/members/remove": {
1027
+ "servers": [
1028
+ {
1029
+ "url": "https://openrouter.ai/api/v1"
1030
+ }
1031
+ ],
1032
+ "post": {
1033
+ "operationId": "bulkRemoveWorkspaceMembers",
1034
+ "summary": "Bulk remove members from a workspace",
1035
+ "tags": [
1036
+ "Workspaces"
1037
+ ]
1038
+ }
1039
+ }
1040
+ }
1041
+ }