@leaflow/sdk 0.0.0-dev.516.g28eeab9 → 0.0.0-dev.523.gcaeef48

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 (95) hide show
  1. package/dist/billing/v1/generated/models.d.ts +133 -69
  2. package/dist/billing/v1/generated/models.js +12 -26
  3. package/dist/billing/v1/generated/schemas.zod.d.ts +91 -18
  4. package/dist/billing/v1/generated/schemas.zod.js +132 -14
  5. package/dist/billing/v1/generated/validators/activeResource.zod.js +2 -1
  6. package/dist/billing/v1/generated/validators/activeResourceStatus.zod.d.ts +16 -0
  7. package/dist/billing/v1/generated/validators/activeResourceStatus.zod.js +9 -0
  8. package/dist/billing/v1/generated/validators/allowance.zod.js +2 -1
  9. package/dist/billing/v1/generated/validators/allowanceStatus.zod.d.ts +16 -0
  10. package/dist/billing/v1/generated/validators/allowanceStatus.zod.js +9 -0
  11. package/dist/billing/v1/generated/validators/creditGrant.zod.js +2 -1
  12. package/dist/billing/v1/generated/validators/creditGrantStatus.zod.d.ts +16 -0
  13. package/dist/billing/v1/generated/validators/creditGrantStatus.zod.js +9 -0
  14. package/dist/billing/v1/generated/validators/creditNote.zod.js +2 -1
  15. package/dist/billing/v1/generated/validators/creditNoteStatus.zod.d.ts +14 -0
  16. package/dist/billing/v1/generated/validators/creditNoteStatus.zod.js +9 -0
  17. package/dist/billing/v1/generated/validators/discount.zod.js +2 -3
  18. package/dist/billing/v1/generated/validators/discountStatus.zod.d.ts +16 -0
  19. package/dist/billing/v1/generated/validators/discountStatus.zod.js +11 -0
  20. package/dist/billing/v1/generated/validators/listAccountDiscountsParams.zod.d.ts +7 -0
  21. package/dist/billing/v1/generated/validators/listAccountDiscountsParams.zod.js +3 -0
  22. package/dist/billing/v1/generated/validators/listActiveResourcesParams.zod.d.ts +3 -2
  23. package/dist/billing/v1/generated/validators/listActiveResourcesParams.zod.js +3 -1
  24. package/dist/billing/v1/generated/validators/listAllowancesParams.zod.d.ts +3 -2
  25. package/dist/billing/v1/generated/validators/listAllowancesParams.zod.js +3 -1
  26. package/dist/billing/v1/generated/validators/listCancellationsParams.zod.d.ts +3 -2
  27. package/dist/billing/v1/generated/validators/listCancellationsParams.zod.js +4 -1
  28. package/dist/billing/v1/generated/validators/listCheckoutSessionsParams.zod.d.ts +3 -2
  29. package/dist/billing/v1/generated/validators/listCheckoutSessionsParams.zod.js +6 -1
  30. package/dist/billing/v1/generated/validators/listCreditGrantsParams.zod.d.ts +3 -2
  31. package/dist/billing/v1/generated/validators/listCreditGrantsParams.zod.js +3 -1
  32. package/dist/billing/v1/generated/validators/listCreditNotesParams.zod.d.ts +5 -0
  33. package/dist/billing/v1/generated/validators/listCreditNotesParams.zod.js +3 -0
  34. package/dist/billing/v1/generated/validators/listFeatureGrantsParams.zod.d.ts +3 -2
  35. package/dist/billing/v1/generated/validators/listFeatureGrantsParams.zod.js +2 -1
  36. package/dist/billing/v1/generated/validators/listInvoicesParams.zod.d.ts +3 -2
  37. package/dist/billing/v1/generated/validators/listInvoicesParams.zod.js +2 -1
  38. package/dist/billing/v1/generated/validators/listOrdersParams.zod.d.ts +3 -2
  39. package/dist/billing/v1/generated/validators/listOrdersParams.zod.js +2 -1
  40. package/dist/billing/v1/generated/validators/listPaymentMethodsParams.zod.d.ts +5 -0
  41. package/dist/billing/v1/generated/validators/listPaymentMethodsParams.zod.js +6 -0
  42. package/dist/billing/v1/generated/validators/listRefundsParams.zod.d.ts +7 -0
  43. package/dist/billing/v1/generated/validators/listRefundsParams.zod.js +3 -0
  44. package/dist/billing/v1/generated/validators/listStatementsParams.zod.d.ts +3 -2
  45. package/dist/billing/v1/generated/validators/listStatementsParams.zod.js +2 -1
  46. package/dist/billing/v1/generated/validators/listSubscriptionsParams.zod.d.ts +9 -0
  47. package/dist/billing/v1/generated/validators/listSubscriptionsParams.zod.js +3 -0
  48. package/dist/billing/v1/generated/validators/listTopUpsParams.zod.d.ts +7 -0
  49. package/dist/billing/v1/generated/validators/listTopUpsParams.zod.js +3 -0
  50. package/dist/billing/v1/generated/validators/listTransactionsParams.zod.d.ts +15 -0
  51. package/dist/billing/v1/generated/validators/listTransactionsParams.zod.js +6 -0
  52. package/dist/billing/v1/generated/validators/listWithdrawalsParams.zod.d.ts +9 -0
  53. package/dist/billing/v1/generated/validators/listWithdrawalsParams.zod.js +3 -0
  54. package/dist/billing/v1/generated/validators/refund.zod.js +2 -3
  55. package/dist/billing/v1/generated/validators/refundStatus.zod.d.ts +16 -0
  56. package/dist/billing/v1/generated/validators/refundStatus.zod.js +11 -0
  57. package/dist/billing/v1/generated/validators/subscription.zod.js +2 -3
  58. package/dist/billing/v1/generated/validators/subscriptionStatus.zod.d.ts +18 -0
  59. package/dist/billing/v1/generated/validators/subscriptionStatus.zod.js +11 -0
  60. package/dist/billing/v1/generated/validators/topUp.zod.js +2 -3
  61. package/dist/billing/v1/generated/validators/topUpStatus.zod.d.ts +16 -0
  62. package/dist/billing/v1/generated/validators/topUpStatus.zod.js +11 -0
  63. package/dist/billing/v1/generated/validators/transaction.zod.js +2 -4
  64. package/dist/billing/v1/generated/validators/transactionStatus.zod.d.ts +16 -0
  65. package/dist/billing/v1/generated/validators/transactionStatus.zod.js +11 -0
  66. package/dist/billing/v1/generated/validators/withdrawal.zod.js +2 -8
  67. package/dist/billing/v1/generated/validators/withdrawalStatus.zod.d.ts +18 -0
  68. package/dist/billing/v1/generated/validators/withdrawalStatus.zod.js +16 -0
  69. package/dist/canopy/v1/generated/functions.d.ts +73 -1
  70. package/dist/canopy/v1/generated/functions.js +92 -6
  71. package/dist/canopy/v1/generated/models.d.ts +148 -12
  72. package/dist/canopy/v1/generated/models.js +13 -0
  73. package/dist/canopy/v1/generated/schemas.zod.d.ts +49 -0
  74. package/dist/canopy/v1/generated/schemas.zod.js +28 -0
  75. package/dist/canopy/v1/generated/validators/cursorPageRequestResource.zod.d.ts +10 -0
  76. package/dist/canopy/v1/generated/validators/getVideoContentHeaders.zod.d.ts +46 -0
  77. package/dist/canopy/v1/generated/validators/getVideoContentHeaders.zod.js +44 -0
  78. package/dist/canopy/v1/generated/validators/mediaUsageDetails.zod.d.ts +61 -0
  79. package/dist/canopy/v1/generated/validators/mediaUsageDetails.zod.js +67 -0
  80. package/dist/canopy/v1/generated/validators/requestResource.zod.d.ts +10 -0
  81. package/dist/canopy/v1/generated/validators/requestResource.zod.js +2 -0
  82. package/dist/canopy/v1/generated/validators/videoCreateRequest.zod.d.ts +67 -0
  83. package/dist/canopy/v1/generated/validators/videoCreateRequest.zod.js +70 -0
  84. package/dist/canopy/v1/generated/validators/videoReferenceMedia.zod.d.ts +53 -0
  85. package/dist/canopy/v1/generated/validators/videoReferenceMedia.zod.js +53 -0
  86. package/dist/canopy/v1/generated/validators/videoTask.zod.d.ts +71 -0
  87. package/dist/canopy/v1/generated/validators/videoTask.zod.js +64 -0
  88. package/dist/canopy/v1/generated/validators/videoUsage.zod.d.ts +54 -0
  89. package/dist/canopy/v1/generated/validators/videoUsage.zod.js +62 -0
  90. package/dist/compute/v2/generated/models.d.ts +1 -1
  91. package/dist/compute/v2/generated/validators/createSecurityGroupRuleRequestBody.zod.js +1 -1
  92. package/dist/proto/leaflow/fleet/virtualdesktop/datatransfer/v1/datatransfer_pb.d.ts +10 -5
  93. package/dist/routes.d.ts +24 -0
  94. package/dist/routes.js +27 -0
  95. package/package.json +1 -1
@@ -637,6 +637,36 @@ export interface MediaUsage {
637
637
  export interface ModelListResponseBody {
638
638
  items: ModelResource[];
639
639
  }
640
+ export type MediaUsageDetailsReferenceCounts = {
641
+ [key: string]: number;
642
+ };
643
+ /**
644
+ * Per-request media measurements. Omitted values are unknown, not zero.
645
+ * Reference counts are audit data, not an additional billable quantity.
646
+ * video_quantity is the exact decimal quantity for the existing video_seconds
647
+ * meter; video_seconds in the summary remains a rounded compatibility counter.
648
+ * No monetary price or refund is calculated by Canopy.
649
+ */
650
+ export interface MediaUsageDetails {
651
+ /** @minimum 0 */
652
+ input_video_seconds?: number;
653
+ /** @minimum 0 */
654
+ output_video_seconds?: number;
655
+ /** @minimum 0 */
656
+ input_audio_seconds?: number;
657
+ /**
658
+ * Recorded input quantity for the input_images meter, independent of its Billing price. Absent when unmeasured or not separately metered.
659
+ * @pattern ^[0-9]+$
660
+ */
661
+ input_image_quantity?: string;
662
+ /** @minimum 0 */
663
+ input_images?: number;
664
+ /** @minimum 0 */
665
+ output_images?: number;
666
+ /** @pattern ^[0-9]+([.][0-9]+)?$ */
667
+ video_quantity?: string;
668
+ reference_counts?: MediaUsageDetailsReferenceCounts;
669
+ }
640
670
  export type RequestResourceStatus = (typeof RequestResourceStatus)[keyof typeof RequestResourceStatus];
641
671
  export declare const RequestResourceStatus: {
642
672
  readonly in_flight: "in_flight";
@@ -716,6 +746,7 @@ export interface RequestResource {
716
746
  reasoning: ReasoningDiagnostics | null;
717
747
  /** Media quantities and their rate dimensions. Null for a token-only request. */
718
748
  media?: MediaUsage | null;
749
+ media_details?: MediaUsageDetails;
719
750
  }
720
751
  export interface CursorPageRequestResource {
721
752
  /** The items in this page */
@@ -987,6 +1018,120 @@ export interface CreateServiceResponseBody {
987
1018
  */
988
1019
  order_id: string | null;
989
1020
  }
1021
+ export type VideoReferenceMediaType = (typeof VideoReferenceMediaType)[keyof typeof VideoReferenceMediaType];
1022
+ export declare const VideoReferenceMediaType: {
1023
+ readonly first_frame: "first_frame";
1024
+ readonly last_frame: "last_frame";
1025
+ readonly reference_image: "reference_image";
1026
+ readonly reference_video: "reference_video";
1027
+ readonly reference_audio: "reference_audio";
1028
+ };
1029
+ /**
1030
+ * A typed reference asset. Order is preserved, including order within each media type.
1031
+ * Wan 3.0 accepts at most one first frame, one last frame, ten reference images,
1032
+ * five reference videos and five reference audio clips. A last frame needs a first frame.
1033
+ * First/last frames cannot be combined with reference_image, reference_video or reference_audio.
1034
+ * Reference images, videos and audio may be combined. Other models can accept fewer roles.
1035
+ * Images accept public HTTP(S) or base64 image data URLs. Video and audio accept public
1036
+ * HTTP(S) URLs only. Wan 3.0 limits reference videos and audio to 1-15 seconds each and
1037
+ * 15 seconds total per media type; input video plus output duration must not exceed 30 seconds.
1038
+ * The upstream validates remote asset size, format and duration. Canopy does not fetch them.
1039
+ */
1040
+ export interface VideoReferenceMedia {
1041
+ type: VideoReferenceMediaType;
1042
+ /** @minLength 1 */
1043
+ url: string;
1044
+ }
1045
+ /**
1046
+ * Provide a prompt, reference media, or both. Extra fields depend on the selected model and adapter.
1047
+ */
1048
+ export interface VideoCreateRequest {
1049
+ /** @minLength 1 */
1050
+ model: string;
1051
+ prompt?: string;
1052
+ /** @minimum 1 */
1053
+ seconds?: number;
1054
+ size?: string;
1055
+ resolution?: string;
1056
+ /**
1057
+ * Backward-compatible first-frame image URL. May be combined with a last_frame, not another first_frame.
1058
+ * @minLength 1
1059
+ */
1060
+ input_reference?: string;
1061
+ /**
1062
+ * @minItems 1
1063
+ * @maxItems 20
1064
+ */
1065
+ reference_media?: VideoReferenceMedia[];
1066
+ /** Whether the output has audio; separate from a reference_audio input. */
1067
+ audio?: boolean;
1068
+ prompt_extend?: boolean;
1069
+ watermark?: boolean;
1070
+ seed?: number;
1071
+ negative_prompt?: string;
1072
+ [key: string]: unknown;
1073
+ }
1074
+ /**
1075
+ * Provider measurements on a task; only completed tasks are settled.
1076
+ */
1077
+ export interface VideoUsage {
1078
+ /**
1079
+ * Output duration, kept for compatibility.
1080
+ * @minimum 0
1081
+ */
1082
+ seconds?: number;
1083
+ resolution?: string;
1084
+ /** @minimum 0 */
1085
+ input_seconds?: number;
1086
+ /** @minimum 0 */
1087
+ output_seconds?: number;
1088
+ /**
1089
+ * Total measured input and output video duration, not a monetary quote.
1090
+ * @minimum 0
1091
+ */
1092
+ billable_seconds?: number;
1093
+ [key: string]: unknown;
1094
+ }
1095
+ export type VideoTaskStatus = (typeof VideoTaskStatus)[keyof typeof VideoTaskStatus];
1096
+ export declare const VideoTaskStatus: {
1097
+ readonly queued: "queued";
1098
+ readonly in_progress: "in_progress";
1099
+ readonly completed: "completed";
1100
+ readonly failed: "failed";
1101
+ };
1102
+ export type VideoTaskError = {
1103
+ code?: string;
1104
+ message?: string;
1105
+ [key: string]: unknown;
1106
+ };
1107
+ export interface VideoTask {
1108
+ id: string;
1109
+ object: string;
1110
+ status: VideoTaskStatus;
1111
+ model?: string;
1112
+ usage?: VideoUsage;
1113
+ /** Output duration, not the duration of input references. */
1114
+ seconds?: string;
1115
+ size?: string;
1116
+ created_at?: number;
1117
+ completed_at?: number;
1118
+ expires_at?: number;
1119
+ progress?: number;
1120
+ error?: VideoTaskError;
1121
+ [key: string]: unknown;
1122
+ }
1123
+ /**
1124
+ * A request body in the endpoint's own protocol. Canopy reads only the model name and forwards the rest unchanged.
1125
+ */
1126
+ export interface NativeRequest {
1127
+ [key: string]: unknown;
1128
+ }
1129
+ /**
1130
+ * A response body in the endpoint's own protocol, as the upstream returned it.
1131
+ */
1132
+ export interface NativeResponse {
1133
+ [key: string]: unknown;
1134
+ }
990
1135
  export type ResponseCreateReasoning = {
991
1136
  [key: string]: unknown;
992
1137
  };
@@ -1019,18 +1164,6 @@ export interface ResponseDeleted {
1019
1164
  object: string;
1020
1165
  deleted: boolean;
1021
1166
  }
1022
- /**
1023
- * A request body in the endpoint's own protocol. Canopy reads only the model name and forwards the rest unchanged.
1024
- */
1025
- export interface NativeRequest {
1026
- [key: string]: unknown;
1027
- }
1028
- /**
1029
- * A response body in the endpoint's own protocol, as the upstream returned it.
1030
- */
1031
- export interface NativeResponse {
1032
- [key: string]: unknown;
1033
- }
1034
1167
  /**
1035
1168
  * Pagination metadata for stable numbered pages. total_count is returned only when the operation can determine it without an unbounded scan.
1036
1169
  */
@@ -1055,6 +1188,9 @@ export interface CursorPagination {
1055
1188
  * The request conflicts with the current state of the service. The codes are described where they apply.
1056
1189
  */
1057
1190
  export type ConflictResponse = Error;
1191
+ export type GetVideoContentHeaders = {
1192
+ Range?: string;
1193
+ };
1058
1194
  export type StreamGenerateContentParams = {
1059
1195
  alt?: StreamGenerateContentAlt;
1060
1196
  };
@@ -99,6 +99,19 @@ export const CheckoutMode = {
99
99
  automatic: "automatic",
100
100
  deferred: "deferred",
101
101
  };
102
+ export const VideoReferenceMediaType = {
103
+ first_frame: "first_frame",
104
+ last_frame: "last_frame",
105
+ reference_image: "reference_image",
106
+ reference_video: "reference_video",
107
+ reference_audio: "reference_audio",
108
+ };
109
+ export const VideoTaskStatus = {
110
+ queued: "queued",
111
+ in_progress: "in_progress",
112
+ completed: "completed",
113
+ failed: "failed",
114
+ };
102
115
  export const StreamGenerateContentAlt = {
103
116
  sse: "sse",
104
117
  };
@@ -39,6 +39,55 @@
39
39
  * OpenAPI spec version: 1.0.0
40
40
  */
41
41
  import * as zod from "zod";
42
+ /**
43
+ * Create an asynchronous video task in the verified project. Model and upstream support
44
+ * determine the accepted duration, resolution and references. Poll the returned task id.
45
+ * `reference_media` is a Canopy extension for ordered, typed image, video and audio URLs.
46
+ * Existing `input_reference` remains a first frame.
47
+ * The runtime also accepts OpenAI multipart uploads; send reference_media as a JSON text field.
48
+ * No remote reference is downloaded or retained by Canopy during request preparation.
49
+ * @summary Create a video
50
+ */
51
+ export declare const CreateVideoBody: zod.ZodObject<{
52
+ model: zod.ZodString;
53
+ prompt: zod.ZodOptional<zod.ZodString>;
54
+ seconds: zod.ZodOptional<zod.ZodInt>;
55
+ size: zod.ZodOptional<zod.ZodString>;
56
+ resolution: zod.ZodOptional<zod.ZodString>;
57
+ input_reference: zod.ZodOptional<zod.ZodString>;
58
+ reference_media: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
59
+ type: zod.ZodEnum<{
60
+ first_frame: "first_frame";
61
+ last_frame: "last_frame";
62
+ reference_image: "reference_image";
63
+ reference_video: "reference_video";
64
+ reference_audio: "reference_audio";
65
+ }>;
66
+ url: zod.ZodString;
67
+ }, zod.z.core.$strict>>>;
68
+ audio: zod.ZodOptional<zod.ZodBoolean>;
69
+ prompt_extend: zod.ZodOptional<zod.ZodBoolean>;
70
+ watermark: zod.ZodOptional<zod.ZodBoolean>;
71
+ seed: zod.ZodOptional<zod.ZodInt>;
72
+ negative_prompt: zod.ZodOptional<zod.ZodString>;
73
+ }, zod.z.core.$strict>;
74
+ /**
75
+ * Read an existing task owned by the verified project; does not create another video.
76
+ * @summary Get a video task
77
+ */
78
+ export declare const GetVideoParams: zod.ZodObject<{
79
+ video: zod.ZodString;
80
+ }, zod.z.core.$strict>;
81
+ /**
82
+ * Stream a completed video owned by the verified project. Supports HTTP Range.
83
+ * @summary Get generated video content
84
+ */
85
+ export declare const GetVideoContentParams: zod.ZodObject<{
86
+ video: zod.ZodString;
87
+ }, zod.z.core.$strict>;
88
+ export declare const GetVideoContentHeader: zod.ZodObject<{
89
+ Range: zod.ZodOptional<zod.ZodString>;
90
+ }, zod.z.core.$strict>;
42
91
  /**
43
92
  * Supports JSON, SSE and native upstream response storage. Stored continuation is restricted to the current project and original provider credential. WebSocket clients connect with GET /v1/responses and send response.create events; one response may be active on a connection at a time. The connection stays on its initial model and provider credential.
44
93
  * @summary Create a model response
@@ -46,6 +46,34 @@ import { EmbeddingRequest } from "./validators/embeddingRequest.zod.js";
46
46
  import { NativeRequest } from "./validators/nativeRequest.zod.js";
47
47
  import { ResponseCreate } from "./validators/responseCreate.zod.js";
48
48
  import { UpdateAPIKeyRequestBody } from "./validators/updateAPIKeyRequestBody.zod.js";
49
+ import { VideoCreateRequest } from "./validators/videoCreateRequest.zod.js";
50
+ /**
51
+ * Create an asynchronous video task in the verified project. Model and upstream support
52
+ * determine the accepted duration, resolution and references. Poll the returned task id.
53
+ * `reference_media` is a Canopy extension for ordered, typed image, video and audio URLs.
54
+ * Existing `input_reference` remains a first frame.
55
+ * The runtime also accepts OpenAI multipart uploads; send reference_media as a JSON text field.
56
+ * No remote reference is downloaded or retained by Canopy during request preparation.
57
+ * @summary Create a video
58
+ */
59
+ export const CreateVideoBody = VideoCreateRequest;
60
+ /**
61
+ * Read an existing task owned by the verified project; does not create another video.
62
+ * @summary Get a video task
63
+ */
64
+ export const GetVideoParams = zod.strictObject({
65
+ video: zod.string().min(1),
66
+ });
67
+ /**
68
+ * Stream a completed video owned by the verified project. Supports HTTP Range.
69
+ * @summary Get generated video content
70
+ */
71
+ export const GetVideoContentParams = zod.strictObject({
72
+ video: zod.string().min(1),
73
+ });
74
+ export const GetVideoContentHeader = zod.strictObject({
75
+ Range: zod.string().optional(),
76
+ });
49
77
  /**
50
78
  * Supports JSON, SSE and native upstream response storage. Stored continuation is restricted to the current project and original provider credential. WebSocket clients connect with GET /v1/responses and send response.create events; one response may be active on a connection at a time. The connection stays on its initial model and provider credential.
51
79
  * @summary Create a model response
@@ -83,6 +83,16 @@ export declare const CursorPageRequestResource: zod.ZodObject<{
83
83
  quality: zod.ZodNullable<zod.ZodString>;
84
84
  resolution: zod.ZodNullable<zod.ZodString>;
85
85
  }, zod.z.core.$strict>, zod.ZodNull]>>;
86
+ media_details: zod.ZodOptional<zod.ZodObject<{
87
+ input_video_seconds: zod.ZodOptional<zod.ZodNumber>;
88
+ output_video_seconds: zod.ZodOptional<zod.ZodNumber>;
89
+ input_audio_seconds: zod.ZodOptional<zod.ZodNumber>;
90
+ input_image_quantity: zod.ZodOptional<zod.ZodString>;
91
+ input_images: zod.ZodOptional<zod.ZodInt>;
92
+ output_images: zod.ZodOptional<zod.ZodInt>;
93
+ video_quantity: zod.ZodOptional<zod.ZodString>;
94
+ reference_counts: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodInt>>;
95
+ }, zod.z.core.$strict>>;
86
96
  }, zod.z.core.$strict>>;
87
97
  next_cursor: zod.ZodString;
88
98
  }, zod.z.core.$strict>;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Canopy API
5
+ * Canopy model inference, API keys, model catalogue, service enablement and recorded usage.
6
+ *
7
+ * Project inference is served on this host in each provider's own protocol:
8
+ *
9
+ * - OpenAI: `/v1/chat/completions`, `/v1/responses` and `/v1/embeddings`; use
10
+ * `https://canopy.leaflow.cloud/v1` as the OpenAI SDK base URL.
11
+ * - Anthropic: `/v1/messages`; use `https://canopy.leaflow.cloud` as the Anthropic SDK base URL.
12
+ * - Gemini: `/v1beta/models/{model}:generateContent` and `:streamGenerateContent`.
13
+ *
14
+ * Canopy does not convert between protocols. A request is accepted only for a model whose
15
+ * `supported_endpoints` lists the endpoint it was sent to, and it is forwarded unchanged except for
16
+ * the model name and the credentials. Reasoning settings such as `reasoning_effort` are passed
17
+ * through as written; a model's `capabilities` lists the values its upstream accepts.
18
+ *
19
+ * Management operations use `/api/v1`. The management model catalogue names how each model is billed in Billing;
20
+ * `/v1/models` returns the OpenAI model format with Canopy capabilities and parameter limits.
21
+ *
22
+ * ## Authentication
23
+ *
24
+ * Every request carries a scoped token; see the `bearerAuth` security scheme.
25
+ *
26
+ * Management and project inference accept the same verified IAM scoped token. The token is the
27
+ * sole billing project authority; `OpenAI-Project` and historical identity headers cannot
28
+ * override it. These endpoints do not accept a Canopy API key. The separate API-key gateway
29
+ * accepts Canopy API keys and serves the same endpoints.
30
+ *
31
+ * ## Conventions
32
+ *
33
+ * - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
34
+ * - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
35
+ * - **A usage query must carry a time range**, spanning no more than 31 days, or 400 days for the usage timeline. `from` and `to` carry a timezone offset, which the server does not infer.
36
+ * - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
37
+ * - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
38
+ * - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates Billing holds for each model's `billing`.
39
+ * OpenAPI spec version: 1.0.0
40
+ */
41
+ import * as zod from "zod";
42
+ export declare const GetVideoContentHeaders: zod.ZodObject<{
43
+ Range: zod.ZodOptional<zod.ZodString>;
44
+ }, zod.z.core.$strict>;
45
+ export type GetVideoContentHeaders = zod.input<typeof GetVideoContentHeaders>;
46
+ export type GetVideoContentHeadersOutput = zod.output<typeof GetVideoContentHeaders>;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Canopy API
5
+ * Canopy model inference, API keys, model catalogue, service enablement and recorded usage.
6
+ *
7
+ * Project inference is served on this host in each provider's own protocol:
8
+ *
9
+ * - OpenAI: `/v1/chat/completions`, `/v1/responses` and `/v1/embeddings`; use
10
+ * `https://canopy.leaflow.cloud/v1` as the OpenAI SDK base URL.
11
+ * - Anthropic: `/v1/messages`; use `https://canopy.leaflow.cloud` as the Anthropic SDK base URL.
12
+ * - Gemini: `/v1beta/models/{model}:generateContent` and `:streamGenerateContent`.
13
+ *
14
+ * Canopy does not convert between protocols. A request is accepted only for a model whose
15
+ * `supported_endpoints` lists the endpoint it was sent to, and it is forwarded unchanged except for
16
+ * the model name and the credentials. Reasoning settings such as `reasoning_effort` are passed
17
+ * through as written; a model's `capabilities` lists the values its upstream accepts.
18
+ *
19
+ * Management operations use `/api/v1`. The management model catalogue names how each model is billed in Billing;
20
+ * `/v1/models` returns the OpenAI model format with Canopy capabilities and parameter limits.
21
+ *
22
+ * ## Authentication
23
+ *
24
+ * Every request carries a scoped token; see the `bearerAuth` security scheme.
25
+ *
26
+ * Management and project inference accept the same verified IAM scoped token. The token is the
27
+ * sole billing project authority; `OpenAI-Project` and historical identity headers cannot
28
+ * override it. These endpoints do not accept a Canopy API key. The separate API-key gateway
29
+ * accepts Canopy API keys and serves the same endpoints.
30
+ *
31
+ * ## Conventions
32
+ *
33
+ * - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
34
+ * - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
35
+ * - **A usage query must carry a time range**, spanning no more than 31 days, or 400 days for the usage timeline. `from` and `to` carry a timezone offset, which the server does not infer.
36
+ * - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
37
+ * - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
38
+ * - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates Billing holds for each model's `billing`.
39
+ * OpenAPI spec version: 1.0.0
40
+ */
41
+ import * as zod from "zod";
42
+ export const GetVideoContentHeaders = zod.strictObject({
43
+ Range: zod.string().optional(),
44
+ });
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Canopy API
5
+ * Canopy model inference, API keys, model catalogue, service enablement and recorded usage.
6
+ *
7
+ * Project inference is served on this host in each provider's own protocol:
8
+ *
9
+ * - OpenAI: `/v1/chat/completions`, `/v1/responses` and `/v1/embeddings`; use
10
+ * `https://canopy.leaflow.cloud/v1` as the OpenAI SDK base URL.
11
+ * - Anthropic: `/v1/messages`; use `https://canopy.leaflow.cloud` as the Anthropic SDK base URL.
12
+ * - Gemini: `/v1beta/models/{model}:generateContent` and `:streamGenerateContent`.
13
+ *
14
+ * Canopy does not convert between protocols. A request is accepted only for a model whose
15
+ * `supported_endpoints` lists the endpoint it was sent to, and it is forwarded unchanged except for
16
+ * the model name and the credentials. Reasoning settings such as `reasoning_effort` are passed
17
+ * through as written; a model's `capabilities` lists the values its upstream accepts.
18
+ *
19
+ * Management operations use `/api/v1`. The management model catalogue names how each model is billed in Billing;
20
+ * `/v1/models` returns the OpenAI model format with Canopy capabilities and parameter limits.
21
+ *
22
+ * ## Authentication
23
+ *
24
+ * Every request carries a scoped token; see the `bearerAuth` security scheme.
25
+ *
26
+ * Management and project inference accept the same verified IAM scoped token. The token is the
27
+ * sole billing project authority; `OpenAI-Project` and historical identity headers cannot
28
+ * override it. These endpoints do not accept a Canopy API key. The separate API-key gateway
29
+ * accepts Canopy API keys and serves the same endpoints.
30
+ *
31
+ * ## Conventions
32
+ *
33
+ * - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
34
+ * - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
35
+ * - **A usage query must carry a time range**, spanning no more than 31 days, or 400 days for the usage timeline. `from` and `to` carry a timezone offset, which the server does not infer.
36
+ * - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
37
+ * - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
38
+ * - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates Billing holds for each model's `billing`.
39
+ * OpenAPI spec version: 1.0.0
40
+ */
41
+ import * as zod from "zod";
42
+ export declare const mediaUsageDetailsInputVideoSecondsMin = 0;
43
+ export declare const mediaUsageDetailsOutputVideoSecondsMin = 0;
44
+ export declare const mediaUsageDetailsInputAudioSecondsMin = 0;
45
+ export declare const mediaUsageDetailsInputImageQuantityRegExp: RegExp;
46
+ export declare const mediaUsageDetailsInputImagesMin = 0;
47
+ export declare const mediaUsageDetailsOutputImagesMin = 0;
48
+ export declare const mediaUsageDetailsVideoQuantityRegExp: RegExp;
49
+ export declare const mediaUsageDetailsReferenceCountsMinOne = 0;
50
+ export declare const MediaUsageDetails: zod.ZodObject<{
51
+ input_video_seconds: zod.ZodOptional<zod.ZodNumber>;
52
+ output_video_seconds: zod.ZodOptional<zod.ZodNumber>;
53
+ input_audio_seconds: zod.ZodOptional<zod.ZodNumber>;
54
+ input_image_quantity: zod.ZodOptional<zod.ZodString>;
55
+ input_images: zod.ZodOptional<zod.ZodInt>;
56
+ output_images: zod.ZodOptional<zod.ZodInt>;
57
+ video_quantity: zod.ZodOptional<zod.ZodString>;
58
+ reference_counts: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodInt>>;
59
+ }, zod.z.core.$strict>;
60
+ export type MediaUsageDetails = zod.input<typeof MediaUsageDetails>;
61
+ export type MediaUsageDetailsOutput = zod.output<typeof MediaUsageDetails>;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Canopy API
5
+ * Canopy model inference, API keys, model catalogue, service enablement and recorded usage.
6
+ *
7
+ * Project inference is served on this host in each provider's own protocol:
8
+ *
9
+ * - OpenAI: `/v1/chat/completions`, `/v1/responses` and `/v1/embeddings`; use
10
+ * `https://canopy.leaflow.cloud/v1` as the OpenAI SDK base URL.
11
+ * - Anthropic: `/v1/messages`; use `https://canopy.leaflow.cloud` as the Anthropic SDK base URL.
12
+ * - Gemini: `/v1beta/models/{model}:generateContent` and `:streamGenerateContent`.
13
+ *
14
+ * Canopy does not convert between protocols. A request is accepted only for a model whose
15
+ * `supported_endpoints` lists the endpoint it was sent to, and it is forwarded unchanged except for
16
+ * the model name and the credentials. Reasoning settings such as `reasoning_effort` are passed
17
+ * through as written; a model's `capabilities` lists the values its upstream accepts.
18
+ *
19
+ * Management operations use `/api/v1`. The management model catalogue names how each model is billed in Billing;
20
+ * `/v1/models` returns the OpenAI model format with Canopy capabilities and parameter limits.
21
+ *
22
+ * ## Authentication
23
+ *
24
+ * Every request carries a scoped token; see the `bearerAuth` security scheme.
25
+ *
26
+ * Management and project inference accept the same verified IAM scoped token. The token is the
27
+ * sole billing project authority; `OpenAI-Project` and historical identity headers cannot
28
+ * override it. These endpoints do not accept a Canopy API key. The separate API-key gateway
29
+ * accepts Canopy API keys and serves the same endpoints.
30
+ *
31
+ * ## Conventions
32
+ *
33
+ * - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
34
+ * - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
35
+ * - **A usage query must carry a time range**, spanning no more than 31 days, or 400 days for the usage timeline. `from` and `to` carry a timezone offset, which the server does not infer.
36
+ * - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
37
+ * - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
38
+ * - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates Billing holds for each model's `billing`.
39
+ * OpenAPI spec version: 1.0.0
40
+ */
41
+ import * as zod from "zod";
42
+ export const mediaUsageDetailsInputVideoSecondsMin = 0;
43
+ export const mediaUsageDetailsOutputVideoSecondsMin = 0;
44
+ export const mediaUsageDetailsInputAudioSecondsMin = 0;
45
+ export const mediaUsageDetailsInputImageQuantityRegExp = new RegExp("^[0-9]+$");
46
+ export const mediaUsageDetailsInputImagesMin = 0;
47
+ export const mediaUsageDetailsOutputImagesMin = 0;
48
+ export const mediaUsageDetailsVideoQuantityRegExp = new RegExp("^[0-9]+([.][0-9]+)?$");
49
+ export const mediaUsageDetailsReferenceCountsMinOne = 0;
50
+ export const MediaUsageDetails = zod
51
+ .strictObject({
52
+ input_video_seconds: zod.number().min(mediaUsageDetailsInputVideoSecondsMin).optional(),
53
+ output_video_seconds: zod.number().min(mediaUsageDetailsOutputVideoSecondsMin).optional(),
54
+ input_audio_seconds: zod.number().min(mediaUsageDetailsInputAudioSecondsMin).optional(),
55
+ input_image_quantity: zod
56
+ .string()
57
+ .regex(mediaUsageDetailsInputImageQuantityRegExp)
58
+ .optional()
59
+ .describe("Recorded input quantity for the input_images meter, independent of its Billing price. Absent when unmeasured or not separately metered."),
60
+ input_images: zod.int().min(mediaUsageDetailsInputImagesMin).optional(),
61
+ output_images: zod.int().min(mediaUsageDetailsOutputImagesMin).optional(),
62
+ video_quantity: zod.string().regex(mediaUsageDetailsVideoQuantityRegExp).optional(),
63
+ reference_counts: zod
64
+ .record(zod.string(), zod.int().min(mediaUsageDetailsReferenceCountsMinOne))
65
+ .optional(),
66
+ })
67
+ .describe("Per-request media measurements. Omitted values are unknown, not zero.\nReference counts are audit data, not an additional billable quantity.\nvideo_quantity is the exact decimal quantity for the existing video_seconds\nmeter; video_seconds in the summary remains a rounded compatibility counter.\nNo monetary price or refund is calculated by Canopy.");
@@ -83,6 +83,16 @@ export declare const RequestResource: zod.ZodObject<{
83
83
  quality: zod.ZodNullable<zod.ZodString>;
84
84
  resolution: zod.ZodNullable<zod.ZodString>;
85
85
  }, zod.z.core.$strict>, zod.ZodNull]>>;
86
+ media_details: zod.ZodOptional<zod.ZodObject<{
87
+ input_video_seconds: zod.ZodOptional<zod.ZodNumber>;
88
+ output_video_seconds: zod.ZodOptional<zod.ZodNumber>;
89
+ input_audio_seconds: zod.ZodOptional<zod.ZodNumber>;
90
+ input_image_quantity: zod.ZodOptional<zod.ZodString>;
91
+ input_images: zod.ZodOptional<zod.ZodInt>;
92
+ output_images: zod.ZodOptional<zod.ZodInt>;
93
+ video_quantity: zod.ZodOptional<zod.ZodString>;
94
+ reference_counts: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodInt>>;
95
+ }, zod.z.core.$strict>>;
86
96
  }, zod.z.core.$strict>;
87
97
  export type RequestResource = zod.input<typeof RequestResource>;
88
98
  export type RequestResourceOutput = zod.output<typeof RequestResource>;
@@ -40,6 +40,7 @@
40
40
  */
41
41
  import * as zod from "zod";
42
42
  import { MediaUsage } from "./mediaUsage.zod.js";
43
+ import { MediaUsageDetails } from "./mediaUsageDetails.zod.js";
43
44
  import { ReasoningDiagnostics } from "./reasoningDiagnostics.zod.js";
44
45
  export const requestResourceSourceMax = 64;
45
46
  export const RequestResource = zod.strictObject({
@@ -101,4 +102,5 @@ export const RequestResource = zod.strictObject({
101
102
  .union([MediaUsage, zod.null()])
102
103
  .optional()
103
104
  .describe("Media quantities and their rate dimensions. Null for a token-only request."),
105
+ media_details: MediaUsageDetails.optional(),
104
106
  });
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Canopy API
5
+ * Canopy model inference, API keys, model catalogue, service enablement and recorded usage.
6
+ *
7
+ * Project inference is served on this host in each provider's own protocol:
8
+ *
9
+ * - OpenAI: `/v1/chat/completions`, `/v1/responses` and `/v1/embeddings`; use
10
+ * `https://canopy.leaflow.cloud/v1` as the OpenAI SDK base URL.
11
+ * - Anthropic: `/v1/messages`; use `https://canopy.leaflow.cloud` as the Anthropic SDK base URL.
12
+ * - Gemini: `/v1beta/models/{model}:generateContent` and `:streamGenerateContent`.
13
+ *
14
+ * Canopy does not convert between protocols. A request is accepted only for a model whose
15
+ * `supported_endpoints` lists the endpoint it was sent to, and it is forwarded unchanged except for
16
+ * the model name and the credentials. Reasoning settings such as `reasoning_effort` are passed
17
+ * through as written; a model's `capabilities` lists the values its upstream accepts.
18
+ *
19
+ * Management operations use `/api/v1`. The management model catalogue names how each model is billed in Billing;
20
+ * `/v1/models` returns the OpenAI model format with Canopy capabilities and parameter limits.
21
+ *
22
+ * ## Authentication
23
+ *
24
+ * Every request carries a scoped token; see the `bearerAuth` security scheme.
25
+ *
26
+ * Management and project inference accept the same verified IAM scoped token. The token is the
27
+ * sole billing project authority; `OpenAI-Project` and historical identity headers cannot
28
+ * override it. These endpoints do not accept a Canopy API key. The separate API-key gateway
29
+ * accepts Canopy API keys and serves the same endpoints.
30
+ *
31
+ * ## Conventions
32
+ *
33
+ * - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
34
+ * - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
35
+ * - **A usage query must carry a time range**, spanning no more than 31 days, or 400 days for the usage timeline. `from` and `to` carry a timezone offset, which the server does not infer.
36
+ * - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
37
+ * - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
38
+ * - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates Billing holds for each model's `billing`.
39
+ * OpenAPI spec version: 1.0.0
40
+ */
41
+ import * as zod from "zod";
42
+ export declare const videoCreateRequestReferenceMediaMax = 20;
43
+ export declare const VideoCreateRequest: zod.ZodObject<{
44
+ model: zod.ZodString;
45
+ prompt: zod.ZodOptional<zod.ZodString>;
46
+ seconds: zod.ZodOptional<zod.ZodInt>;
47
+ size: zod.ZodOptional<zod.ZodString>;
48
+ resolution: zod.ZodOptional<zod.ZodString>;
49
+ input_reference: zod.ZodOptional<zod.ZodString>;
50
+ reference_media: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
51
+ type: zod.ZodEnum<{
52
+ first_frame: "first_frame";
53
+ last_frame: "last_frame";
54
+ reference_image: "reference_image";
55
+ reference_video: "reference_video";
56
+ reference_audio: "reference_audio";
57
+ }>;
58
+ url: zod.ZodString;
59
+ }, zod.z.core.$strict>>>;
60
+ audio: zod.ZodOptional<zod.ZodBoolean>;
61
+ prompt_extend: zod.ZodOptional<zod.ZodBoolean>;
62
+ watermark: zod.ZodOptional<zod.ZodBoolean>;
63
+ seed: zod.ZodOptional<zod.ZodInt>;
64
+ negative_prompt: zod.ZodOptional<zod.ZodString>;
65
+ }, zod.z.core.$strict>;
66
+ export type VideoCreateRequest = zod.input<typeof VideoCreateRequest>;
67
+ export type VideoCreateRequestOutput = zod.output<typeof VideoCreateRequest>;