unitysvc-services 0.1.24__py3-none-any.whl

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 (37) hide show
  1. unitysvc_services/__init__.py +4 -0
  2. unitysvc_services/api.py +421 -0
  3. unitysvc_services/cli.py +23 -0
  4. unitysvc_services/format_data.py +140 -0
  5. unitysvc_services/interactive_prompt.py +1132 -0
  6. unitysvc_services/list.py +216 -0
  7. unitysvc_services/models/__init__.py +71 -0
  8. unitysvc_services/models/base.py +1375 -0
  9. unitysvc_services/models/listing_data.py +118 -0
  10. unitysvc_services/models/listing_v1.py +56 -0
  11. unitysvc_services/models/provider_data.py +79 -0
  12. unitysvc_services/models/provider_v1.py +54 -0
  13. unitysvc_services/models/seller_data.py +120 -0
  14. unitysvc_services/models/seller_v1.py +42 -0
  15. unitysvc_services/models/service_data.py +114 -0
  16. unitysvc_services/models/service_v1.py +81 -0
  17. unitysvc_services/populate.py +207 -0
  18. unitysvc_services/publisher.py +1628 -0
  19. unitysvc_services/py.typed +0 -0
  20. unitysvc_services/query.py +688 -0
  21. unitysvc_services/scaffold.py +1103 -0
  22. unitysvc_services/schema/base.json +777 -0
  23. unitysvc_services/schema/listing_v1.json +1286 -0
  24. unitysvc_services/schema/provider_v1.json +952 -0
  25. unitysvc_services/schema/seller_v1.json +379 -0
  26. unitysvc_services/schema/service_v1.json +1306 -0
  27. unitysvc_services/test.py +965 -0
  28. unitysvc_services/unpublisher.py +505 -0
  29. unitysvc_services/update.py +287 -0
  30. unitysvc_services/utils.py +533 -0
  31. unitysvc_services/validator.py +731 -0
  32. unitysvc_services-0.1.24.dist-info/METADATA +184 -0
  33. unitysvc_services-0.1.24.dist-info/RECORD +37 -0
  34. unitysvc_services-0.1.24.dist-info/WHEEL +5 -0
  35. unitysvc_services-0.1.24.dist-info/entry_points.txt +3 -0
  36. unitysvc_services-0.1.24.dist-info/licenses/LICENSE +21 -0
  37. unitysvc_services-0.1.24.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1306 @@
1
+ {
2
+ "$defs": {
3
+ "AccessInterface": {
4
+ "additionalProperties": true,
5
+ "properties": {
6
+ "access_method": {
7
+ "$ref": "#/$defs/AccessMethodEnum",
8
+ "default": "http",
9
+ "description": "Type of access method"
10
+ },
11
+ "api_key": {
12
+ "anyOf": [
13
+ {
14
+ "maxLength": 2000,
15
+ "type": "string"
16
+ },
17
+ {
18
+ "type": "null"
19
+ }
20
+ ],
21
+ "default": null,
22
+ "description": "API key if required",
23
+ "title": "Api Key"
24
+ },
25
+ "base_url": {
26
+ "description": "Base URL for api access",
27
+ "maxLength": 500,
28
+ "title": "Base Url",
29
+ "type": "string"
30
+ },
31
+ "constraint": {
32
+ "anyOf": [
33
+ {
34
+ "$ref": "#/$defs/ServiceConstraints"
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ],
40
+ "default": null,
41
+ "description": "Service constraints and conditions"
42
+ },
43
+ "description": {
44
+ "anyOf": [
45
+ {
46
+ "maxLength": 500,
47
+ "type": "string"
48
+ },
49
+ {
50
+ "type": "null"
51
+ }
52
+ ],
53
+ "default": null,
54
+ "description": "Interface description",
55
+ "title": "Description"
56
+ },
57
+ "documents": {
58
+ "anyOf": [
59
+ {
60
+ "items": {
61
+ "$ref": "#/$defs/Document"
62
+ },
63
+ "type": "array"
64
+ },
65
+ {
66
+ "type": "null"
67
+ }
68
+ ],
69
+ "default": null,
70
+ "description": "List of documents associated with the interface",
71
+ "title": "Documents"
72
+ },
73
+ "is_active": {
74
+ "default": true,
75
+ "description": "Whether interface is active",
76
+ "title": "Is Active",
77
+ "type": "boolean"
78
+ },
79
+ "is_primary": {
80
+ "default": false,
81
+ "description": "Whether this is the primary interface",
82
+ "title": "Is Primary",
83
+ "type": "boolean"
84
+ },
85
+ "name": {
86
+ "anyOf": [
87
+ {
88
+ "maxLength": 100,
89
+ "type": "string"
90
+ },
91
+ {
92
+ "type": "null"
93
+ }
94
+ ],
95
+ "default": null,
96
+ "description": "Interface name",
97
+ "title": "Name"
98
+ },
99
+ "rate_limits": {
100
+ "anyOf": [
101
+ {
102
+ "items": {
103
+ "$ref": "#/$defs/RateLimit"
104
+ },
105
+ "type": "array"
106
+ },
107
+ {
108
+ "type": "null"
109
+ }
110
+ ],
111
+ "default": null,
112
+ "description": "Rate limit",
113
+ "title": "Rate Limits"
114
+ },
115
+ "request_transformer": {
116
+ "anyOf": [
117
+ {
118
+ "additionalProperties": {
119
+ "additionalProperties": true,
120
+ "type": "object"
121
+ },
122
+ "propertyNames": {
123
+ "$ref": "#/$defs/RequestTransformEnum"
124
+ },
125
+ "type": "object"
126
+ },
127
+ {
128
+ "type": "null"
129
+ }
130
+ ],
131
+ "default": null,
132
+ "description": "Request transformation configuration",
133
+ "title": "Request Transformer"
134
+ },
135
+ "routing_key": {
136
+ "anyOf": [
137
+ {
138
+ "additionalProperties": true,
139
+ "type": "object"
140
+ },
141
+ {
142
+ "type": "null"
143
+ }
144
+ ],
145
+ "default": null,
146
+ "description": "Request routing key for matching (e.g., {'model': 'gpt-4'})",
147
+ "title": "Routing Key"
148
+ },
149
+ "sort_order": {
150
+ "default": 0,
151
+ "description": "Display order",
152
+ "title": "Sort Order",
153
+ "type": "integer"
154
+ }
155
+ },
156
+ "required": [
157
+ "base_url"
158
+ ],
159
+ "title": "AccessInterface",
160
+ "type": "object"
161
+ },
162
+ "AccessMethodEnum": {
163
+ "enum": [
164
+ "http",
165
+ "websocket",
166
+ "grpc"
167
+ ],
168
+ "title": "AccessMethodEnum",
169
+ "type": "string"
170
+ },
171
+ "AuthMethodEnum": {
172
+ "enum": [
173
+ "api_key",
174
+ "oauth",
175
+ "jwt",
176
+ "bearer_token",
177
+ "basic_auth"
178
+ ],
179
+ "title": "AuthMethodEnum",
180
+ "type": "string"
181
+ },
182
+ "ContentFilterEnum": {
183
+ "enum": [
184
+ "adult",
185
+ "violence",
186
+ "hate_speech",
187
+ "profanity",
188
+ "pii"
189
+ ],
190
+ "title": "ContentFilterEnum",
191
+ "type": "string"
192
+ },
193
+ "CurrencyEnum": {
194
+ "description": "Supported currency codes for pricing.",
195
+ "enum": [
196
+ "USD",
197
+ "EUR",
198
+ "GBP",
199
+ "JPY",
200
+ "CNY",
201
+ "CAD",
202
+ "AUD",
203
+ "CHF",
204
+ "INR",
205
+ "KRW",
206
+ "BTC",
207
+ "ETH",
208
+ "USDT",
209
+ "USDC",
210
+ "TAO",
211
+ "CREDITS"
212
+ ],
213
+ "title": "CurrencyEnum",
214
+ "type": "string"
215
+ },
216
+ "Document": {
217
+ "additionalProperties": false,
218
+ "properties": {
219
+ "category": {
220
+ "$ref": "#/$defs/DocumentCategoryEnum",
221
+ "description": "Document category for organization and filtering"
222
+ },
223
+ "description": {
224
+ "anyOf": [
225
+ {
226
+ "maxLength": 500,
227
+ "type": "string"
228
+ },
229
+ {
230
+ "type": "null"
231
+ }
232
+ ],
233
+ "default": null,
234
+ "description": "Document description",
235
+ "title": "Description"
236
+ },
237
+ "external_url": {
238
+ "anyOf": [
239
+ {
240
+ "maxLength": 1000,
241
+ "type": "string"
242
+ },
243
+ {
244
+ "type": "null"
245
+ }
246
+ ],
247
+ "default": null,
248
+ "description": "External URL for the document (mutually exclusive with object_key)",
249
+ "title": "External Url"
250
+ },
251
+ "file_path": {
252
+ "anyOf": [
253
+ {
254
+ "maxLength": 1000,
255
+ "type": "string"
256
+ },
257
+ {
258
+ "type": "null"
259
+ }
260
+ ],
261
+ "default": null,
262
+ "description": "Path to file to upload (mutually exclusive with external_url)",
263
+ "title": "File Path"
264
+ },
265
+ "is_active": {
266
+ "default": true,
267
+ "description": "Whether document is active",
268
+ "title": "Is Active",
269
+ "type": "boolean"
270
+ },
271
+ "is_public": {
272
+ "default": false,
273
+ "description": "Whether document is publicly accessible without authentication",
274
+ "title": "Is Public",
275
+ "type": "boolean"
276
+ },
277
+ "meta": {
278
+ "anyOf": [
279
+ {
280
+ "additionalProperties": true,
281
+ "type": "object"
282
+ },
283
+ {
284
+ "type": "null"
285
+ }
286
+ ],
287
+ "default": null,
288
+ "description": "JSON containing operation stats",
289
+ "title": "Meta"
290
+ },
291
+ "mime_type": {
292
+ "$ref": "#/$defs/MimeTypeEnum",
293
+ "description": "Document MIME type"
294
+ },
295
+ "sort_order": {
296
+ "default": 0,
297
+ "description": "Sort order within category",
298
+ "title": "Sort Order",
299
+ "type": "integer"
300
+ },
301
+ "title": {
302
+ "description": "Document title",
303
+ "maxLength": 255,
304
+ "minLength": 5,
305
+ "title": "Title",
306
+ "type": "string"
307
+ },
308
+ "version": {
309
+ "anyOf": [
310
+ {
311
+ "maxLength": 50,
312
+ "type": "string"
313
+ },
314
+ {
315
+ "type": "null"
316
+ }
317
+ ],
318
+ "default": null,
319
+ "description": "Document version",
320
+ "title": "Version"
321
+ }
322
+ },
323
+ "required": [
324
+ "title",
325
+ "mime_type",
326
+ "category"
327
+ ],
328
+ "title": "Document",
329
+ "type": "object"
330
+ },
331
+ "DocumentCategoryEnum": {
332
+ "enum": [
333
+ "getting_started",
334
+ "api_reference",
335
+ "tutorial",
336
+ "code_example",
337
+ "code_example_output",
338
+ "use_case",
339
+ "troubleshooting",
340
+ "changelog",
341
+ "best_practice",
342
+ "specification",
343
+ "service_level_agreement",
344
+ "terms_of_service",
345
+ "statement",
346
+ "invoice",
347
+ "logo",
348
+ "avatar",
349
+ "other"
350
+ ],
351
+ "title": "DocumentCategoryEnum",
352
+ "type": "string"
353
+ },
354
+ "ImagePriceData": {
355
+ "additionalProperties": false,
356
+ "description": "Price data for per-image pricing (image generation, processing).\n\nPrice values use Decimal for precision. In JSON/TOML, specify as strings\n(e.g., \"0.04\") to avoid floating-point precision issues.",
357
+ "properties": {
358
+ "description": {
359
+ "anyOf": [
360
+ {
361
+ "type": "string"
362
+ },
363
+ {
364
+ "type": "null"
365
+ }
366
+ ],
367
+ "default": null,
368
+ "description": "Human-readable description of the pricing model",
369
+ "title": "Description"
370
+ },
371
+ "price": {
372
+ "description": "Price per image",
373
+ "title": "Price",
374
+ "type": "string"
375
+ },
376
+ "reference": {
377
+ "anyOf": [
378
+ {
379
+ "type": "string"
380
+ },
381
+ {
382
+ "type": "null"
383
+ }
384
+ ],
385
+ "default": null,
386
+ "description": "URL to upstream provider's pricing page",
387
+ "title": "Reference"
388
+ },
389
+ "type": {
390
+ "const": "image",
391
+ "default": "image",
392
+ "title": "Type",
393
+ "type": "string"
394
+ }
395
+ },
396
+ "required": [
397
+ "price"
398
+ ],
399
+ "title": "ImagePriceData",
400
+ "type": "object"
401
+ },
402
+ "MimeTypeEnum": {
403
+ "enum": [
404
+ "markdown",
405
+ "python",
406
+ "javascript",
407
+ "bash",
408
+ "html",
409
+ "text",
410
+ "pdf",
411
+ "jpeg",
412
+ "png",
413
+ "svg",
414
+ "url"
415
+ ],
416
+ "title": "MimeTypeEnum",
417
+ "type": "string"
418
+ },
419
+ "OveragePolicyEnum": {
420
+ "enum": [
421
+ "block",
422
+ "throttle",
423
+ "charge",
424
+ "queue"
425
+ ],
426
+ "title": "OveragePolicyEnum",
427
+ "type": "string"
428
+ },
429
+ "QuotaResetCycleEnum": {
430
+ "enum": [
431
+ "daily",
432
+ "weekly",
433
+ "monthly",
434
+ "yearly"
435
+ ],
436
+ "title": "QuotaResetCycleEnum",
437
+ "type": "string"
438
+ },
439
+ "RateLimit": {
440
+ "additionalProperties": false,
441
+ "description": "Store rate limiting rules for services.",
442
+ "properties": {
443
+ "burst_limit": {
444
+ "anyOf": [
445
+ {
446
+ "type": "integer"
447
+ },
448
+ {
449
+ "type": "null"
450
+ }
451
+ ],
452
+ "default": null,
453
+ "description": "Short-term burst allowance",
454
+ "title": "Burst Limit"
455
+ },
456
+ "description": {
457
+ "anyOf": [
458
+ {
459
+ "maxLength": 255,
460
+ "type": "string"
461
+ },
462
+ {
463
+ "type": "null"
464
+ }
465
+ ],
466
+ "default": null,
467
+ "description": "Human-readable description",
468
+ "title": "Description"
469
+ },
470
+ "is_active": {
471
+ "default": true,
472
+ "description": "Whether rate limit is active",
473
+ "title": "Is Active",
474
+ "type": "boolean"
475
+ },
476
+ "limit": {
477
+ "description": "Maximum allowed in the time window",
478
+ "title": "Limit",
479
+ "type": "integer"
480
+ },
481
+ "unit": {
482
+ "$ref": "#/$defs/RateLimitUnitEnum",
483
+ "description": "What is being limited"
484
+ },
485
+ "window": {
486
+ "$ref": "#/$defs/TimeWindowEnum",
487
+ "description": "Time window for the limit"
488
+ }
489
+ },
490
+ "required": [
491
+ "limit",
492
+ "unit",
493
+ "window"
494
+ ],
495
+ "title": "RateLimit",
496
+ "type": "object"
497
+ },
498
+ "RateLimitUnitEnum": {
499
+ "enum": [
500
+ "requests",
501
+ "tokens",
502
+ "input_tokens",
503
+ "output_tokens",
504
+ "bytes",
505
+ "concurrent"
506
+ ],
507
+ "title": "RateLimitUnitEnum",
508
+ "type": "string"
509
+ },
510
+ "RequestTransformEnum": {
511
+ "enum": [
512
+ "proxy_rewrite",
513
+ "body_transformer"
514
+ ],
515
+ "title": "RequestTransformEnum",
516
+ "type": "string"
517
+ },
518
+ "RevenueSharePriceData": {
519
+ "additionalProperties": false,
520
+ "description": "Price data for revenue share pricing (seller_price only).\n\nThis pricing type is used exclusively for seller_price when the seller\nreceives a percentage of what the customer pays. It cannot be used for\ncustomer_price since the customer price must be a concrete amount.\n\nThe percentage represents the seller's share of the customer charge.\nFor example, if percentage is \"70\" and the customer pays $10, the seller\nreceives $7.\n\nPercentage values must be strings (e.g., \"70.00\") to avoid floating-point\nprecision issues.",
521
+ "properties": {
522
+ "description": {
523
+ "anyOf": [
524
+ {
525
+ "type": "string"
526
+ },
527
+ {
528
+ "type": "null"
529
+ }
530
+ ],
531
+ "default": null,
532
+ "description": "Human-readable description of the pricing model",
533
+ "title": "Description"
534
+ },
535
+ "percentage": {
536
+ "description": "Percentage of customer charge that goes to the seller (0-100)",
537
+ "title": "Percentage",
538
+ "type": "string"
539
+ },
540
+ "reference": {
541
+ "anyOf": [
542
+ {
543
+ "type": "string"
544
+ },
545
+ {
546
+ "type": "null"
547
+ }
548
+ ],
549
+ "default": null,
550
+ "description": "URL to upstream provider's pricing page",
551
+ "title": "Reference"
552
+ },
553
+ "type": {
554
+ "const": "revenue_share",
555
+ "default": "revenue_share",
556
+ "title": "Type",
557
+ "type": "string"
558
+ }
559
+ },
560
+ "required": [
561
+ "percentage"
562
+ ],
563
+ "title": "RevenueSharePriceData",
564
+ "type": "object"
565
+ },
566
+ "ServiceConstraints": {
567
+ "additionalProperties": false,
568
+ "properties": {
569
+ "auth_methods": {
570
+ "anyOf": [
571
+ {
572
+ "items": {
573
+ "$ref": "#/$defs/AuthMethodEnum"
574
+ },
575
+ "type": "array"
576
+ },
577
+ {
578
+ "type": "null"
579
+ }
580
+ ],
581
+ "default": null,
582
+ "description": "Supported authentication methods",
583
+ "title": "Auth Methods"
584
+ },
585
+ "connection_timeout_seconds": {
586
+ "anyOf": [
587
+ {
588
+ "type": "integer"
589
+ },
590
+ {
591
+ "type": "null"
592
+ }
593
+ ],
594
+ "default": null,
595
+ "description": "Connection timeout in seconds",
596
+ "title": "Connection Timeout Seconds"
597
+ },
598
+ "content_filters": {
599
+ "anyOf": [
600
+ {
601
+ "items": {
602
+ "$ref": "#/$defs/ContentFilterEnum"
603
+ },
604
+ "type": "array"
605
+ },
606
+ {
607
+ "type": "null"
608
+ }
609
+ ],
610
+ "default": null,
611
+ "description": "Active content filtering policies",
612
+ "title": "Content Filters"
613
+ },
614
+ "daily_quota": {
615
+ "anyOf": [
616
+ {
617
+ "type": "integer"
618
+ },
619
+ {
620
+ "type": "null"
621
+ }
622
+ ],
623
+ "default": null,
624
+ "description": "Daily usage quota (requests, tokens, etc.)",
625
+ "title": "Daily Quota"
626
+ },
627
+ "input_languages": {
628
+ "anyOf": [
629
+ {
630
+ "items": {
631
+ "type": "string"
632
+ },
633
+ "type": "array"
634
+ },
635
+ {
636
+ "type": "null"
637
+ }
638
+ ],
639
+ "default": null,
640
+ "description": "Supported input languages (ISO 639-1 codes)",
641
+ "title": "Input Languages"
642
+ },
643
+ "ip_whitelist_required": {
644
+ "anyOf": [
645
+ {
646
+ "type": "boolean"
647
+ },
648
+ {
649
+ "type": "null"
650
+ }
651
+ ],
652
+ "default": null,
653
+ "description": "Whether IP whitelisting is required",
654
+ "title": "Ip Whitelist Required"
655
+ },
656
+ "maintenance_windows": {
657
+ "anyOf": [
658
+ {
659
+ "items": {
660
+ "type": "string"
661
+ },
662
+ "type": "array"
663
+ },
664
+ {
665
+ "type": "null"
666
+ }
667
+ ],
668
+ "default": null,
669
+ "description": "Scheduled maintenance windows",
670
+ "title": "Maintenance Windows"
671
+ },
672
+ "max_batch_size": {
673
+ "anyOf": [
674
+ {
675
+ "type": "integer"
676
+ },
677
+ {
678
+ "type": "null"
679
+ }
680
+ ],
681
+ "default": null,
682
+ "description": "Maximum number of items in batch requests",
683
+ "title": "Max Batch Size"
684
+ },
685
+ "max_concurrent_requests": {
686
+ "anyOf": [
687
+ {
688
+ "type": "integer"
689
+ },
690
+ {
691
+ "type": "null"
692
+ }
693
+ ],
694
+ "default": null,
695
+ "description": "Maximum concurrent requests allowed",
696
+ "title": "Max Concurrent Requests"
697
+ },
698
+ "max_connections_per_ip": {
699
+ "anyOf": [
700
+ {
701
+ "type": "integer"
702
+ },
703
+ {
704
+ "type": "null"
705
+ }
706
+ ],
707
+ "default": null,
708
+ "description": "Maximum connections per IP address",
709
+ "title": "Max Connections Per Ip"
710
+ },
711
+ "max_context_length": {
712
+ "anyOf": [
713
+ {
714
+ "type": "integer"
715
+ },
716
+ {
717
+ "type": "null"
718
+ }
719
+ ],
720
+ "default": null,
721
+ "description": "Maximum context length in tokens",
722
+ "title": "Max Context Length"
723
+ },
724
+ "max_request_size_bytes": {
725
+ "anyOf": [
726
+ {
727
+ "type": "integer"
728
+ },
729
+ {
730
+ "type": "null"
731
+ }
732
+ ],
733
+ "default": null,
734
+ "description": "Maximum request payload size in bytes",
735
+ "title": "Max Request Size Bytes"
736
+ },
737
+ "max_response_size_bytes": {
738
+ "anyOf": [
739
+ {
740
+ "type": "integer"
741
+ },
742
+ {
743
+ "type": "null"
744
+ }
745
+ ],
746
+ "default": null,
747
+ "description": "Maximum response payload size in bytes",
748
+ "title": "Max Response Size Bytes"
749
+ },
750
+ "monthly_quota": {
751
+ "anyOf": [
752
+ {
753
+ "type": "integer"
754
+ },
755
+ {
756
+ "type": "null"
757
+ }
758
+ ],
759
+ "default": null,
760
+ "description": "Monthly usage quota (requests, tokens, etc.)",
761
+ "title": "Monthly Quota"
762
+ },
763
+ "output_languages": {
764
+ "anyOf": [
765
+ {
766
+ "items": {
767
+ "type": "string"
768
+ },
769
+ "type": "array"
770
+ },
771
+ {
772
+ "type": "null"
773
+ }
774
+ ],
775
+ "default": null,
776
+ "description": "Supported output languages (ISO 639-1 codes)",
777
+ "title": "Output Languages"
778
+ },
779
+ "overage_policy": {
780
+ "anyOf": [
781
+ {
782
+ "$ref": "#/$defs/OveragePolicyEnum"
783
+ },
784
+ {
785
+ "type": "null"
786
+ }
787
+ ],
788
+ "default": null,
789
+ "description": "What happens when quota is exceeded"
790
+ },
791
+ "quota_reset_cycle": {
792
+ "anyOf": [
793
+ {
794
+ "$ref": "#/$defs/QuotaResetCycleEnum"
795
+ },
796
+ {
797
+ "type": "null"
798
+ }
799
+ ],
800
+ "default": null,
801
+ "description": "How often quotas reset"
802
+ },
803
+ "quota_unit": {
804
+ "anyOf": [
805
+ {
806
+ "$ref": "#/$defs/RateLimitUnitEnum"
807
+ },
808
+ {
809
+ "type": "null"
810
+ }
811
+ ],
812
+ "default": null,
813
+ "description": "Unit for quota limits"
814
+ },
815
+ "region_restrictions": {
816
+ "anyOf": [
817
+ {
818
+ "items": {
819
+ "type": "string"
820
+ },
821
+ "type": "array"
822
+ },
823
+ {
824
+ "type": "null"
825
+ }
826
+ ],
827
+ "default": null,
828
+ "description": "Geographic restrictions (ISO country codes)",
829
+ "title": "Region Restrictions"
830
+ },
831
+ "response_time_sla_ms": {
832
+ "anyOf": [
833
+ {
834
+ "type": "integer"
835
+ },
836
+ {
837
+ "type": "null"
838
+ }
839
+ ],
840
+ "default": null,
841
+ "description": "Response time SLA in milliseconds",
842
+ "title": "Response Time Sla Ms"
843
+ },
844
+ "timeout_seconds": {
845
+ "anyOf": [
846
+ {
847
+ "type": "integer"
848
+ },
849
+ {
850
+ "type": "null"
851
+ }
852
+ ],
853
+ "default": null,
854
+ "description": "Request timeout in seconds",
855
+ "title": "Timeout Seconds"
856
+ },
857
+ "tls_version_min": {
858
+ "anyOf": [
859
+ {
860
+ "type": "string"
861
+ },
862
+ {
863
+ "type": "null"
864
+ }
865
+ ],
866
+ "default": null,
867
+ "description": "Minimum TLS version required",
868
+ "title": "Tls Version Min"
869
+ },
870
+ "uptime_sla_percent": {
871
+ "anyOf": [
872
+ {
873
+ "type": "number"
874
+ },
875
+ {
876
+ "type": "null"
877
+ }
878
+ ],
879
+ "default": null,
880
+ "description": "Uptime SLA percentage (e.g., 99.9)",
881
+ "title": "Uptime Sla Percent"
882
+ }
883
+ },
884
+ "title": "ServiceConstraints",
885
+ "type": "object"
886
+ },
887
+ "ServiceTypeEnum": {
888
+ "enum": [
889
+ "llm",
890
+ "embedding",
891
+ "image_generation",
892
+ "streaming_transcription",
893
+ "prerecorded_transcription",
894
+ "prerecorded_translation",
895
+ "vision_language_model",
896
+ "speech_to_text",
897
+ "text_to_speech",
898
+ "video_generation",
899
+ "text_to_image",
900
+ "undetermined",
901
+ "text_to_3d"
902
+ ],
903
+ "title": "ServiceTypeEnum",
904
+ "type": "string"
905
+ },
906
+ "StepPriceData": {
907
+ "additionalProperties": false,
908
+ "description": "Price data for per-step pricing (diffusion steps, iterations).\n\nPrice values use Decimal for precision. In JSON/TOML, specify as strings\n(e.g., \"0.001\") to avoid floating-point precision issues.",
909
+ "properties": {
910
+ "description": {
911
+ "anyOf": [
912
+ {
913
+ "type": "string"
914
+ },
915
+ {
916
+ "type": "null"
917
+ }
918
+ ],
919
+ "default": null,
920
+ "description": "Human-readable description of the pricing model",
921
+ "title": "Description"
922
+ },
923
+ "price": {
924
+ "description": "Price per step/iteration",
925
+ "title": "Price",
926
+ "type": "string"
927
+ },
928
+ "reference": {
929
+ "anyOf": [
930
+ {
931
+ "type": "string"
932
+ },
933
+ {
934
+ "type": "null"
935
+ }
936
+ ],
937
+ "default": null,
938
+ "description": "URL to upstream provider's pricing page",
939
+ "title": "Reference"
940
+ },
941
+ "type": {
942
+ "const": "step",
943
+ "default": "step",
944
+ "title": "Type",
945
+ "type": "string"
946
+ }
947
+ },
948
+ "required": [
949
+ "price"
950
+ ],
951
+ "title": "StepPriceData",
952
+ "type": "object"
953
+ },
954
+ "TagEnum": {
955
+ "description": "Allowed enums, currently not enforced.",
956
+ "enum": [
957
+ "byop"
958
+ ],
959
+ "title": "TagEnum",
960
+ "type": "string"
961
+ },
962
+ "TimePriceData": {
963
+ "additionalProperties": false,
964
+ "description": "Price data for time-based pricing (audio/video processing, compute time).\n\nPrice values use Decimal for precision. In JSON/TOML, specify as strings\n(e.g., \"0.006\") to avoid floating-point precision issues.",
965
+ "properties": {
966
+ "description": {
967
+ "anyOf": [
968
+ {
969
+ "type": "string"
970
+ },
971
+ {
972
+ "type": "null"
973
+ }
974
+ ],
975
+ "default": null,
976
+ "description": "Human-readable description of the pricing model",
977
+ "title": "Description"
978
+ },
979
+ "price": {
980
+ "description": "Price per second of usage",
981
+ "title": "Price",
982
+ "type": "string"
983
+ },
984
+ "reference": {
985
+ "anyOf": [
986
+ {
987
+ "type": "string"
988
+ },
989
+ {
990
+ "type": "null"
991
+ }
992
+ ],
993
+ "default": null,
994
+ "description": "URL to upstream provider's pricing page",
995
+ "title": "Reference"
996
+ },
997
+ "type": {
998
+ "const": "one_second",
999
+ "default": "one_second",
1000
+ "title": "Type",
1001
+ "type": "string"
1002
+ }
1003
+ },
1004
+ "required": [
1005
+ "price"
1006
+ ],
1007
+ "title": "TimePriceData",
1008
+ "type": "object"
1009
+ },
1010
+ "TimeWindowEnum": {
1011
+ "enum": [
1012
+ "second",
1013
+ "minute",
1014
+ "hour",
1015
+ "day",
1016
+ "month"
1017
+ ],
1018
+ "title": "TimeWindowEnum",
1019
+ "type": "string"
1020
+ },
1021
+ "TokenPriceData": {
1022
+ "additionalProperties": false,
1023
+ "description": "Price data for token-based pricing (LLMs).\nSupports either unified pricing or separate input/output pricing.\n\nPrice values use Decimal for precision. In JSON/TOML, specify as strings\n(e.g., \"0.50\") to avoid floating-point precision issues.",
1024
+ "properties": {
1025
+ "description": {
1026
+ "anyOf": [
1027
+ {
1028
+ "type": "string"
1029
+ },
1030
+ {
1031
+ "type": "null"
1032
+ }
1033
+ ],
1034
+ "default": null,
1035
+ "description": "Human-readable description of the pricing model",
1036
+ "title": "Description"
1037
+ },
1038
+ "input": {
1039
+ "anyOf": [
1040
+ {
1041
+ "type": "string"
1042
+ },
1043
+ {
1044
+ "type": "null"
1045
+ }
1046
+ ],
1047
+ "default": null,
1048
+ "description": "Price per million input tokens",
1049
+ "title": "Input"
1050
+ },
1051
+ "output": {
1052
+ "anyOf": [
1053
+ {
1054
+ "type": "string"
1055
+ },
1056
+ {
1057
+ "type": "null"
1058
+ }
1059
+ ],
1060
+ "default": null,
1061
+ "description": "Price per million output tokens",
1062
+ "title": "Output"
1063
+ },
1064
+ "price": {
1065
+ "anyOf": [
1066
+ {
1067
+ "type": "string"
1068
+ },
1069
+ {
1070
+ "type": "null"
1071
+ }
1072
+ ],
1073
+ "default": null,
1074
+ "description": "Unified price per million tokens (used when input/output are the same)",
1075
+ "title": "Price"
1076
+ },
1077
+ "reference": {
1078
+ "anyOf": [
1079
+ {
1080
+ "type": "string"
1081
+ },
1082
+ {
1083
+ "type": "null"
1084
+ }
1085
+ ],
1086
+ "default": null,
1087
+ "description": "URL to upstream provider's pricing page",
1088
+ "title": "Reference"
1089
+ },
1090
+ "type": {
1091
+ "const": "one_million_tokens",
1092
+ "default": "one_million_tokens",
1093
+ "title": "Type",
1094
+ "type": "string"
1095
+ }
1096
+ },
1097
+ "title": "TokenPriceData",
1098
+ "type": "object"
1099
+ },
1100
+ "UpstreamStatusEnum": {
1101
+ "enum": [
1102
+ "uploading",
1103
+ "ready",
1104
+ "deprecated"
1105
+ ],
1106
+ "title": "UpstreamStatusEnum",
1107
+ "type": "string"
1108
+ }
1109
+ },
1110
+ "additionalProperties": false,
1111
+ "description": "Service offering model for file-based definitions (service_v1 schema).\n\nExtends ServiceOfferingData with:\n- schema_version: Schema identifier for file validation\n- time_created: Timestamp for file creation\n- logo: Convenience field (converted to documents during import)\n- tags: Tags for the service (e.g., bring your own API key)\n- Typed models (AccessInterface, Document, Pricing) instead of dicts\n- Field validators for name format\n\nThis model is used for validating service.json/service.toml files\ncreated by the CLI tool.",
1112
+ "properties": {
1113
+ "currency": {
1114
+ "$ref": "#/$defs/CurrencyEnum",
1115
+ "default": "USD",
1116
+ "description": "Currency for seller_price"
1117
+ },
1118
+ "description": {
1119
+ "description": "Service description",
1120
+ "title": "Description",
1121
+ "type": "string"
1122
+ },
1123
+ "details": {
1124
+ "additionalProperties": true,
1125
+ "description": "Dictionary of static features and information",
1126
+ "title": "Details",
1127
+ "type": "object"
1128
+ },
1129
+ "display_name": {
1130
+ "description": "Human-friendly common name (e.g., 'GPT-4 Turbo')",
1131
+ "maxLength": 150,
1132
+ "title": "Display Name",
1133
+ "type": "string"
1134
+ },
1135
+ "documents": {
1136
+ "anyOf": [
1137
+ {
1138
+ "items": {
1139
+ "$ref": "#/$defs/Document"
1140
+ },
1141
+ "type": "array"
1142
+ },
1143
+ {
1144
+ "type": "null"
1145
+ }
1146
+ ],
1147
+ "default": null,
1148
+ "description": "List of documents associated with the service (e.g. tech spec.)",
1149
+ "title": "Documents"
1150
+ },
1151
+ "logo": {
1152
+ "anyOf": [
1153
+ {
1154
+ "type": "string"
1155
+ },
1156
+ {
1157
+ "format": "uri",
1158
+ "maxLength": 2083,
1159
+ "minLength": 1,
1160
+ "type": "string"
1161
+ },
1162
+ {
1163
+ "type": "null"
1164
+ }
1165
+ ],
1166
+ "default": null,
1167
+ "title": "Logo"
1168
+ },
1169
+ "name": {
1170
+ "description": "Technical service name (e.g., 'gpt-4')",
1171
+ "maxLength": 100,
1172
+ "title": "Name",
1173
+ "type": "string"
1174
+ },
1175
+ "provider_name": {
1176
+ "anyOf": [
1177
+ {
1178
+ "type": "string"
1179
+ },
1180
+ {
1181
+ "type": "null"
1182
+ }
1183
+ ],
1184
+ "default": null,
1185
+ "description": "Provider name (resolved from directory structure if not specified)",
1186
+ "title": "Provider Name"
1187
+ },
1188
+ "schema": {
1189
+ "default": "service_v1",
1190
+ "description": "Schema identifier",
1191
+ "title": "Schema",
1192
+ "type": "string"
1193
+ },
1194
+ "seller_price": {
1195
+ "anyOf": [
1196
+ {
1197
+ "discriminator": {
1198
+ "mapping": {
1199
+ "image": "#/$defs/ImagePriceData",
1200
+ "one_million_tokens": "#/$defs/TokenPriceData",
1201
+ "one_second": "#/$defs/TimePriceData",
1202
+ "revenue_share": "#/$defs/RevenueSharePriceData",
1203
+ "step": "#/$defs/StepPriceData"
1204
+ },
1205
+ "propertyName": "type"
1206
+ },
1207
+ "oneOf": [
1208
+ {
1209
+ "$ref": "#/$defs/TokenPriceData"
1210
+ },
1211
+ {
1212
+ "$ref": "#/$defs/TimePriceData"
1213
+ },
1214
+ {
1215
+ "$ref": "#/$defs/ImagePriceData"
1216
+ },
1217
+ {
1218
+ "$ref": "#/$defs/StepPriceData"
1219
+ },
1220
+ {
1221
+ "$ref": "#/$defs/RevenueSharePriceData"
1222
+ }
1223
+ ]
1224
+ },
1225
+ {
1226
+ "type": "null"
1227
+ }
1228
+ ],
1229
+ "default": null,
1230
+ "description": "Seller pricing information",
1231
+ "title": "Seller Price"
1232
+ },
1233
+ "service_type": {
1234
+ "$ref": "#/$defs/ServiceTypeEnum",
1235
+ "default": "llm",
1236
+ "description": "Category for grouping/comparison"
1237
+ },
1238
+ "tagline": {
1239
+ "anyOf": [
1240
+ {
1241
+ "type": "string"
1242
+ },
1243
+ {
1244
+ "type": "null"
1245
+ }
1246
+ ],
1247
+ "default": null,
1248
+ "description": "Short elevator pitch or description for the service",
1249
+ "title": "Tagline"
1250
+ },
1251
+ "tags": {
1252
+ "anyOf": [
1253
+ {
1254
+ "items": {
1255
+ "$ref": "#/$defs/TagEnum"
1256
+ },
1257
+ "type": "array"
1258
+ },
1259
+ {
1260
+ "type": "null"
1261
+ }
1262
+ ],
1263
+ "default": null,
1264
+ "description": "List of tags for the service, e.g., bring your own API key",
1265
+ "title": "Tags"
1266
+ },
1267
+ "time_created": {
1268
+ "format": "date-time",
1269
+ "title": "Time Created",
1270
+ "type": "string"
1271
+ },
1272
+ "upstream_access_interface": {
1273
+ "$ref": "#/$defs/AccessInterface",
1274
+ "description": "Dictionary of upstream access interface"
1275
+ },
1276
+ "upstream_status": {
1277
+ "$ref": "#/$defs/UpstreamStatusEnum",
1278
+ "default": "ready",
1279
+ "description": "Status of the service from upstream service provider"
1280
+ },
1281
+ "version": {
1282
+ "anyOf": [
1283
+ {
1284
+ "maxLength": 50,
1285
+ "type": "string"
1286
+ },
1287
+ {
1288
+ "type": "null"
1289
+ }
1290
+ ],
1291
+ "default": null,
1292
+ "description": "Service version if applicable",
1293
+ "title": "Version"
1294
+ }
1295
+ },
1296
+ "required": [
1297
+ "name",
1298
+ "display_name",
1299
+ "description",
1300
+ "details",
1301
+ "upstream_access_interface",
1302
+ "time_created"
1303
+ ],
1304
+ "title": "ServiceV1",
1305
+ "type": "object"
1306
+ }