hanzoai 8.5.621 → 8.5.640
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.
- package/README.md +64 -9
- package/dist/answer.js +20 -10
- package/dist/api/ai-api.d.ts +280 -14
- package/dist/api/ai-api.js +315 -29
- package/dist/api/auto-api.d.ts +64 -0
- package/dist/api/auto-api.js +77 -0
- package/dist/api/billing-api.d.ts +4 -4
- package/dist/api/billing-api.js +4 -4
- package/dist/api/git-api.d.ts +30 -0
- package/dist/api/git-api.js +59 -0
- package/dist/api/task-api.d.ts +55 -0
- package/dist/api/task-api.js +71 -0
- package/dist/client.d.ts +3 -2
- package/dist/client.js +4 -3
- package/dist/esm/answer.js +20 -10
- package/dist/esm/api/ai-api.d.ts +280 -14
- package/dist/esm/api/ai-api.js +315 -29
- package/dist/esm/api/auto-api.d.ts +64 -0
- package/dist/esm/api/auto-api.js +77 -0
- package/dist/esm/api/billing-api.d.ts +4 -4
- package/dist/esm/api/billing-api.js +4 -4
- package/dist/esm/api/git-api.d.ts +30 -0
- package/dist/esm/api/git-api.js +59 -0
- package/dist/esm/api/task-api.d.ts +55 -0
- package/dist/esm/api/task-api.js +71 -0
- package/dist/esm/client.d.ts +3 -2
- package/dist/esm/client.js +3 -2
- package/dist/esm/hanzo.d.ts +3 -0
- package/dist/esm/hanzo.js +6 -0
- package/dist/esm/models/agent-target-view.d.ts +6 -0
- package/dist/esm/models/ai-chat-in.d.ts +42 -0
- package/dist/esm/models/ai-chat.d.ts +37 -0
- package/dist/esm/models/ai-decide-in.d.ts +50 -0
- package/dist/esm/models/ai-decide-in.js +14 -0
- package/dist/esm/models/ai-decision-sides.d.ts +4 -5
- package/dist/esm/models/{ai-decision-sides-false.d.ts → ai-decision.d.ts} +15 -2
- package/dist/esm/models/ai-decision.js +14 -0
- package/dist/esm/models/ai-decisions-answer.d.ts +2 -3
- package/dist/esm/models/ai-decisions-choice.d.ts +4 -8
- package/dist/esm/models/ai-decisions-noul.d.ts +2 -3
- package/dist/esm/models/ai-decisions-request.d.ts +2 -3
- package/dist/esm/models/ai-decisions-score.d.ts +4 -5
- package/dist/esm/models/ai-model.d.ts +73 -0
- package/dist/esm/models/ai-model.js +14 -0
- package/dist/esm/models/{ai-decisions-choice-criteria-value.d.ts → ai-models.d.ts} +15 -2
- package/dist/esm/models/ai-models.js +14 -0
- package/dist/esm/models/ai-price.d.ts +48 -0
- package/dist/esm/models/ai-price.js +14 -0
- package/dist/esm/models/ai-receipt.d.ts +60 -0
- package/dist/esm/models/ai-receipt.js +14 -0
- package/dist/esm/models/ai-routing-reward-request.d.ts +54 -0
- package/dist/esm/models/ai-routing-reward-request.js +24 -0
- package/dist/esm/models/auto-automation-in.d.ts +6 -0
- package/dist/esm/models/auto-automation-patch.d.ts +6 -0
- package/dist/esm/models/auto-automation-run.d.ts +14 -1
- package/dist/esm/models/auto-automation.d.ts +6 -0
- package/dist/esm/models/auto-post-result.d.ts +36 -0
- package/dist/esm/models/auto-post-result.js +14 -0
- package/dist/esm/models/auto-review-in.d.ts +36 -0
- package/dist/esm/models/auto-review-in.js +14 -0
- package/dist/esm/models/git-workspace-view.d.ts +36 -0
- package/dist/esm/models/git-workspace-view.js +14 -0
- package/dist/esm/models/iam-user.d.ts +1 -1
- package/dist/esm/models/index.d.ts +14 -2
- package/dist/esm/models/index.js +14 -2
- package/dist/esm/models/provider-github-import-out.d.ts +6 -0
- package/dist/esm/models/provider-github-repo-item.d.ts +6 -0
- package/dist/esm/models/task-comment-list.d.ts +31 -0
- package/dist/esm/models/task-comment-list.js +14 -0
- package/dist/esm/models/task-comment.d.ts +42 -0
- package/dist/esm/models/task-comment.js +14 -0
- package/dist/esm/transport.d.ts +4 -0
- package/dist/esm/transport.js +188 -0
- package/dist/esm/usage.d.ts +98 -0
- package/dist/esm/usage.js +161 -0
- package/dist/hanzo.d.ts +3 -0
- package/dist/hanzo.js +16 -1
- package/dist/models/agent-target-view.d.ts +6 -0
- package/dist/models/ai-chat-in.d.ts +42 -0
- package/dist/models/ai-chat.d.ts +37 -0
- package/dist/models/ai-decide-in.d.ts +50 -0
- package/dist/models/ai-decide-in.js +15 -0
- package/dist/models/ai-decision-sides.d.ts +4 -5
- package/dist/models/{ai-decision-sides-false.d.ts → ai-decision.d.ts} +15 -2
- package/dist/models/ai-decision.js +15 -0
- package/dist/models/ai-decisions-answer.d.ts +2 -3
- package/dist/models/ai-decisions-choice.d.ts +4 -8
- package/dist/models/ai-decisions-noul.d.ts +2 -3
- package/dist/models/ai-decisions-request.d.ts +2 -3
- package/dist/models/ai-decisions-score.d.ts +4 -5
- package/dist/models/ai-model.d.ts +73 -0
- package/dist/models/ai-model.js +15 -0
- package/dist/models/{ai-decisions-choice-criteria-value.d.ts → ai-models.d.ts} +15 -2
- package/dist/models/ai-models.js +15 -0
- package/dist/models/ai-price.d.ts +48 -0
- package/dist/models/ai-price.js +15 -0
- package/dist/models/ai-receipt.d.ts +60 -0
- package/dist/models/ai-receipt.js +15 -0
- package/dist/models/ai-routing-reward-request.d.ts +54 -0
- package/dist/models/ai-routing-reward-request.js +27 -0
- package/dist/models/auto-automation-in.d.ts +6 -0
- package/dist/models/auto-automation-patch.d.ts +6 -0
- package/dist/models/auto-automation-run.d.ts +14 -1
- package/dist/models/auto-automation.d.ts +6 -0
- package/dist/models/auto-post-result.d.ts +36 -0
- package/dist/models/auto-post-result.js +15 -0
- package/dist/models/auto-review-in.d.ts +36 -0
- package/dist/models/auto-review-in.js +15 -0
- package/dist/models/git-workspace-view.d.ts +36 -0
- package/dist/models/git-workspace-view.js +15 -0
- package/dist/models/iam-user.d.ts +1 -1
- package/dist/models/index.d.ts +14 -2
- package/dist/models/index.js +14 -2
- package/dist/models/provider-github-import-out.d.ts +6 -0
- package/dist/models/provider-github-repo-item.d.ts +6 -0
- package/dist/models/task-comment-list.d.ts +31 -0
- package/dist/models/task-comment-list.js +15 -0
- package/dist/models/task-comment.d.ts +42 -0
- package/dist/models/task-comment.js +15 -0
- package/dist/transport.d.ts +4 -0
- package/dist/transport.js +195 -0
- package/dist/usage.d.ts +98 -0
- package/dist/usage.js +174 -0
- package/package.json +1 -1
- package/src/answer.ts +23 -10
- package/src/api/ai-api.ts +503 -29
- package/src/api/auto-api.ts +117 -0
- package/src/api/billing-api.ts +4 -4
- package/src/api/git-api.ts +68 -0
- package/src/api/task-api.ts +101 -0
- package/src/client.ts +3 -2
- package/src/hanzo.ts +18 -0
- package/src/models/agent-target-view.ts +6 -0
- package/src/models/ai-chat-in.ts +48 -0
- package/src/models/ai-chat.ts +45 -0
- package/src/models/ai-decide-in.ts +54 -0
- package/src/models/ai-decision-sides.ts +4 -7
- package/src/models/{ai-decision-sides-false.ts → ai-decision.ts} +17 -2
- package/src/models/ai-decisions-answer.ts +2 -5
- package/src/models/ai-decisions-choice.ts +4 -10
- package/src/models/ai-decisions-noul.ts +2 -5
- package/src/models/ai-decisions-question.ts +0 -3
- package/src/models/ai-decisions-request.ts +2 -5
- package/src/models/ai-decisions-score.ts +4 -7
- package/src/models/ai-model.ts +81 -0
- package/src/models/{ai-decisions-choice-criteria-value.ts → ai-models.ts} +17 -2
- package/src/models/ai-price.ts +54 -0
- package/src/models/ai-receipt.ts +66 -0
- package/src/models/ai-routing-reward-request.ts +63 -0
- package/src/models/auto-automation-in.ts +6 -0
- package/src/models/auto-automation-patch.ts +6 -0
- package/src/models/auto-automation-run.ts +16 -1
- package/src/models/auto-automation.ts +6 -0
- package/src/models/auto-post-result.ts +42 -0
- package/src/models/auto-review-in.ts +42 -0
- package/src/models/git-workspace-view.ts +42 -0
- package/src/models/iam-user.ts +1 -1
- package/src/models/index.ts +14 -2
- package/src/models/provider-github-import-out.ts +6 -0
- package/src/models/provider-github-repo-item.ts +6 -0
- package/src/models/task-comment-list.ts +39 -0
- package/src/models/task-comment.ts +48 -0
- package/src/transport.ts +190 -0
- package/src/usage.ts +203 -0
- /package/dist/esm/models/{ai-decision-sides-false.js → ai-chat-in.js} +0 -0
- /package/dist/esm/models/{ai-decisions-choice-criteria-value.js → ai-chat.js} +0 -0
- /package/dist/models/{ai-decision-sides-false.js → ai-chat-in.js} +0 -0
- /package/dist/models/{ai-decisions-choice-criteria-value.js → ai-chat.js} +0 -0
package/dist/api/ai-api.d.ts
CHANGED
|
@@ -15,16 +15,22 @@ import globalAxios from 'axios';
|
|
|
15
15
|
import { type RequestArgs, BaseAPI } from '../base';
|
|
16
16
|
import type { AiAnthropicRequest } from '../models';
|
|
17
17
|
import type { AiAnthropicResponse } from '../models';
|
|
18
|
+
import type { AiChat } from '../models';
|
|
19
|
+
import type { AiChatIn } from '../models';
|
|
20
|
+
import type { AiDecideIn } from '../models';
|
|
21
|
+
import type { AiDecision } from '../models';
|
|
18
22
|
import type { AiDecisionsRequest } from '../models';
|
|
19
23
|
import type { AiDecisionsResponse } from '../models';
|
|
20
24
|
import type { AiLimits } from '../models';
|
|
21
25
|
import type { AiLimitsSet } from '../models';
|
|
22
26
|
import type { AiMCPSurface } from '../models';
|
|
23
27
|
import type { AiModelList } from '../models';
|
|
28
|
+
import type { AiModels } from '../models';
|
|
24
29
|
import type { AiRanking } from '../models';
|
|
25
30
|
import type { AiResponse } from '../models';
|
|
26
31
|
import type { AiResponsesResource } from '../models';
|
|
27
32
|
import type { AiRoutingEdit } from '../models';
|
|
33
|
+
import type { AiRoutingRewardRequest } from '../models';
|
|
28
34
|
import type { AiTokenCount } from '../models';
|
|
29
35
|
import type { AiVideoStatus } from '../models';
|
|
30
36
|
import type { DocSearchResult } from '../models';
|
|
@@ -114,6 +120,22 @@ import type { PutAiRouterCatalog200Response } from '../models';
|
|
|
114
120
|
* @export
|
|
115
121
|
*/
|
|
116
122
|
export declare const AiApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
123
|
+
/**
|
|
124
|
+
* Asks one model one prompt and answers the reply, which model served it and who paid. The call is the caller\'s own POST /v1/chat/completions, run as the caller, so it is gated, billed and refused exactly as that route is; a refusal names its code and what lifts it, never an amount. An empty model asks the deployment\'s default Hanzo model.
|
|
125
|
+
* @summary Asks one model one prompt and answers the reply, which model served it and who paid.
|
|
126
|
+
* @param {AiChatIn} aiChatIn
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
*/
|
|
130
|
+
aiChat: (aiChatIn: AiChatIn, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
131
|
+
/**
|
|
132
|
+
* Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid. A refusal names its code and what lifts it, never an amount.
|
|
133
|
+
* @summary Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid.
|
|
134
|
+
* @param {AiDecideIn} aiDecideIn
|
|
135
|
+
* @param {*} [options] Override http request option.
|
|
136
|
+
* @throws {RequiredError}
|
|
137
|
+
*/
|
|
138
|
+
aiDecide: (aiDecideIn: AiDecideIn, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
117
139
|
/**
|
|
118
140
|
* Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on. Shares only, never amounts.
|
|
119
141
|
* @summary Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on.
|
|
@@ -129,6 +151,18 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
129
151
|
* @throws {RequiredError}
|
|
130
152
|
*/
|
|
131
153
|
aiMCPTools: (names?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
154
|
+
/**
|
|
155
|
+
* Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
|
|
156
|
+
* @summary Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
|
|
157
|
+
* @param {string} [q] Q matches the model\'s id, name, description or owner, ignoring case.
|
|
158
|
+
* @param {string} [_class] Class keeps one class: premium (third-party frontier models), ours (Hanzo\'s priced models) or free.
|
|
159
|
+
* @param {string} [family] Family keeps one Hanzo family: enso, zen, kai or zoo.
|
|
160
|
+
* @param {string} [capability] Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).
|
|
161
|
+
* @param {number} [limit] Limit is the most models to answer, 1 to 500; 0 answers 50.
|
|
162
|
+
* @param {*} [options] Override http request option.
|
|
163
|
+
* @throws {RequiredError}
|
|
164
|
+
*/
|
|
165
|
+
aiModels: (q?: string, _class?: string, family?: string, capability?: string, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
132
166
|
/**
|
|
133
167
|
* Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent. A pooled org wallet is its org admin\'s to set; a person\'s own wallet is theirs. Every change is on the audit trail, before and after; no trail, no change. Answers the limits as they read after it.
|
|
134
168
|
* @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
|
|
@@ -1688,10 +1722,11 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
1688
1722
|
/**
|
|
1689
1723
|
* Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal. Org-scoped via the same session-OR-Bearer principal the usage read uses (RequirePrincipal): the reward lands only on the caller\'s OWN org\'s event, so a request_id from another org (or unknown) is a 404 — cross-org writes are impossible and unknown ids are indistinguishable from foreign ones. Idempotent: a repeat overwrites. The body carries NO prompt text — only {request_id, reward|rating}.
|
|
1690
1724
|
* @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
|
|
1725
|
+
* @param {AiRoutingRewardRequest} aiRoutingRewardRequest
|
|
1691
1726
|
* @param {*} [options] Override http request option.
|
|
1692
1727
|
* @throws {RequiredError}
|
|
1693
1728
|
*/
|
|
1694
|
-
postAiFeedback: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1729
|
+
postAiFeedback: (aiRoutingRewardRequest: AiRoutingRewardRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1695
1730
|
/**
|
|
1696
1731
|
* Create one file.
|
|
1697
1732
|
* @summary Create a file
|
|
@@ -2197,18 +2232,22 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
2197
2232
|
* Implements the OpenAI-compatible chat completions API
|
|
2198
2233
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
2199
2234
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
2235
|
+
* @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
2236
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
2200
2237
|
* @param {*} [options] Override http request option.
|
|
2201
2238
|
* @throws {RequiredError}
|
|
2202
2239
|
*/
|
|
2203
|
-
postChat: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2240
|
+
postChat: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2204
2241
|
/**
|
|
2205
2242
|
* Implements the OpenAI-compatible chat completions API
|
|
2206
2243
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
2207
2244
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
2245
|
+
* @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
2246
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
2208
2247
|
* @param {*} [options] Override http request option.
|
|
2209
2248
|
* @throws {RequiredError}
|
|
2210
2249
|
*/
|
|
2211
|
-
postChatCompletions: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2250
|
+
postChatCompletions: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2212
2251
|
/**
|
|
2213
2252
|
* Serves one completion to a caller with no account.
|
|
2214
2253
|
* @summary Serves one completion to a caller with no account.
|
|
@@ -2221,10 +2260,12 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
2221
2260
|
* Implements the OpenAI-compatible chat completions API
|
|
2222
2261
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
2223
2262
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
2263
|
+
* @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
2264
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
2224
2265
|
* @param {*} [options] Override http request option.
|
|
2225
2266
|
* @throws {RequiredError}
|
|
2226
2267
|
*/
|
|
2227
|
-
postCompletions: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2268
|
+
postCompletions: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2228
2269
|
/**
|
|
2229
2270
|
* Implements POST /v1/decisions (the Decisions API). Body: {\"model\": \"kai\", \"state\": \"...\"|{...}|[...], \"questions\": {\"<name>\": {\"type\": \"choice\"|\"noul\"|\"score\", \"instructions\": ..., \"criteria\": ...}}}. model is kai, Kai\'s versioned id kai-<12 hex of the weights\' sha256> — priced as kai and sent as asked — or Jev by OpenRouter\'s vendor ids, typesafe/jev-1.13 and ~typesafe/jev-latest, which reach Jev itself and bill at Jev\'s list price. No Jev id is ever answered by Kai: a bare one, such as jev-latest, is an unknown model. model is required; state and questions are required unless the request names a handle, which carries neither. instructions is optional and any JSON. A choice names at least 2 labels and a score at least 1 level, bounded by the token budget rather than a count; questions holds 1 to 100. observe holds the state under an id, and a later request naming that id as its handle decides over it again. An id is 1 to 128 characters of A-Z, a-z, 0-9, \'.\', \'_\' and \'-\'. A handle belongs to the org that observed it: no other org\'s request can name it. Response: {\"id\",\"model\",\"provider\",\"answers\":{\"<name>\":{\"type\",...}}, \"usage\":{\"input_tokens\",\"output_tokens\"},\"routing\",\"state_hash\",\"latency_ms\"}. usage.input_tokens is the billed count — the request\'s text counted once, the state once and each question\'s instructions and options once; a decision over a handle bills the state once, when it was observed. The body may be sent gzip, deflate, br or zstd encoded; decoded, it is bounded as sent. Refusals are {\"error\":{\"code\",\"message\"}}: 400 malformed JSON or unknown model, 401 no valid credential, 402 insufficient balance, 403 a key kind that may not call this (pk-), 415 any other Content-Encoding, 422 an invalid question or handle id, a state beyond the checkpoint\'s reach (code state_too_long) or a body past 16 MiB (code request_too_long), 429 rate limited or queue full, 502 the service failed, 503 the model is known and not served, 529 overloaded. 402, 429 and 529 carry Retry-After and Retry-After-Ms, and every answer carries X-Request-Id. Billed on the answer\'s input tokens at the model\'s price.
|
|
2230
2271
|
* @summary Implements POST /v1/decisions (the Decisions API).
|
|
@@ -2281,10 +2322,12 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
2281
2322
|
/**
|
|
2282
2323
|
* Implements POST /v1/responses. The converted request is completed by the chat path, which is handed a sink saying where the answer goes: a stream is translated as it is produced, a whole body is translated entire.
|
|
2283
2324
|
* @summary Implements POST /v1/responses.
|
|
2325
|
+
* @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
2326
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
2284
2327
|
* @param {*} [options] Override http request option.
|
|
2285
2328
|
* @throws {RequiredError}
|
|
2286
2329
|
*/
|
|
2287
|
-
postResponses: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2330
|
+
postResponses: (xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2288
2331
|
/**
|
|
2289
2332
|
* Implements POST /v1/videos/generations — the ASYNC create. Body: {\"model\": \"...\", \"prompt\": \"...\", \"size\"?: \"1280x720\", \"seconds\"?: int} It authenticates the caller, resolves the model to its upstream provider via the shared routing table (zen3-video* / wan2-2-t2v-a14b → the spark-video backend), reserves the per-video budget (the balance gate), creates ONE upstream job, registers it in the in-pod store, and returns the OpenAI-shaped video object with status \"queued\" IMMEDIATELY. The client then polls GET /v1/videos/{id} and downloads GET /v1/videos/{id}/content. Nothing is billed here — the debit lands on completion.
|
|
2290
2333
|
* @summary Implements POST /v1/videos/generations — the ASYNC create.
|
|
@@ -2601,6 +2644,22 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
2601
2644
|
* @export
|
|
2602
2645
|
*/
|
|
2603
2646
|
export declare const AiApiFp: (configuration?: Configuration) => {
|
|
2647
|
+
/**
|
|
2648
|
+
* Asks one model one prompt and answers the reply, which model served it and who paid. The call is the caller\'s own POST /v1/chat/completions, run as the caller, so it is gated, billed and refused exactly as that route is; a refusal names its code and what lifts it, never an amount. An empty model asks the deployment\'s default Hanzo model.
|
|
2649
|
+
* @summary Asks one model one prompt and answers the reply, which model served it and who paid.
|
|
2650
|
+
* @param {AiChatIn} aiChatIn
|
|
2651
|
+
* @param {*} [options] Override http request option.
|
|
2652
|
+
* @throws {RequiredError}
|
|
2653
|
+
*/
|
|
2654
|
+
aiChat(aiChatIn: AiChatIn, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiChat>>;
|
|
2655
|
+
/**
|
|
2656
|
+
* Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid. A refusal names its code and what lifts it, never an amount.
|
|
2657
|
+
* @summary Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid.
|
|
2658
|
+
* @param {AiDecideIn} aiDecideIn
|
|
2659
|
+
* @param {*} [options] Override http request option.
|
|
2660
|
+
* @throws {RequiredError}
|
|
2661
|
+
*/
|
|
2662
|
+
aiDecide(aiDecideIn: AiDecideIn, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiDecision>>;
|
|
2604
2663
|
/**
|
|
2605
2664
|
* Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on. Shares only, never amounts.
|
|
2606
2665
|
* @summary Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on.
|
|
@@ -2616,6 +2675,18 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
2616
2675
|
* @throws {RequiredError}
|
|
2617
2676
|
*/
|
|
2618
2677
|
aiMCPTools(names?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiMCPSurface>>;
|
|
2678
|
+
/**
|
|
2679
|
+
* Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
|
|
2680
|
+
* @summary Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
|
|
2681
|
+
* @param {string} [q] Q matches the model\'s id, name, description or owner, ignoring case.
|
|
2682
|
+
* @param {string} [_class] Class keeps one class: premium (third-party frontier models), ours (Hanzo\'s priced models) or free.
|
|
2683
|
+
* @param {string} [family] Family keeps one Hanzo family: enso, zen, kai or zoo.
|
|
2684
|
+
* @param {string} [capability] Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).
|
|
2685
|
+
* @param {number} [limit] Limit is the most models to answer, 1 to 500; 0 answers 50.
|
|
2686
|
+
* @param {*} [options] Override http request option.
|
|
2687
|
+
* @throws {RequiredError}
|
|
2688
|
+
*/
|
|
2689
|
+
aiModels(q?: string, _class?: string, family?: string, capability?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiModels>>;
|
|
2619
2690
|
/**
|
|
2620
2691
|
* Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent. A pooled org wallet is its org admin\'s to set; a person\'s own wallet is theirs. Every change is on the audit trail, before and after; no trail, no change. Answers the limits as they read after it.
|
|
2621
2692
|
* @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
|
|
@@ -4175,10 +4246,11 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
4175
4246
|
/**
|
|
4176
4247
|
* Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal. Org-scoped via the same session-OR-Bearer principal the usage read uses (RequirePrincipal): the reward lands only on the caller\'s OWN org\'s event, so a request_id from another org (or unknown) is a 404 — cross-org writes are impossible and unknown ids are indistinguishable from foreign ones. Idempotent: a repeat overwrites. The body carries NO prompt text — only {request_id, reward|rating}.
|
|
4177
4248
|
* @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
|
|
4249
|
+
* @param {AiRoutingRewardRequest} aiRoutingRewardRequest
|
|
4178
4250
|
* @param {*} [options] Override http request option.
|
|
4179
4251
|
* @throws {RequiredError}
|
|
4180
4252
|
*/
|
|
4181
|
-
postAiFeedback(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostAiFeedback200Response>>;
|
|
4253
|
+
postAiFeedback(aiRoutingRewardRequest: AiRoutingRewardRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostAiFeedback200Response>>;
|
|
4182
4254
|
/**
|
|
4183
4255
|
* Create one file.
|
|
4184
4256
|
* @summary Create a file
|
|
@@ -4684,18 +4756,22 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
4684
4756
|
* Implements the OpenAI-compatible chat completions API
|
|
4685
4757
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
4686
4758
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
4759
|
+
* @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
4760
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
4687
4761
|
* @param {*} [options] Override http request option.
|
|
4688
4762
|
* @throws {RequiredError}
|
|
4689
4763
|
*/
|
|
4690
|
-
postChat(openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4764
|
+
postChat(openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4691
4765
|
/**
|
|
4692
4766
|
* Implements the OpenAI-compatible chat completions API
|
|
4693
4767
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
4694
4768
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
4769
|
+
* @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
4770
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
4695
4771
|
* @param {*} [options] Override http request option.
|
|
4696
4772
|
* @throws {RequiredError}
|
|
4697
4773
|
*/
|
|
4698
|
-
postChatCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4774
|
+
postChatCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4699
4775
|
/**
|
|
4700
4776
|
* Serves one completion to a caller with no account.
|
|
4701
4777
|
* @summary Serves one completion to a caller with no account.
|
|
@@ -4708,10 +4784,12 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
4708
4784
|
* Implements the OpenAI-compatible chat completions API
|
|
4709
4785
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
4710
4786
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
4787
|
+
* @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
4788
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
4711
4789
|
* @param {*} [options] Override http request option.
|
|
4712
4790
|
* @throws {RequiredError}
|
|
4713
4791
|
*/
|
|
4714
|
-
postCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4792
|
+
postCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4715
4793
|
/**
|
|
4716
4794
|
* Implements POST /v1/decisions (the Decisions API). Body: {\"model\": \"kai\", \"state\": \"...\"|{...}|[...], \"questions\": {\"<name>\": {\"type\": \"choice\"|\"noul\"|\"score\", \"instructions\": ..., \"criteria\": ...}}}. model is kai, Kai\'s versioned id kai-<12 hex of the weights\' sha256> — priced as kai and sent as asked — or Jev by OpenRouter\'s vendor ids, typesafe/jev-1.13 and ~typesafe/jev-latest, which reach Jev itself and bill at Jev\'s list price. No Jev id is ever answered by Kai: a bare one, such as jev-latest, is an unknown model. model is required; state and questions are required unless the request names a handle, which carries neither. instructions is optional and any JSON. A choice names at least 2 labels and a score at least 1 level, bounded by the token budget rather than a count; questions holds 1 to 100. observe holds the state under an id, and a later request naming that id as its handle decides over it again. An id is 1 to 128 characters of A-Z, a-z, 0-9, \'.\', \'_\' and \'-\'. A handle belongs to the org that observed it: no other org\'s request can name it. Response: {\"id\",\"model\",\"provider\",\"answers\":{\"<name>\":{\"type\",...}}, \"usage\":{\"input_tokens\",\"output_tokens\"},\"routing\",\"state_hash\",\"latency_ms\"}. usage.input_tokens is the billed count — the request\'s text counted once, the state once and each question\'s instructions and options once; a decision over a handle bills the state once, when it was observed. The body may be sent gzip, deflate, br or zstd encoded; decoded, it is bounded as sent. Refusals are {\"error\":{\"code\",\"message\"}}: 400 malformed JSON or unknown model, 401 no valid credential, 402 insufficient balance, 403 a key kind that may not call this (pk-), 415 any other Content-Encoding, 422 an invalid question or handle id, a state beyond the checkpoint\'s reach (code state_too_long) or a body past 16 MiB (code request_too_long), 429 rate limited or queue full, 502 the service failed, 503 the model is known and not served, 529 overloaded. 402, 429 and 529 carry Retry-After and Retry-After-Ms, and every answer carries X-Request-Id. Billed on the answer\'s input tokens at the model\'s price.
|
|
4717
4795
|
* @summary Implements POST /v1/decisions (the Decisions API).
|
|
@@ -4768,10 +4846,12 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
4768
4846
|
/**
|
|
4769
4847
|
* Implements POST /v1/responses. The converted request is completed by the chat path, which is handed a sink saying where the answer goes: a stream is translated as it is produced, a whole body is translated entire.
|
|
4770
4848
|
* @summary Implements POST /v1/responses.
|
|
4849
|
+
* @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
4850
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
4771
4851
|
* @param {*} [options] Override http request option.
|
|
4772
4852
|
* @throws {RequiredError}
|
|
4773
4853
|
*/
|
|
4774
|
-
postResponses(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiResponsesResource>>;
|
|
4854
|
+
postResponses(xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiResponsesResource>>;
|
|
4775
4855
|
/**
|
|
4776
4856
|
* Implements POST /v1/videos/generations — the ASYNC create. Body: {\"model\": \"...\", \"prompt\": \"...\", \"size\"?: \"1280x720\", \"seconds\"?: int} It authenticates the caller, resolves the model to its upstream provider via the shared routing table (zen3-video* / wan2-2-t2v-a14b → the spark-video backend), reserves the per-video budget (the balance gate), creates ONE upstream job, registers it in the in-pod store, and returns the OpenAI-shaped video object with status \"queued\" IMMEDIATELY. The client then polls GET /v1/videos/{id} and downloads GET /v1/videos/{id}/content. Nothing is billed here — the debit lands on completion.
|
|
4777
4857
|
* @summary Implements POST /v1/videos/generations — the ASYNC create.
|
|
@@ -5088,6 +5168,22 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
5088
5168
|
* @export
|
|
5089
5169
|
*/
|
|
5090
5170
|
export declare const AiApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
5171
|
+
/**
|
|
5172
|
+
* Asks one model one prompt and answers the reply, which model served it and who paid. The call is the caller\'s own POST /v1/chat/completions, run as the caller, so it is gated, billed and refused exactly as that route is; a refusal names its code and what lifts it, never an amount. An empty model asks the deployment\'s default Hanzo model.
|
|
5173
|
+
* @summary Asks one model one prompt and answers the reply, which model served it and who paid.
|
|
5174
|
+
* @param {AiApiAiChatRequest} requestParameters Request parameters.
|
|
5175
|
+
* @param {*} [options] Override http request option.
|
|
5176
|
+
* @throws {RequiredError}
|
|
5177
|
+
*/
|
|
5178
|
+
aiChat(requestParameters: AiApiAiChatRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiChat>;
|
|
5179
|
+
/**
|
|
5180
|
+
* Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid. A refusal names its code and what lifts it, never an amount.
|
|
5181
|
+
* @summary Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid.
|
|
5182
|
+
* @param {AiApiAiDecideRequest} requestParameters Request parameters.
|
|
5183
|
+
* @param {*} [options] Override http request option.
|
|
5184
|
+
* @throws {RequiredError}
|
|
5185
|
+
*/
|
|
5186
|
+
aiDecide(requestParameters: AiApiAiDecideRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiDecision>;
|
|
5091
5187
|
/**
|
|
5092
5188
|
* Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on. Shares only, never amounts.
|
|
5093
5189
|
* @summary Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on.
|
|
@@ -5103,6 +5199,14 @@ export declare const AiApiFactory: (configuration?: Configuration, basePath?: st
|
|
|
5103
5199
|
* @throws {RequiredError}
|
|
5104
5200
|
*/
|
|
5105
5201
|
aiMCPTools(requestParameters?: AiApiAiMCPToolsRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiMCPSurface>;
|
|
5202
|
+
/**
|
|
5203
|
+
* Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
|
|
5204
|
+
* @summary Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
|
|
5205
|
+
* @param {AiApiAiModelsRequest} requestParameters Request parameters.
|
|
5206
|
+
* @param {*} [options] Override http request option.
|
|
5207
|
+
* @throws {RequiredError}
|
|
5208
|
+
*/
|
|
5209
|
+
aiModels(requestParameters?: AiApiAiModelsRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiModels>;
|
|
5106
5210
|
/**
|
|
5107
5211
|
* Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent. A pooled org wallet is its org admin\'s to set; a person\'s own wallet is theirs. Every change is on the audit trail, before and after; no trail, no change. Answers the limits as they read after it.
|
|
5108
5212
|
* @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
|
|
@@ -6563,10 +6667,11 @@ export declare const AiApiFactory: (configuration?: Configuration, basePath?: st
|
|
|
6563
6667
|
/**
|
|
6564
6668
|
* Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal. Org-scoped via the same session-OR-Bearer principal the usage read uses (RequirePrincipal): the reward lands only on the caller\'s OWN org\'s event, so a request_id from another org (or unknown) is a 404 — cross-org writes are impossible and unknown ids are indistinguishable from foreign ones. Idempotent: a repeat overwrites. The body carries NO prompt text — only {request_id, reward|rating}.
|
|
6565
6669
|
* @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
|
|
6670
|
+
* @param {AiApiPostAiFeedbackRequest} requestParameters Request parameters.
|
|
6566
6671
|
* @param {*} [options] Override http request option.
|
|
6567
6672
|
* @throws {RequiredError}
|
|
6568
6673
|
*/
|
|
6569
|
-
postAiFeedback(options?: RawAxiosRequestConfig): AxiosPromise<PostAiFeedback200Response>;
|
|
6674
|
+
postAiFeedback(requestParameters: AiApiPostAiFeedbackRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostAiFeedback200Response>;
|
|
6570
6675
|
/**
|
|
6571
6676
|
* Create one file.
|
|
6572
6677
|
* @summary Create a file
|
|
@@ -7142,10 +7247,11 @@ export declare const AiApiFactory: (configuration?: Configuration, basePath?: st
|
|
|
7142
7247
|
/**
|
|
7143
7248
|
* Implements POST /v1/responses. The converted request is completed by the chat path, which is handed a sink saying where the answer goes: a stream is translated as it is produced, a whole body is translated entire.
|
|
7144
7249
|
* @summary Implements POST /v1/responses.
|
|
7250
|
+
* @param {AiApiPostResponsesRequest} requestParameters Request parameters.
|
|
7145
7251
|
* @param {*} [options] Override http request option.
|
|
7146
7252
|
* @throws {RequiredError}
|
|
7147
7253
|
*/
|
|
7148
|
-
postResponses(options?: RawAxiosRequestConfig): AxiosPromise<AiResponsesResource>;
|
|
7254
|
+
postResponses(requestParameters?: AiApiPostResponsesRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiResponsesResource>;
|
|
7149
7255
|
/**
|
|
7150
7256
|
* Implements POST /v1/videos/generations — the ASYNC create. Body: {\"model\": \"...\", \"prompt\": \"...\", \"size\"?: \"1280x720\", \"seconds\"?: int} It authenticates the caller, resolves the model to its upstream provider via the shared routing table (zen3-video* / wan2-2-t2v-a14b → the spark-video backend), reserves the per-video budget (the balance gate), creates ONE upstream job, registers it in the in-pod store, and returns the OpenAI-shaped video object with status \"queued\" IMMEDIATELY. The client then polls GET /v1/videos/{id} and downloads GET /v1/videos/{id}/content. Nothing is billed here — the debit lands on completion.
|
|
7151
7257
|
* @summary Implements POST /v1/videos/generations — the ASYNC create.
|
|
@@ -7411,6 +7517,32 @@ export declare const AiApiFactory: (configuration?: Configuration, basePath?: st
|
|
|
7411
7517
|
*/
|
|
7412
7518
|
putAiWorkflowsByOwnerByName(requestParameters: AiApiPutAiWorkflowsByOwnerByNameRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostAiWorkflows200Response>;
|
|
7413
7519
|
};
|
|
7520
|
+
/**
|
|
7521
|
+
* Request parameters for aiChat operation in AiApi.
|
|
7522
|
+
* @export
|
|
7523
|
+
* @interface AiApiAiChatRequest
|
|
7524
|
+
*/
|
|
7525
|
+
export interface AiApiAiChatRequest {
|
|
7526
|
+
/**
|
|
7527
|
+
*
|
|
7528
|
+
* @type {AiChatIn}
|
|
7529
|
+
* @memberof AiApiAiChat
|
|
7530
|
+
*/
|
|
7531
|
+
readonly aiChatIn: AiChatIn;
|
|
7532
|
+
}
|
|
7533
|
+
/**
|
|
7534
|
+
* Request parameters for aiDecide operation in AiApi.
|
|
7535
|
+
* @export
|
|
7536
|
+
* @interface AiApiAiDecideRequest
|
|
7537
|
+
*/
|
|
7538
|
+
export interface AiApiAiDecideRequest {
|
|
7539
|
+
/**
|
|
7540
|
+
*
|
|
7541
|
+
* @type {AiDecideIn}
|
|
7542
|
+
* @memberof AiApiAiDecide
|
|
7543
|
+
*/
|
|
7544
|
+
readonly aiDecideIn: AiDecideIn;
|
|
7545
|
+
}
|
|
7414
7546
|
/**
|
|
7415
7547
|
* Request parameters for aiMCPTools operation in AiApi.
|
|
7416
7548
|
* @export
|
|
@@ -7424,6 +7556,43 @@ export interface AiApiAiMCPToolsRequest {
|
|
|
7424
7556
|
*/
|
|
7425
7557
|
readonly names?: boolean;
|
|
7426
7558
|
}
|
|
7559
|
+
/**
|
|
7560
|
+
* Request parameters for aiModels operation in AiApi.
|
|
7561
|
+
* @export
|
|
7562
|
+
* @interface AiApiAiModelsRequest
|
|
7563
|
+
*/
|
|
7564
|
+
export interface AiApiAiModelsRequest {
|
|
7565
|
+
/**
|
|
7566
|
+
* Q matches the model\'s id, name, description or owner, ignoring case.
|
|
7567
|
+
* @type {string}
|
|
7568
|
+
* @memberof AiApiAiModels
|
|
7569
|
+
*/
|
|
7570
|
+
readonly q?: string;
|
|
7571
|
+
/**
|
|
7572
|
+
* Class keeps one class: premium (third-party frontier models), ours (Hanzo\'s priced models) or free.
|
|
7573
|
+
* @type {string}
|
|
7574
|
+
* @memberof AiApiAiModels
|
|
7575
|
+
*/
|
|
7576
|
+
readonly _class?: string;
|
|
7577
|
+
/**
|
|
7578
|
+
* Family keeps one Hanzo family: enso, zen, kai or zoo.
|
|
7579
|
+
* @type {string}
|
|
7580
|
+
* @memberof AiApiAiModels
|
|
7581
|
+
*/
|
|
7582
|
+
readonly family?: string;
|
|
7583
|
+
/**
|
|
7584
|
+
* Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).
|
|
7585
|
+
* @type {string}
|
|
7586
|
+
* @memberof AiApiAiModels
|
|
7587
|
+
*/
|
|
7588
|
+
readonly capability?: string;
|
|
7589
|
+
/**
|
|
7590
|
+
* Limit is the most models to answer, 1 to 500; 0 answers 50.
|
|
7591
|
+
* @type {number}
|
|
7592
|
+
* @memberof AiApiAiModels
|
|
7593
|
+
*/
|
|
7594
|
+
readonly limit?: number;
|
|
7595
|
+
}
|
|
7427
7596
|
/**
|
|
7428
7597
|
* Request parameters for aiSetLimits operation in AiApi.
|
|
7429
7598
|
* @export
|
|
@@ -9214,6 +9383,19 @@ export interface AiApiPostAiDeploymentsByOwnerByNameUndeployRequest {
|
|
|
9214
9383
|
*/
|
|
9215
9384
|
readonly body: object;
|
|
9216
9385
|
}
|
|
9386
|
+
/**
|
|
9387
|
+
* Request parameters for postAiFeedback operation in AiApi.
|
|
9388
|
+
* @export
|
|
9389
|
+
* @interface AiApiPostAiFeedbackRequest
|
|
9390
|
+
*/
|
|
9391
|
+
export interface AiApiPostAiFeedbackRequest {
|
|
9392
|
+
/**
|
|
9393
|
+
*
|
|
9394
|
+
* @type {AiRoutingRewardRequest}
|
|
9395
|
+
* @memberof AiApiPostAiFeedback
|
|
9396
|
+
*/
|
|
9397
|
+
readonly aiRoutingRewardRequest: AiRoutingRewardRequest;
|
|
9398
|
+
}
|
|
9217
9399
|
/**
|
|
9218
9400
|
* Request parameters for postAiFiles operation in AiApi.
|
|
9219
9401
|
* @export
|
|
@@ -9817,6 +9999,18 @@ export interface AiApiPostChatRequest {
|
|
|
9817
9999
|
* @memberof AiApiPostChat
|
|
9818
10000
|
*/
|
|
9819
10001
|
readonly openaiChatCompletionRequest: OpenaiChatCompletionRequest;
|
|
10002
|
+
/**
|
|
10003
|
+
* The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
10004
|
+
* @type {number}
|
|
10005
|
+
* @memberof AiApiPostChat
|
|
10006
|
+
*/
|
|
10007
|
+
readonly xMaxCost?: number;
|
|
10008
|
+
/**
|
|
10009
|
+
* The slowest model this request accepts, in milliseconds.
|
|
10010
|
+
* @type {number}
|
|
10011
|
+
* @memberof AiApiPostChat
|
|
10012
|
+
*/
|
|
10013
|
+
readonly xMaxLatencyMs?: number;
|
|
9820
10014
|
}
|
|
9821
10015
|
/**
|
|
9822
10016
|
* Request parameters for postChatCompletions operation in AiApi.
|
|
@@ -9830,6 +10024,18 @@ export interface AiApiPostChatCompletionsRequest {
|
|
|
9830
10024
|
* @memberof AiApiPostChatCompletions
|
|
9831
10025
|
*/
|
|
9832
10026
|
readonly openaiChatCompletionRequest: OpenaiChatCompletionRequest;
|
|
10027
|
+
/**
|
|
10028
|
+
* The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
10029
|
+
* @type {number}
|
|
10030
|
+
* @memberof AiApiPostChatCompletions
|
|
10031
|
+
*/
|
|
10032
|
+
readonly xMaxCost?: number;
|
|
10033
|
+
/**
|
|
10034
|
+
* The slowest model this request accepts, in milliseconds.
|
|
10035
|
+
* @type {number}
|
|
10036
|
+
* @memberof AiApiPostChatCompletions
|
|
10037
|
+
*/
|
|
10038
|
+
readonly xMaxLatencyMs?: number;
|
|
9833
10039
|
}
|
|
9834
10040
|
/**
|
|
9835
10041
|
* Request parameters for postChatPublic operation in AiApi.
|
|
@@ -9856,6 +10062,18 @@ export interface AiApiPostCompletionsRequest {
|
|
|
9856
10062
|
* @memberof AiApiPostCompletions
|
|
9857
10063
|
*/
|
|
9858
10064
|
readonly openaiChatCompletionRequest: OpenaiChatCompletionRequest;
|
|
10065
|
+
/**
|
|
10066
|
+
* The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
10067
|
+
* @type {number}
|
|
10068
|
+
* @memberof AiApiPostCompletions
|
|
10069
|
+
*/
|
|
10070
|
+
readonly xMaxCost?: number;
|
|
10071
|
+
/**
|
|
10072
|
+
* The slowest model this request accepts, in milliseconds.
|
|
10073
|
+
* @type {number}
|
|
10074
|
+
* @memberof AiApiPostCompletions
|
|
10075
|
+
*/
|
|
10076
|
+
readonly xMaxLatencyMs?: number;
|
|
9859
10077
|
}
|
|
9860
10078
|
/**
|
|
9861
10079
|
* Request parameters for postDecisions operation in AiApi.
|
|
@@ -9909,6 +10127,25 @@ export interface AiApiPostModelsByModelAccessRequest {
|
|
|
9909
10127
|
*/
|
|
9910
10128
|
readonly model: string;
|
|
9911
10129
|
}
|
|
10130
|
+
/**
|
|
10131
|
+
* Request parameters for postResponses operation in AiApi.
|
|
10132
|
+
* @export
|
|
10133
|
+
* @interface AiApiPostResponsesRequest
|
|
10134
|
+
*/
|
|
10135
|
+
export interface AiApiPostResponsesRequest {
|
|
10136
|
+
/**
|
|
10137
|
+
* The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\'s own ceiling fills it when it is absent, and the lower of the two holds.
|
|
10138
|
+
* @type {number}
|
|
10139
|
+
* @memberof AiApiPostResponses
|
|
10140
|
+
*/
|
|
10141
|
+
readonly xMaxCost?: number;
|
|
10142
|
+
/**
|
|
10143
|
+
* The slowest model this request accepts, in milliseconds.
|
|
10144
|
+
* @type {number}
|
|
10145
|
+
* @memberof AiApiPostResponses
|
|
10146
|
+
*/
|
|
10147
|
+
readonly xMaxLatencyMs?: number;
|
|
10148
|
+
}
|
|
9912
10149
|
/**
|
|
9913
10150
|
* Request parameters for putAiArticlesByOwnerByName operation in AiApi.
|
|
9914
10151
|
* @export
|
|
@@ -10530,6 +10767,24 @@ export interface AiApiPutAiWorkflowsByOwnerByNameRequest {
|
|
|
10530
10767
|
* @extends {BaseAPI}
|
|
10531
10768
|
*/
|
|
10532
10769
|
export declare class AiApi extends BaseAPI {
|
|
10770
|
+
/**
|
|
10771
|
+
* Asks one model one prompt and answers the reply, which model served it and who paid. The call is the caller\'s own POST /v1/chat/completions, run as the caller, so it is gated, billed and refused exactly as that route is; a refusal names its code and what lifts it, never an amount. An empty model asks the deployment\'s default Hanzo model.
|
|
10772
|
+
* @summary Asks one model one prompt and answers the reply, which model served it and who paid.
|
|
10773
|
+
* @param {AiApiAiChatRequest} requestParameters Request parameters.
|
|
10774
|
+
* @param {*} [options] Override http request option.
|
|
10775
|
+
* @throws {RequiredError}
|
|
10776
|
+
* @memberof AiApi
|
|
10777
|
+
*/
|
|
10778
|
+
aiChat(requestParameters: AiApiAiChatRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<AiChat, any, {}>>;
|
|
10779
|
+
/**
|
|
10780
|
+
* Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid. A refusal names its code and what lifts it, never an amount.
|
|
10781
|
+
* @summary Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid.
|
|
10782
|
+
* @param {AiApiAiDecideRequest} requestParameters Request parameters.
|
|
10783
|
+
* @param {*} [options] Override http request option.
|
|
10784
|
+
* @throws {RequiredError}
|
|
10785
|
+
* @memberof AiApi
|
|
10786
|
+
*/
|
|
10787
|
+
aiDecide(requestParameters: AiApiAiDecideRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<AiDecision, any, {}>>;
|
|
10533
10788
|
/**
|
|
10534
10789
|
* Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on. Shares only, never amounts.
|
|
10535
10790
|
* @summary Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on.
|
|
@@ -10547,6 +10802,15 @@ export declare class AiApi extends BaseAPI {
|
|
|
10547
10802
|
* @memberof AiApi
|
|
10548
10803
|
*/
|
|
10549
10804
|
aiMCPTools(requestParameters?: AiApiAiMCPToolsRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<AiMCPSurface, any, {}>>;
|
|
10805
|
+
/**
|
|
10806
|
+
* Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
|
|
10807
|
+
* @summary Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
|
|
10808
|
+
* @param {AiApiAiModelsRequest} requestParameters Request parameters.
|
|
10809
|
+
* @param {*} [options] Override http request option.
|
|
10810
|
+
* @throws {RequiredError}
|
|
10811
|
+
* @memberof AiApi
|
|
10812
|
+
*/
|
|
10813
|
+
aiModels(requestParameters?: AiApiAiModelsRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<AiModels, any, {}>>;
|
|
10550
10814
|
/**
|
|
10551
10815
|
* Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent. A pooled org wallet is its org admin\'s to set; a person\'s own wallet is theirs. Every change is on the audit trail, before and after; no trail, no change. Answers the limits as they read after it.
|
|
10552
10816
|
* @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
|
|
@@ -12202,11 +12466,12 @@ export declare class AiApi extends BaseAPI {
|
|
|
12202
12466
|
/**
|
|
12203
12467
|
* Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal. Org-scoped via the same session-OR-Bearer principal the usage read uses (RequirePrincipal): the reward lands only on the caller\'s OWN org\'s event, so a request_id from another org (or unknown) is a 404 — cross-org writes are impossible and unknown ids are indistinguishable from foreign ones. Idempotent: a repeat overwrites. The body carries NO prompt text — only {request_id, reward|rating}.
|
|
12204
12468
|
* @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
|
|
12469
|
+
* @param {AiApiPostAiFeedbackRequest} requestParameters Request parameters.
|
|
12205
12470
|
* @param {*} [options] Override http request option.
|
|
12206
12471
|
* @throws {RequiredError}
|
|
12207
12472
|
* @memberof AiApi
|
|
12208
12473
|
*/
|
|
12209
|
-
postAiFeedback(options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<Envelope, any, {}>>;
|
|
12474
|
+
postAiFeedback(requestParameters: AiApiPostAiFeedbackRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<Envelope, any, {}>>;
|
|
12210
12475
|
/**
|
|
12211
12476
|
* Create one file.
|
|
12212
12477
|
* @summary Create a file
|
|
@@ -12857,11 +13122,12 @@ export declare class AiApi extends BaseAPI {
|
|
|
12857
13122
|
/**
|
|
12858
13123
|
* Implements POST /v1/responses. The converted request is completed by the chat path, which is handed a sink saying where the answer goes: a stream is translated as it is produced, a whole body is translated entire.
|
|
12859
13124
|
* @summary Implements POST /v1/responses.
|
|
13125
|
+
* @param {AiApiPostResponsesRequest} requestParameters Request parameters.
|
|
12860
13126
|
* @param {*} [options] Override http request option.
|
|
12861
13127
|
* @throws {RequiredError}
|
|
12862
13128
|
* @memberof AiApi
|
|
12863
13129
|
*/
|
|
12864
|
-
postResponses(options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<AiResponsesResource, any, {}>>;
|
|
13130
|
+
postResponses(requestParameters?: AiApiPostResponsesRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<AiResponsesResource, any, {}>>;
|
|
12865
13131
|
/**
|
|
12866
13132
|
* Implements POST /v1/videos/generations — the ASYNC create. Body: {\"model\": \"...\", \"prompt\": \"...\", \"size\"?: \"1280x720\", \"seconds\"?: int} It authenticates the caller, resolves the model to its upstream provider via the shared routing table (zen3-video* / wan2-2-t2v-a14b → the spark-video backend), reserves the per-video budget (the balance gate), creates ONE upstream job, registers it in the in-pod store, and returns the OpenAI-shaped video object with status \"queued\" IMMEDIATELY. The client then polls GET /v1/videos/{id} and downloads GET /v1/videos/{id}/content. Nothing is billed here — the debit lands on completion.
|
|
12867
13133
|
* @summary Implements POST /v1/videos/generations — the ASYNC create.
|