compose-inference 0.8.6

Generated Responses-only inference client for the Compose Market SDK.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
---
openapi: 3.1.0
info:
  title: Compose Inference
  version: 0.8.6
  summary: Model discovery and Responses API contracts.
  description: |
    Canonical contract for Compose model discovery and Responses-only model execution. Payment and session primitives are owned by the
    Compose x402 contract.
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
servers:
- url: https://api.compose.market
  x-speakeasy-server-id: inference
  description: Production inference endpoint
- url: http://127.0.0.1:3000
  x-speakeasy-server-id: local
  description: Local inference development endpoint
tags:
- name: health
- name: models
- name: modality
- name: inference
security: []
paths:
  "/health":
    get:
      tags:
      - health
      operationId: check
      responses:
        '200':
          description: API service health.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/HealthResponse"
  "/v1/models":
    get:
      tags:
      - models
      operationId: list
      parameters:
      - "$ref": "#/components/parameters/ProviderQuery"
      - "$ref": "#/components/parameters/ModalityQuery"
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 200
      responses:
        '200':
          description: Curated model list.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ModelListResponse"
  "/v1/models/all":
    get:
      tags:
      - models
      operationId: list_all
      responses:
        '200':
          description: Full extended model catalog.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ModelListResponse"
  "/v1/models/search":
    post:
      tags:
      - models
      operationId: search
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ModelSearchRequest"
      responses:
        '200':
          description: Search results.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ModelSearchResponse"
  "/v1/modalities":
    get:
      tags:
      - modality
      operationId: modality_list
      x-speakeasy-name-override: list
      responses:
        '200':
          description: Catalog of canonical modality groups, operations, model counts, and native pricing unit shapes.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ModalityListResponse"
  "/v1/modalities/{modality}":
    get:
      tags:
      - modality
      operationId: modality_get
      x-speakeasy-name-override: get
      parameters:
      - "$ref": "#/components/parameters/ModalityPath"
      responses:
        '200':
          description: Catalog entry for one canonical modality.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ModalityCatalogEntry"
        '400':
          "$ref": "#/components/responses/ErrorResponse"
  "/v1/modalities/{modality}/operations":
    get:
      tags:
      - modality
      operationId: operations_list
      parameters:
      - "$ref": "#/components/parameters/ModalityPath"
      responses:
        '200':
          description: Operations available for one canonical modality.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OperationListResponse"
        '400':
          "$ref": "#/components/responses/ErrorResponse"
  "/v1/modalities/{modality}/operations/{operation}/models":
    get:
      tags:
      - modality
      operationId: operation_models_list
      parameters:
      - "$ref": "#/components/parameters/ModalityPath"
      - "$ref": "#/components/parameters/OperationPath"
      - name: q
        in: query
        required: false
        schema:
          type: string
      - "$ref": "#/components/parameters/ProviderQuery"
      - name: streaming
        in: query
        required: false
        schema:
          type: boolean
      - name: cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 200
      responses:
        '200':
          description: Cursor-paginated models that expose the requested canonical modality operation.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OperationModelsResponse"
        '400':
          "$ref": "#/components/responses/ErrorResponse"
  "/v1/models/{model}":
    get:
      tags:
      - models
      operationId: get
      parameters:
      - "$ref": "#/components/parameters/ModelPath"
      - "$ref": "#/components/parameters/ProviderQuery"
      responses:
        '200':
          description: Model card.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Model"
        '404':
          "$ref": "#/components/responses/ErrorResponse"
  "/v1/models/{model}/params":
    get:
      tags:
      - models
      operationId: params_get
      parameters:
      - "$ref": "#/components/parameters/ModelPath"
      - "$ref": "#/components/parameters/ProviderQuery"
      responses:
        '200':
          description: Provider-specific generation parameters.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ModelParamsResponse"
  "/v1/responses":
    post:
      tags:
      - inference
      operationId: responses_create
      security:
      - KeyAuth: []
      - X402Payment: []
      parameters:
      - "$ref": "#/components/parameters/SessionUserAddressHeaderOptional"
      - "$ref": "#/components/parameters/ChainIdHeaderOptional"
      - "$ref": "#/components/parameters/X402MaxAmountWeiHeader"
      - "$ref": "#/components/parameters/IdempotencyKeyHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ResponsesCreateRequest"
      responses:
        '200':
          description: Response object or SSE stream when `stream` is true.
          headers:
            X-Receipt:
              "$ref": "#/components/headers/Receipt"
            PAYMENT-RESPONSE:
              "$ref": "#/components/headers/PaymentResponse"
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ResponseObject"
            text/event-stream:
              schema:
                "$ref": "#/components/schemas/ResponseEventStream"
        '402':
          "$ref": "#/components/responses/PaymentRequiredResponse"
  "/v1/responses/{responseId}":
    get:
      tags:
      - inference
      operationId: responses_get
      parameters:
      - "$ref": "#/components/parameters/ResponseIdPath"
      responses:
        '200':
          description: Stored response object.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ResponseObject"
        '404':
          "$ref": "#/components/responses/ErrorResponse"
  "/v1/responses/{responseId}/input_items":
    get:
      tags:
      - inference
      operationId: responses_input_items_list
      parameters:
      - "$ref": "#/components/parameters/ResponseIdPath"
      responses:
        '200':
          description: Stored input items.
          content:
            application/json:
              schema:
                type: object
                required:
                - object
                - data
                properties:
                  object:
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
  "/v1/responses/{responseId}/cancel":
    post:
      tags:
      - inference
      operationId: responses_cancel
      parameters:
      - "$ref": "#/components/parameters/ResponseIdPath"
      responses:
        '200':
          description: Cancelled response object.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ResponseObject"
components:
  securitySchemes:
    KeyAuth:
      type: http
      scheme: bearer
      bearerFormat: compose-key
      description: "`Authorization: Bearer compose-<jwt>`."
    X402Payment:
      type: apiKey
      in: header
      name: PAYMENT-SIGNATURE
      description: Base64-url x402 v2 `PaymentPayload`.
  parameters:
    SessionUserAddressHeaderOptional:
      name: x-session-user-address
      in: header
      required: false
      schema:
        "$ref": "#/components/schemas/WalletAddress"
    ChainIdHeaderOptional:
      name: x-chain-id
      in: header
      required: false
      schema:
        type: integer
        minimum: 1
    X402MaxAmountWeiHeader:
      name: x-x402-max-amount-wei
      in: header
      required: false
      schema:
        "$ref": "#/components/schemas/AtomicAmount"
    IdempotencyKeyHeader:
      name: x-idempotency-key
      in: header
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 200
    ProviderQuery:
      name: provider
      in: query
      required: false
      schema:
        "$ref": "#/components/schemas/ModelProvider"
    ModalityQuery:
      name: modality
      in: query
      required: false
      schema:
        "$ref": "#/components/schemas/CanonicalModality"
    ModalityPath:
      name: modality
      in: path
      required: true
      schema:
        "$ref": "#/components/schemas/CanonicalModality"
    OperationPath:
      name: operation
      in: path
      required: true
      schema:
        type: string
        pattern: "^[a-z0-9][a-z0-9-]*$"
        minLength: 1
    ModelPath:
      name: model
      in: path
      required: true
      schema:
        type: string
        minLength: 1
    ResponseIdPath:
      name: responseId
      in: path
      required: true
      schema:
        type: string
        minLength: 1
  headers:
    PaymentRequired:
      description: Base64-url encoded x402 v2 PaymentRequired object.
      schema:
        type: string
    PaymentResponse:
      description: Base64-url encoded x402 settlement response.
      schema:
        type: string
    Receipt:
      description: Base64-url encoded Compose receipt.
      schema:
        type: string
  responses:
    ErrorResponse:
      description: Compose error response.
      content:
        application/json:
          schema:
            oneOf:
            - "$ref": "#/components/schemas/ErrorEnvelope"
            - "$ref": "#/components/schemas/LegacyError"
    PaymentRequiredResponse:
      description: x402 payment challenge.
      headers:
        PAYMENT-REQUIRED:
          "$ref": "#/components/headers/PaymentRequired"
      content:
        application/json:
          schema:
            oneOf:
            - "$ref": "#/components/schemas/PaymentRequired"
            - "$ref": "#/components/schemas/ErrorEnvelope"
  schemas:
    AtomicAmount:
      type: string
      pattern: "^[0-9]+$"
      description: Non-negative integer amount in USDC atomic units.
      examples:
      - '1000000'
    WalletAddress:
      type: string
      pattern: "^0x[a-fA-F0-9]{40}$"
      examples:
      - '0x1111111111111111111111111111111111111111'
    ChainNetwork:
      type: string
      pattern: "^eip155:[0-9]+$"
      examples:
      - eip155:43113
    HealthResponse:
      type: object
      additionalProperties: true
      properties:
        status:
          type: string
        timestamp:
          type: string
    ErrorEnvelope:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
    LegacyError:
      type: object
      additionalProperties: true
      properties:
        error:
          type: string
        code:
          type: string
        message:
          type: string
    PaymentRequirements:
      type: object
      required:
      - scheme
      - network
      - amount
      - asset
      - payTo
      - maxTimeoutSeconds
      properties:
        scheme:
          type: string
          enum:
          - exact
          - upto
        network:
          "$ref": "#/components/schemas/ChainNetwork"
        amount:
          "$ref": "#/components/schemas/AtomicAmount"
        asset:
          "$ref": "#/components/schemas/WalletAddress"
        payTo:
          "$ref": "#/components/schemas/WalletAddress"
        maxTimeoutSeconds:
          type: integer
          minimum: 1
        extra:
          type:
          - object
          - 'null'
          additionalProperties: true
    PaymentRequired:
      type: object
      required:
      - x402Version
      - resource
      - accepts
      properties:
        x402Version:
          const: 2
        error:
          type: string
        resource:
          type: object
          required:
          - url
          properties:
            url:
              type: string
              format: uri
            description:
              type: string
            mimeType:
              type: string
        accepts:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/PaymentRequirements"
        extensions:
          type:
          - object
          - 'null'
          additionalProperties: true
    ModelProvider:
      type: string
      enum:
      - gemini
      - openai
      - fireworks
      - asicloud
      - alibaba
      - hugging face
      - azure
      - aiml
      - vertex
      - cloudflare
      - deepgram
      - elevenlabs
      - cartesia
      - roboflow
    CanonicalModality:
      type: string
      enum:
      - text
      - image
      - audio
      - video
      - embedding
      - realtime
    PricingUnit:
      type: object
      required:
      - unitKey
      - entries
      - valueKeys
      properties:
        unitKey:
          type: string
          minLength: 1
        unit:
          type: string
        header:
          type: string
        entries:
          type: object
          additionalProperties:
            type: number
        valueKeys:
          type: array
          items:
            type: string
        default:
          type: boolean
    ModelOperationCapability:
      type: object
      required:
      - modality
      - operation
      - sourceTypes
      - input
      - output
      - pricingUnits
      - streamable
      properties:
        modality:
          "$ref": "#/components/schemas/CanonicalModality"
        operation:
          type: string
          minLength: 1
        sourceTypes:
          type: array
          items:
            type: string
        input:
          type: array
          items:
            type: string
        output:
          type: array
          items:
            type: string
        pricingUnits:
          type: array
          items:
            "$ref": "#/components/schemas/PricingUnit"
        streamable:
          type: boolean
    OperationCatalogEntry:
      type: object
      required:
      - operation
      - modelCount
      - sourceTypes
      - pricingUnits
      properties:
        operation:
          type: string
          minLength: 1
        modelCount:
          type: integer
          minimum: 0
        sourceTypes:
          type: array
          items:
            type: string
        pricingUnits:
          type: array
          items:
            "$ref": "#/components/schemas/PricingUnit"
    ModalityCatalogEntry:
      type: object
      required:
      - modality
      - operations
      - modelCount
      - pricingUnits
      properties:
        modality:
          "$ref": "#/components/schemas/CanonicalModality"
        operations:
          type: array
          items:
            "$ref": "#/components/schemas/OperationCatalogEntry"
        modelCount:
          type: integer
          minimum: 0
        pricingUnits:
          type: array
          items:
            "$ref": "#/components/schemas/PricingUnit"
    ModalityListResponse:
      type: object
      required:
      - object
      - data
      properties:
        object:
          const: list
        data:
          type: array
          items:
            "$ref": "#/components/schemas/ModalityCatalogEntry"
    OperationListResponse:
      type: object
      required:
      - object
      - data
      properties:
        object:
          const: list
        data:
          type: array
          items:
            "$ref": "#/components/schemas/OperationCatalogEntry"
    Model:
      type: object
      required:
      - modelId
      - provider
      properties:
        modelId:
          type: string
        upstreamModelId:
          type: string
        name:
          type:
          - string
          - 'null'
        provider:
          "$ref": "#/components/schemas/ModelProvider"
        family:
          type: string
        type:
          oneOf:
          - type: string
          - type: array
            items:
              type: string
          - type: 'null'
        description:
          type:
          - string
          - 'null'
        input: {}
        output: {}
        contextWindow: {}
        pricing: {}
        maxOutputTokens:
          type: integer
        capabilities: {}
        modelType: {}
        sourceMetadata: {}
        params: {}
        operations:
          type: array
          items:
            "$ref": "#/components/schemas/ModelOperationCapability"
        ownedBy:
          type: string
        createdAt:
          oneOf:
          - type: string
          - type: integer
        available:
          type: boolean
        availableFrom:
          type: array
          items:
            type: string
        hfInferenceProvider:
          type: string
        hfProviderId:
          type: string
    ModelListResponse:
      type: object
      required:
      - object
      - data
      properties:
        object:
          const: list
        data:
          type: array
          items:
            "$ref": "#/components/schemas/Model"
    ModelSearchRequest:
      type: object
      properties:
        q:
          type: string
        modality:
          "$ref": "#/components/schemas/CanonicalModality"
        operation:
          type: string
          pattern: "^[a-z0-9][a-z0-9-]*$"
        provider:
          "$ref": "#/components/schemas/ModelProvider"
        priceMaxPerMTok:
          type: number
        contextWindowMin:
          type: integer
        streaming:
          type: boolean
        cursor:
          type:
          - string
          - 'null'
        limit:
          type: integer
          minimum: 1
          maximum: 200
    ModelSearchResponse:
      type: object
      required:
      - object
      - data
      - total
      - next_cursor
      properties:
        object:
          const: list
        data:
          type: array
          items:
            "$ref": "#/components/schemas/Model"
        total:
          type: integer
        next_cursor:
          type:
          - string
          - 'null'
    OperationModel:
      allOf:
      - "$ref": "#/components/schemas/Model"
      - type: object
        required:
        - operations
        properties:
          operations:
            type: array
            items:
              "$ref": "#/components/schemas/ModelOperationCapability"
    OperationModelsResponse:
      type: object
      required:
      - object
      - data
      - total
      - next_cursor
      properties:
        object:
          const: list
        data:
          type: array
          items:
            "$ref": "#/components/schemas/OperationModel"
        total:
          type: integer
          minimum: 0
        next_cursor:
          type:
          - string
          - 'null'
    ModelParamsResponse:
      type: object
      required:
      - modelId
      - params
      - defaults
      properties:
        modelId:
          type: string
        type:
          type:
          - string
          - 'null'
        provider:
          type:
          - string
          - 'null'
        params:
          type: object
          additionalProperties:
            type: object
            additionalProperties: true
        defaults:
          type: object
          additionalProperties: true
    Attachment:
      type: object
      additionalProperties: true
      properties:
        type:
          type: string
          description: Advisory attachment kind. The SDK/server do not reject unsupported model combinations.
          enum:
          - image
          - audio
          - video
          - pdf
          - file
          - text
          - json
          - url
        url:
          type: string
        uri:
          type: string
        data:
          type: string
          description: Data URL, plain text content, or provider-ready encoded payload.
        base64:
          type: string
        mimeType:
          type: string
        contentType:
          type: string
        name:
          type: string
        filename:
          type: string
        text:
          type: string
        content:
          type: string
        detail:
          type: string
          enum:
          - auto
          - low
          - high
        metadata:
          type: object
          additionalProperties: true
    AttachmentInput:
      oneOf:
      - "$ref": "#/components/schemas/Attachment"
      - type: string
    Attachments:
      type: array
      items:
        "$ref": "#/components/schemas/AttachmentInput"
    ResponseFormat:
      type: object
      additionalProperties: true
      properties:
        type:
          type: string
          enum:
          - text
          - json_object
          - json_schema
        json_schema:
          type: object
          additionalProperties: true
    StreamOptions:
      type: object
      additionalProperties: true
      properties:
        include_usage:
          type: boolean
        include_obfuscation:
          type: boolean
    ReasoningOptions:
      type: object
      additionalProperties: true
      properties:
        effort:
          type: string
        summary:
          type: string
    Message:
      type: object
      required:
      - role
      - content
      additionalProperties: true
      properties:
        role:
          type: string
          enum:
          - system
          - developer
          - user
          - assistant
          - tool
        content:
          oneOf:
          - type: string
          - type: 'null'
          - type: array
            items:
              type: object
              additionalProperties: true
        name:
          type: string
        tool_call_id:
          type: string
        tool_calls:
          type: array
          items:
            type: object
            additionalProperties: true
    ResponsesCreateRequest:
      type: object
      required:
      - model
      - input
      additionalProperties: true
      properties:
        model:
          type: string
        input: {}
        attachments:
          "$ref": "#/components/schemas/Attachments"
        attachment:
          "$ref": "#/components/schemas/AttachmentInput"
        stream:
          type: boolean
        modalities:
          type: array
          items:
            type: string
            enum:
            - text
            - image
            - audio
            - video
            - embedding
        instructions:
          type: string
        previous_response_id:
          type: string
        max_output_tokens:
          type: integer
        temperature:
          type: number
        tools:
          type: array
          items:
            type: object
            additionalProperties: true
        tool_choice: {}
        response_format:
          "$ref": "#/components/schemas/ResponseFormat"
        stream_options:
          "$ref": "#/components/schemas/StreamOptions"
        parallel_tool_calls:
          type: boolean
        metadata:
          type: object
          additionalProperties: true
        service_tier:
          type: string
        store:
          type: boolean
        reasoning_effort:
          type: string
        reasoning:
          "$ref": "#/components/schemas/ReasoningOptions"
        include:
          type: array
          items:
            type: string
        prompt_cache_key:
          type: string
        prompt_cache_retention:
          type: string
        text:
          type: object
          additionalProperties: true
        n:
          type: integer
        size:
          type: string
        quality:
          type: string
        image_url:
          type: string
        voice:
          type: string
        language:
          type: string
        speed:
          type: number
        duration:
          type: number
        aspect_ratio:
          type: string
        resolution:
          type: string
    ResponseObject:
      type: object
      required:
      - id
      - object
      - created_at
      - status
      - model
      - output
      additionalProperties: true
      properties:
        id:
          type: string
        object:
          const: response
        created_at:
          type: integer
        status:
          type: string
          enum:
          - completed
          - in_progress
          - failed
          - cancelled
        model:
          type: string
        output:
          type: array
          items:
            type: object
            additionalProperties: true
        usage:
          type: object
          additionalProperties: true
        error:
          type: object
          additionalProperties: true
        previous_response_id:
          type: string
        job_id:
          type: string
        receipt:
          "$ref": "#/components/schemas/ReceiptBody"
    ResponseEventStream:
      description: SSE frames for response creation, text deltas, reasoning deltas,
        tool calls, image partials, typed output items for text/image/audio/video/embedding,
        video status, completion, `receipt`, and `compose.error`.
      type: string
    ReceiptBody:
      type: object
      additionalProperties: true
      properties:
        subject:
          type: string
        line_items:
          type: array
          items:
            "$ref": "#/components/schemas/ReceiptLineItem"
        provider_amount_wei:
          "$ref": "#/components/schemas/AtomicAmount"
        platform_fee_wei:
          "$ref": "#/components/schemas/AtomicAmount"
        final_amount_wei:
          "$ref": "#/components/schemas/AtomicAmount"
        tx_hash:
          type: string
        network:
          "$ref": "#/components/schemas/ChainNetwork"
        settled_at:
          type: integer
    ReceiptLineItem:
      type: object
      required:
      - key
      - unit
      - quantity
      - amount_wei
      additionalProperties: true
      properties:
        key:
          type: string
        unit:
          type: string
        quantity:
          type: number
        unit_price_usd:
          type: number
        amount_wei:
          "$ref": "#/components/schemas/AtomicAmount"