@leaflow/sdk 0.211.0 → 0.212.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/canopy/v1/generated/functions.d.ts +19 -50
  2. package/dist/canopy/v1/generated/functions.js +4 -34
  3. package/dist/canopy/v1/generated/models.d.ts +38 -64
  4. package/dist/canopy/v1/generated/models.js +0 -26
  5. package/dist/canopy/v1/generated/schemas.zod.d.ts +18 -21
  6. package/dist/canopy/v1/generated/schemas.zod.js +18 -21
  7. package/dist/canopy/v1/generated/validators/aPIKeyResource.zod.d.ts +14 -5
  8. package/dist/canopy/v1/generated/validators/aPIKeyResource.zod.js +14 -5
  9. package/dist/canopy/v1/generated/validators/aPIKeyUsageListResponseBody.zod.d.ts +14 -5
  10. package/dist/canopy/v1/generated/validators/aPIKeyUsageListResponseBody.zod.js +14 -5
  11. package/dist/canopy/v1/generated/validators/aPIKeyUsageResource.zod.d.ts +14 -5
  12. package/dist/canopy/v1/generated/validators/aPIKeyUsageResource.zod.js +14 -5
  13. package/dist/canopy/v1/generated/validators/audioCapabilities.zod.d.ts +14 -5
  14. package/dist/canopy/v1/generated/validators/audioCapabilities.zod.js +18 -9
  15. package/dist/canopy/v1/generated/validators/chatCompletion.zod.d.ts +14 -5
  16. package/dist/canopy/v1/generated/validators/chatCompletion.zod.js +14 -5
  17. package/dist/canopy/v1/generated/validators/chatCompletionRequest.zod.d.ts +14 -5
  18. package/dist/canopy/v1/generated/validators/chatCompletionRequest.zod.js +14 -5
  19. package/dist/canopy/v1/generated/validators/checkoutMode.zod.d.ts +14 -5
  20. package/dist/canopy/v1/generated/validators/checkoutMode.zod.js +14 -5
  21. package/dist/canopy/v1/generated/validators/checkoutOptions.zod.d.ts +14 -5
  22. package/dist/canopy/v1/generated/validators/checkoutOptions.zod.js +14 -5
  23. package/dist/canopy/v1/generated/validators/createAPIKeyRequestBody.zod.d.ts +14 -5
  24. package/dist/canopy/v1/generated/validators/createAPIKeyRequestBody.zod.js +14 -5
  25. package/dist/canopy/v1/generated/validators/createServiceRequestBody.zod.d.ts +14 -5
  26. package/dist/canopy/v1/generated/validators/createServiceRequestBody.zod.js +14 -5
  27. package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.d.ts +14 -5
  28. package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.js +14 -5
  29. package/dist/canopy/v1/generated/validators/cursorPageRequestResource.zod.d.ts +14 -5
  30. package/dist/canopy/v1/generated/validators/cursorPageRequestResource.zod.js +14 -5
  31. package/dist/canopy/v1/generated/validators/cursorPagination.zod.d.ts +14 -5
  32. package/dist/canopy/v1/generated/validators/cursorPagination.zod.js +14 -5
  33. package/dist/canopy/v1/generated/validators/embeddingRequest.zod.d.ts +14 -5
  34. package/dist/canopy/v1/generated/validators/embeddingRequest.zod.js +14 -5
  35. package/dist/canopy/v1/generated/validators/embeddingResponse.zod.d.ts +14 -5
  36. package/dist/canopy/v1/generated/validators/embeddingResponse.zod.js +14 -5
  37. package/dist/canopy/v1/generated/validators/error.zod.d.ts +14 -5
  38. package/dist/canopy/v1/generated/validators/error.zod.js +14 -5
  39. package/dist/canopy/v1/generated/validators/errorStatus.zod.d.ts +14 -5
  40. package/dist/canopy/v1/generated/validators/errorStatus.zod.js +14 -5
  41. package/dist/canopy/v1/generated/validators/fieldViolation.zod.d.ts +14 -5
  42. package/dist/canopy/v1/generated/validators/fieldViolation.zod.js +14 -5
  43. package/dist/canopy/v1/generated/validators/getUsageSummaryParams.zod.d.ts +14 -5
  44. package/dist/canopy/v1/generated/validators/getUsageSummaryParams.zod.js +14 -5
  45. package/dist/canopy/v1/generated/validators/getUsageTimelineParams.zod.d.ts +14 -5
  46. package/dist/canopy/v1/generated/validators/getUsageTimelineParams.zod.js +14 -5
  47. package/dist/canopy/v1/generated/validators/getVideoContentHeaders.zod.d.ts +14 -5
  48. package/dist/canopy/v1/generated/validators/getVideoContentHeaders.zod.js +14 -5
  49. package/dist/canopy/v1/generated/validators/imageCapabilities.zod.d.ts +14 -5
  50. package/dist/canopy/v1/generated/validators/imageCapabilities.zod.js +16 -7
  51. package/dist/canopy/v1/generated/validators/inferenceError.zod.d.ts +14 -5
  52. package/dist/canopy/v1/generated/validators/inferenceError.zod.js +14 -5
  53. package/dist/canopy/v1/generated/validators/issuedAPIKeyResource.zod.d.ts +14 -5
  54. package/dist/canopy/v1/generated/validators/issuedAPIKeyResource.zod.js +14 -5
  55. package/dist/canopy/v1/generated/validators/lengthAwarePageAPIKeyResource.zod.d.ts +14 -5
  56. package/dist/canopy/v1/generated/validators/lengthAwarePageAPIKeyResource.zod.js +14 -5
  57. package/dist/canopy/v1/generated/validators/listApiKeysParams.zod.d.ts +14 -5
  58. package/dist/canopy/v1/generated/validators/listApiKeysParams.zod.js +14 -5
  59. package/dist/canopy/v1/generated/validators/listRequestsParams.zod.d.ts +14 -5
  60. package/dist/canopy/v1/generated/validators/listRequestsParams.zod.js +14 -5
  61. package/dist/canopy/v1/generated/validators/listUsageByApiKeyParams.zod.d.ts +14 -5
  62. package/dist/canopy/v1/generated/validators/listUsageByApiKeyParams.zod.js +14 -5
  63. package/dist/canopy/v1/generated/validators/listUsageByModelParams.zod.d.ts +14 -5
  64. package/dist/canopy/v1/generated/validators/listUsageByModelParams.zod.js +14 -5
  65. package/dist/canopy/v1/generated/validators/mediaUsage.zod.d.ts +14 -5
  66. package/dist/canopy/v1/generated/validators/mediaUsage.zod.js +14 -5
  67. package/dist/canopy/v1/generated/validators/mediaUsageDetails.zod.d.ts +14 -5
  68. package/dist/canopy/v1/generated/validators/mediaUsageDetails.zod.js +14 -5
  69. package/dist/canopy/v1/generated/validators/modality.zod.d.ts +14 -5
  70. package/dist/canopy/v1/generated/validators/modality.zod.js +14 -5
  71. package/dist/canopy/v1/generated/validators/model.zod.d.ts +16 -33
  72. package/dist/canopy/v1/generated/validators/model.zod.js +14 -9
  73. package/dist/canopy/v1/generated/validators/modelBilling.zod.d.ts +14 -5
  74. package/dist/canopy/v1/generated/validators/modelBilling.zod.js +14 -5
  75. package/dist/canopy/v1/generated/validators/modelCapabilities.zod.d.ts +16 -7
  76. package/dist/canopy/v1/generated/validators/modelCapabilities.zod.js +41 -8
  77. package/dist/canopy/v1/generated/validators/modelList.zod.d.ts +16 -33
  78. package/dist/canopy/v1/generated/validators/modelList.zod.js +14 -5
  79. package/dist/canopy/v1/generated/validators/modelListResponseBody.zod.d.ts +16 -33
  80. package/dist/canopy/v1/generated/validators/modelListResponseBody.zod.js +14 -5
  81. package/dist/canopy/v1/generated/validators/modelMeter.zod.d.ts +14 -5
  82. package/dist/canopy/v1/generated/validators/modelMeter.zod.js +14 -5
  83. package/dist/canopy/v1/generated/validators/modelParameter.zod.d.ts +14 -5
  84. package/dist/canopy/v1/generated/validators/modelParameter.zod.js +15 -6
  85. package/dist/canopy/v1/generated/validators/modelResource.zod.d.ts +16 -33
  86. package/dist/canopy/v1/generated/validators/modelResource.zod.js +14 -9
  87. package/dist/canopy/v1/generated/validators/modelUsageListResponseBody.zod.d.ts +14 -5
  88. package/dist/canopy/v1/generated/validators/modelUsageListResponseBody.zod.js +14 -5
  89. package/dist/canopy/v1/generated/validators/modelUsageResource.zod.d.ts +14 -5
  90. package/dist/canopy/v1/generated/validators/modelUsageResource.zod.js +14 -5
  91. package/dist/canopy/v1/generated/validators/money.zod.d.ts +14 -5
  92. package/dist/canopy/v1/generated/validators/money.zod.js +14 -5
  93. package/dist/canopy/v1/generated/validators/nativeRequest.zod.d.ts +14 -5
  94. package/dist/canopy/v1/generated/validators/nativeRequest.zod.js +15 -6
  95. package/dist/canopy/v1/generated/validators/nativeResponse.zod.d.ts +14 -5
  96. package/dist/canopy/v1/generated/validators/nativeResponse.zod.js +15 -6
  97. package/dist/canopy/v1/generated/validators/offsetPagination.zod.d.ts +14 -5
  98. package/dist/canopy/v1/generated/validators/offsetPagination.zod.js +14 -5
  99. package/dist/canopy/v1/generated/validators/reasoningCapabilities.zod.d.ts +14 -5
  100. package/dist/canopy/v1/generated/validators/reasoningCapabilities.zod.js +14 -5
  101. package/dist/canopy/v1/generated/validators/reasoningDiagnostics.zod.d.ts +14 -5
  102. package/dist/canopy/v1/generated/validators/reasoningDiagnostics.zod.js +14 -5
  103. package/dist/canopy/v1/generated/validators/requestResource.zod.d.ts +14 -5
  104. package/dist/canopy/v1/generated/validators/requestResource.zod.js +14 -5
  105. package/dist/canopy/v1/generated/validators/responseCreate.zod.d.ts +14 -5
  106. package/dist/canopy/v1/generated/validators/responseCreate.zod.js +23 -8
  107. package/dist/canopy/v1/generated/validators/responseResource.zod.d.ts +14 -5
  108. package/dist/canopy/v1/generated/validators/responseResource.zod.js +14 -5
  109. package/dist/canopy/v1/generated/validators/serviceResource.zod.d.ts +14 -5
  110. package/dist/canopy/v1/generated/validators/serviceResource.zod.js +14 -5
  111. package/dist/canopy/v1/generated/validators/streamGenerateContentParams.zod.d.ts +14 -5
  112. package/dist/canopy/v1/generated/validators/streamGenerateContentParams.zod.js +14 -5
  113. package/dist/canopy/v1/generated/validators/totalsResource.zod.d.ts +14 -5
  114. package/dist/canopy/v1/generated/validators/totalsResource.zod.js +14 -5
  115. package/dist/canopy/v1/generated/validators/updateAPIKeyRequestBody.zod.d.ts +14 -5
  116. package/dist/canopy/v1/generated/validators/updateAPIKeyRequestBody.zod.js +14 -5
  117. package/dist/canopy/v1/generated/validators/usageBucketResource.zod.d.ts +14 -5
  118. package/dist/canopy/v1/generated/validators/usageBucketResource.zod.js +14 -5
  119. package/dist/canopy/v1/generated/validators/usageTimelineResponseBody.zod.d.ts +14 -5
  120. package/dist/canopy/v1/generated/validators/usageTimelineResponseBody.zod.js +14 -5
  121. package/dist/canopy/v1/generated/validators/videoCapabilities.zod.d.ts +14 -5
  122. package/dist/canopy/v1/generated/validators/videoCapabilities.zod.js +15 -6
  123. package/dist/canopy/v1/generated/validators/videoCreateRequest.zod.d.ts +14 -5
  124. package/dist/canopy/v1/generated/validators/videoCreateRequest.zod.js +14 -5
  125. package/dist/canopy/v1/generated/validators/videoDurationRange.zod.d.ts +14 -5
  126. package/dist/canopy/v1/generated/validators/videoDurationRange.zod.js +14 -5
  127. package/dist/canopy/v1/generated/validators/videoReferenceMedia.zod.d.ts +14 -5
  128. package/dist/canopy/v1/generated/validators/videoReferenceMedia.zod.js +14 -5
  129. package/dist/canopy/v1/generated/validators/videoTask.zod.d.ts +14 -5
  130. package/dist/canopy/v1/generated/validators/videoTask.zod.js +14 -5
  131. package/dist/canopy/v1/generated/validators/videoUsage.zod.d.ts +14 -5
  132. package/dist/canopy/v1/generated/validators/videoUsage.zod.js +14 -5
  133. package/dist/routes.d.ts +0 -16
  134. package/dist/routes.js +0 -18
  135. package/package.json +1 -1
  136. package/dist/canopy/v1/generated/validators/endpointCapabilities.zod.d.ts +0 -100
  137. package/dist/canopy/v1/generated/validators/endpointCapabilities.zod.js +0 -67
  138. package/dist/canopy/v1/generated/validators/modelEndpoint.zod.d.ts +0 -69
  139. package/dist/canopy/v1/generated/validators/modelEndpoint.zod.js +0 -67
  140. package/dist/canopy/v1/generated/validators/responseDeleted.zod.d.ts +0 -48
  141. package/dist/canopy/v1/generated/validators/responseDeleted.zod.js +0 -46
package/dist/routes.d.ts CHANGED
@@ -1695,22 +1695,6 @@ export declare const routes: readonly [{
1695
1695
  readonly operationId: "create-response";
1696
1696
  readonly securityScheme: "ScopedToken";
1697
1697
  readonly upstreamUrl: "https://canopy.leaflow.cloud";
1698
- }, {
1699
- readonly service: "canopy";
1700
- readonly contract: "canopy";
1701
- readonly method: "GET";
1702
- readonly path: "/v1/responses/{response}";
1703
- readonly operationId: "get-response";
1704
- readonly securityScheme: "ScopedToken";
1705
- readonly upstreamUrl: "https://canopy.leaflow.cloud";
1706
- }, {
1707
- readonly service: "canopy";
1708
- readonly contract: "canopy";
1709
- readonly method: "DELETE";
1710
- readonly path: "/v1/responses/{response}";
1711
- readonly operationId: "delete-response";
1712
- readonly securityScheme: "ScopedToken";
1713
- readonly upstreamUrl: "https://canopy.leaflow.cloud";
1714
1698
  }, {
1715
1699
  readonly service: "canopy";
1716
1700
  readonly contract: "canopy";
package/dist/routes.js CHANGED
@@ -1909,24 +1909,6 @@ export const routes = [
1909
1909
  securityScheme: "ScopedToken",
1910
1910
  upstreamUrl: "https://canopy.leaflow.cloud",
1911
1911
  },
1912
- {
1913
- service: "canopy",
1914
- contract: "canopy",
1915
- method: "GET",
1916
- path: "/v1/responses/{response}",
1917
- operationId: "get-response",
1918
- securityScheme: "ScopedToken",
1919
- upstreamUrl: "https://canopy.leaflow.cloud",
1920
- },
1921
- {
1922
- service: "canopy",
1923
- contract: "canopy",
1924
- method: "DELETE",
1925
- path: "/v1/responses/{response}",
1926
- operationId: "delete-response",
1927
- securityScheme: "ScopedToken",
1928
- upstreamUrl: "https://canopy.leaflow.cloud",
1929
- },
1930
1912
  {
1931
1913
  service: "canopy",
1932
1914
  contract: "canopy",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.211.0",
3
+ "version": "0.212.0",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,100 +0,0 @@
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 EndpointCapabilities: zod.ZodObject<{
43
- function_calling: zod.ZodNullable<zod.ZodBoolean>;
44
- structured_output: zod.ZodNullable<zod.ZodBoolean>;
45
- reasoning: zod.ZodUnion<readonly [zod.ZodObject<{
46
- supported: zod.ZodBoolean;
47
- effort_levels: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
48
- default_effort: zod.ZodNullable<zod.ZodString>;
49
- modes: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
50
- budget_tokens: zod.ZodNullable<zod.ZodObject<{
51
- min: zod.ZodInt;
52
- max: zod.ZodInt;
53
- }, zod.z.core.$strict>>;
54
- summary: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
55
- }, zod.z.core.$strict>, zod.ZodNull]>;
56
- image: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
57
- sizes: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
58
- qualities: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
59
- response_formats: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
60
- max_n: zod.ZodNullable<zod.ZodInt>;
61
- supports_stream: zod.ZodNullable<zod.ZodBoolean>;
62
- }, zod.z.core.$strict>, zod.ZodNull]>>;
63
- audio: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
64
- voices: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
65
- formats: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
66
- response_formats: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
67
- max_input_bytes: zod.ZodNullable<zod.ZodInt>;
68
- supports_stream: zod.ZodNullable<zod.ZodBoolean>;
69
- }, zod.z.core.$strict>, zod.ZodNull]>>;
70
- video: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
71
- duration_range: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
72
- min: zod.ZodInt;
73
- max: zod.ZodInt;
74
- step: zod.ZodInt;
75
- }, zod.z.core.$strict>, zod.ZodNull]>>;
76
- seconds: zod.ZodNullable<zod.ZodArray<zod.ZodInt>>;
77
- sizes: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
78
- resolutions: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
79
- supports_input_reference: zod.ZodNullable<zod.ZodBoolean>;
80
- supports_remix: zod.ZodNullable<zod.ZodBoolean>;
81
- supports_characters: zod.ZodNullable<zod.ZodBoolean>;
82
- }, zod.z.core.$strict>, zod.ZodNull]>>;
83
- parameters: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
84
- name: zod.ZodString;
85
- description: zod.ZodString;
86
- type: zod.ZodEnum<{
87
- string: "string";
88
- number: "number";
89
- boolean: "boolean";
90
- object: "object";
91
- array: "array";
92
- integer: "integer";
93
- }>;
94
- required: zod.ZodBoolean;
95
- default: zod.ZodOptional<zod.ZodUnknown>;
96
- values: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodString>>>;
97
- }, zod.z.core.$strict>>>>;
98
- }, zod.z.core.$strict>;
99
- export type EndpointCapabilities = zod.input<typeof EndpointCapabilities>;
100
- export type EndpointCapabilitiesOutput = zod.output<typeof EndpointCapabilities>;
@@ -1,67 +0,0 @@
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
- import { AudioCapabilities } from "./audioCapabilities.zod.js";
43
- import { ImageCapabilities } from "./imageCapabilities.zod.js";
44
- import { ModelParameter } from "./modelParameter.zod.js";
45
- import { ReasoningCapabilities } from "./reasoningCapabilities.zod.js";
46
- import { VideoCapabilities } from "./videoCapabilities.zod.js";
47
- export const EndpointCapabilities = zod.strictObject({
48
- function_calling: zod.boolean().nullable(),
49
- structured_output: zod.boolean().nullable(),
50
- reasoning: zod.union([ReasoningCapabilities, zod.null()]),
51
- image: zod
52
- .union([ImageCapabilities, zod.null()])
53
- .optional()
54
- .describe("Present on image generation and edit endpoints. Null or absent elsewhere."),
55
- audio: zod
56
- .union([AudioCapabilities, zod.null()])
57
- .optional()
58
- .describe("Present on speech and transcription endpoints. Null or absent elsewhere."),
59
- video: zod
60
- .union([VideoCapabilities, zod.null()])
61
- .optional()
62
- .describe("Present on the videos endpoint. Null or absent elsewhere."),
63
- parameters: zod
64
- .array(ModelParameter)
65
- .nullish()
66
- .describe("Non-standard request fields this endpoint accepts, sent at the top level of the request body. Null or absent means none are declared."),
67
- });
@@ -1,69 +0,0 @@
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 ModelEndpoint: zod.ZodEnum<{
43
- "/v1/chat/completions": "/v1/chat/completions";
44
- "/v1/responses": "/v1/responses";
45
- "/v1/embeddings": "/v1/embeddings";
46
- "/v1/messages": "/v1/messages";
47
- "/v1beta/models/{model}:generateContent": "/v1beta/models/{model}:generateContent";
48
- "/v1/images/generations": "/v1/images/generations";
49
- "/v1/images/edits": "/v1/images/edits";
50
- "/v1/audio/transcriptions": "/v1/audio/transcriptions";
51
- "/v1/audio/translations": "/v1/audio/translations";
52
- "/v1/audio/speech": "/v1/audio/speech";
53
- "/v1/realtime": "/v1/realtime";
54
- "/v1/completions": "/v1/completions";
55
- "/v1/rerank": "/v1/rerank";
56
- "/v1/moderations": "/v1/moderations";
57
- "/v1/images/variations": "/v1/images/variations";
58
- "/v1/files": "/v1/files";
59
- "/v1/uploads": "/v1/uploads";
60
- "/v1/batches": "/v1/batches";
61
- "/v1/fine_tuning/jobs": "/v1/fine_tuning/jobs";
62
- "/v1/assistants": "/v1/assistants";
63
- "/v1/threads": "/v1/threads";
64
- "/v1/vector_stores": "/v1/vector_stores";
65
- "/v1/containers": "/v1/containers";
66
- "/v1/videos": "/v1/videos";
67
- }>;
68
- export type ModelEndpoint = zod.input<typeof ModelEndpoint>;
69
- export type ModelEndpointOutput = zod.output<typeof ModelEndpoint>;
@@ -1,67 +0,0 @@
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 ModelEndpoint = zod.enum([
43
- "/v1/chat/completions",
44
- "/v1/responses",
45
- "/v1/embeddings",
46
- "/v1/messages",
47
- "/v1beta/models/{model}:generateContent",
48
- "/v1/images/generations",
49
- "/v1/images/edits",
50
- "/v1/audio/transcriptions",
51
- "/v1/audio/translations",
52
- "/v1/audio/speech",
53
- "/v1/realtime",
54
- "/v1/completions",
55
- "/v1/rerank",
56
- "/v1/moderations",
57
- "/v1/images/variations",
58
- "/v1/files",
59
- "/v1/uploads",
60
- "/v1/batches",
61
- "/v1/fine_tuning/jobs",
62
- "/v1/assistants",
63
- "/v1/threads",
64
- "/v1/vector_stores",
65
- "/v1/containers",
66
- "/v1/videos",
67
- ]);
@@ -1,48 +0,0 @@
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 ResponseDeleted: zod.ZodObject<{
43
- id: zod.ZodString;
44
- object: zod.ZodString;
45
- deleted: zod.ZodBoolean;
46
- }, zod.z.core.$strict>;
47
- export type ResponseDeleted = zod.input<typeof ResponseDeleted>;
48
- export type ResponseDeletedOutput = zod.output<typeof ResponseDeleted>;
@@ -1,46 +0,0 @@
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 ResponseDeleted = zod.strictObject({
43
- id: zod.string(),
44
- object: zod.string(),
45
- deleted: zod.boolean(),
46
- });