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/esm/api/ai-api.d.ts
CHANGED
|
@@ -14,16 +14,22 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
|
14
14
|
import { type RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import type { AiAnthropicRequest } from '../models';
|
|
16
16
|
import type { AiAnthropicResponse } from '../models';
|
|
17
|
+
import type { AiChat } from '../models';
|
|
18
|
+
import type { AiChatIn } from '../models';
|
|
19
|
+
import type { AiDecideIn } from '../models';
|
|
20
|
+
import type { AiDecision } from '../models';
|
|
17
21
|
import type { AiDecisionsRequest } from '../models';
|
|
18
22
|
import type { AiDecisionsResponse } from '../models';
|
|
19
23
|
import type { AiLimits } from '../models';
|
|
20
24
|
import type { AiLimitsSet } from '../models';
|
|
21
25
|
import type { AiMCPSurface } from '../models';
|
|
22
26
|
import type { AiModelList } from '../models';
|
|
27
|
+
import type { AiModels } from '../models';
|
|
23
28
|
import type { AiRanking } from '../models';
|
|
24
29
|
import type { AiResponse } from '../models';
|
|
25
30
|
import type { AiResponsesResource } from '../models';
|
|
26
31
|
import type { AiRoutingEdit } from '../models';
|
|
32
|
+
import type { AiRoutingRewardRequest } from '../models';
|
|
27
33
|
import type { AiTokenCount } from '../models';
|
|
28
34
|
import type { AiVideoStatus } from '../models';
|
|
29
35
|
import type { DocSearchResult } from '../models';
|
|
@@ -113,6 +119,22 @@ import type { PutAiRouterCatalog200Response } from '../models';
|
|
|
113
119
|
* @export
|
|
114
120
|
*/
|
|
115
121
|
export declare const AiApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
122
|
+
/**
|
|
123
|
+
* 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.
|
|
124
|
+
* @summary Asks one model one prompt and answers the reply, which model served it and who paid.
|
|
125
|
+
* @param {AiChatIn} aiChatIn
|
|
126
|
+
* @param {*} [options] Override http request option.
|
|
127
|
+
* @throws {RequiredError}
|
|
128
|
+
*/
|
|
129
|
+
aiChat: (aiChatIn: AiChatIn, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
130
|
+
/**
|
|
131
|
+
* 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.
|
|
132
|
+
* @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.
|
|
133
|
+
* @param {AiDecideIn} aiDecideIn
|
|
134
|
+
* @param {*} [options] Override http request option.
|
|
135
|
+
* @throws {RequiredError}
|
|
136
|
+
*/
|
|
137
|
+
aiDecide: (aiDecideIn: AiDecideIn, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
116
138
|
/**
|
|
117
139
|
* 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.
|
|
118
140
|
* @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.
|
|
@@ -128,6 +150,18 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
128
150
|
* @throws {RequiredError}
|
|
129
151
|
*/
|
|
130
152
|
aiMCPTools: (names?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
153
|
+
/**
|
|
154
|
+
* 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.
|
|
155
|
+
* @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.
|
|
156
|
+
* @param {string} [q] Q matches the model\'s id, name, description or owner, ignoring case.
|
|
157
|
+
* @param {string} [_class] Class keeps one class: premium (third-party frontier models), ours (Hanzo\'s priced models) or free.
|
|
158
|
+
* @param {string} [family] Family keeps one Hanzo family: enso, zen, kai or zoo.
|
|
159
|
+
* @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).
|
|
160
|
+
* @param {number} [limit] Limit is the most models to answer, 1 to 500; 0 answers 50.
|
|
161
|
+
* @param {*} [options] Override http request option.
|
|
162
|
+
* @throws {RequiredError}
|
|
163
|
+
*/
|
|
164
|
+
aiModels: (q?: string, _class?: string, family?: string, capability?: string, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
131
165
|
/**
|
|
132
166
|
* 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.
|
|
133
167
|
* @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
|
|
@@ -1687,10 +1721,11 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
1687
1721
|
/**
|
|
1688
1722
|
* 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}.
|
|
1689
1723
|
* @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
|
|
1724
|
+
* @param {AiRoutingRewardRequest} aiRoutingRewardRequest
|
|
1690
1725
|
* @param {*} [options] Override http request option.
|
|
1691
1726
|
* @throws {RequiredError}
|
|
1692
1727
|
*/
|
|
1693
|
-
postAiFeedback: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1728
|
+
postAiFeedback: (aiRoutingRewardRequest: AiRoutingRewardRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1694
1729
|
/**
|
|
1695
1730
|
* Create one file.
|
|
1696
1731
|
* @summary Create a file
|
|
@@ -2196,18 +2231,22 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
2196
2231
|
* Implements the OpenAI-compatible chat completions API
|
|
2197
2232
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
2198
2233
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
2234
|
+
* @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.
|
|
2235
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
2199
2236
|
* @param {*} [options] Override http request option.
|
|
2200
2237
|
* @throws {RequiredError}
|
|
2201
2238
|
*/
|
|
2202
|
-
postChat: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2239
|
+
postChat: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2203
2240
|
/**
|
|
2204
2241
|
* Implements the OpenAI-compatible chat completions API
|
|
2205
2242
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
2206
2243
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
2244
|
+
* @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.
|
|
2245
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
2207
2246
|
* @param {*} [options] Override http request option.
|
|
2208
2247
|
* @throws {RequiredError}
|
|
2209
2248
|
*/
|
|
2210
|
-
postChatCompletions: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2249
|
+
postChatCompletions: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2211
2250
|
/**
|
|
2212
2251
|
* Serves one completion to a caller with no account.
|
|
2213
2252
|
* @summary Serves one completion to a caller with no account.
|
|
@@ -2220,10 +2259,12 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
2220
2259
|
* Implements the OpenAI-compatible chat completions API
|
|
2221
2260
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
2222
2261
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
2262
|
+
* @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.
|
|
2263
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
2223
2264
|
* @param {*} [options] Override http request option.
|
|
2224
2265
|
* @throws {RequiredError}
|
|
2225
2266
|
*/
|
|
2226
|
-
postCompletions: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2267
|
+
postCompletions: (openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2227
2268
|
/**
|
|
2228
2269
|
* 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.
|
|
2229
2270
|
* @summary Implements POST /v1/decisions (the Decisions API).
|
|
@@ -2280,10 +2321,12 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
2280
2321
|
/**
|
|
2281
2322
|
* 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.
|
|
2282
2323
|
* @summary Implements POST /v1/responses.
|
|
2324
|
+
* @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.
|
|
2325
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
2283
2326
|
* @param {*} [options] Override http request option.
|
|
2284
2327
|
* @throws {RequiredError}
|
|
2285
2328
|
*/
|
|
2286
|
-
postResponses: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2329
|
+
postResponses: (xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2287
2330
|
/**
|
|
2288
2331
|
* 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.
|
|
2289
2332
|
* @summary Implements POST /v1/videos/generations — the ASYNC create.
|
|
@@ -2600,6 +2643,22 @@ export declare const AiApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
2600
2643
|
* @export
|
|
2601
2644
|
*/
|
|
2602
2645
|
export declare const AiApiFp: (configuration?: Configuration) => {
|
|
2646
|
+
/**
|
|
2647
|
+
* 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.
|
|
2648
|
+
* @summary Asks one model one prompt and answers the reply, which model served it and who paid.
|
|
2649
|
+
* @param {AiChatIn} aiChatIn
|
|
2650
|
+
* @param {*} [options] Override http request option.
|
|
2651
|
+
* @throws {RequiredError}
|
|
2652
|
+
*/
|
|
2653
|
+
aiChat(aiChatIn: AiChatIn, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiChat>>;
|
|
2654
|
+
/**
|
|
2655
|
+
* 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.
|
|
2656
|
+
* @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.
|
|
2657
|
+
* @param {AiDecideIn} aiDecideIn
|
|
2658
|
+
* @param {*} [options] Override http request option.
|
|
2659
|
+
* @throws {RequiredError}
|
|
2660
|
+
*/
|
|
2661
|
+
aiDecide(aiDecideIn: AiDecideIn, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiDecision>>;
|
|
2603
2662
|
/**
|
|
2604
2663
|
* 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.
|
|
2605
2664
|
* @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.
|
|
@@ -2615,6 +2674,18 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
2615
2674
|
* @throws {RequiredError}
|
|
2616
2675
|
*/
|
|
2617
2676
|
aiMCPTools(names?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiMCPSurface>>;
|
|
2677
|
+
/**
|
|
2678
|
+
* 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.
|
|
2679
|
+
* @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.
|
|
2680
|
+
* @param {string} [q] Q matches the model\'s id, name, description or owner, ignoring case.
|
|
2681
|
+
* @param {string} [_class] Class keeps one class: premium (third-party frontier models), ours (Hanzo\'s priced models) or free.
|
|
2682
|
+
* @param {string} [family] Family keeps one Hanzo family: enso, zen, kai or zoo.
|
|
2683
|
+
* @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).
|
|
2684
|
+
* @param {number} [limit] Limit is the most models to answer, 1 to 500; 0 answers 50.
|
|
2685
|
+
* @param {*} [options] Override http request option.
|
|
2686
|
+
* @throws {RequiredError}
|
|
2687
|
+
*/
|
|
2688
|
+
aiModels(q?: string, _class?: string, family?: string, capability?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiModels>>;
|
|
2618
2689
|
/**
|
|
2619
2690
|
* 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.
|
|
2620
2691
|
* @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
|
|
@@ -4174,10 +4245,11 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
4174
4245
|
/**
|
|
4175
4246
|
* 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}.
|
|
4176
4247
|
* @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
|
|
4248
|
+
* @param {AiRoutingRewardRequest} aiRoutingRewardRequest
|
|
4177
4249
|
* @param {*} [options] Override http request option.
|
|
4178
4250
|
* @throws {RequiredError}
|
|
4179
4251
|
*/
|
|
4180
|
-
postAiFeedback(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostAiFeedback200Response>>;
|
|
4252
|
+
postAiFeedback(aiRoutingRewardRequest: AiRoutingRewardRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostAiFeedback200Response>>;
|
|
4181
4253
|
/**
|
|
4182
4254
|
* Create one file.
|
|
4183
4255
|
* @summary Create a file
|
|
@@ -4683,18 +4755,22 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
4683
4755
|
* Implements the OpenAI-compatible chat completions API
|
|
4684
4756
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
4685
4757
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
4758
|
+
* @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.
|
|
4759
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
4686
4760
|
* @param {*} [options] Override http request option.
|
|
4687
4761
|
* @throws {RequiredError}
|
|
4688
4762
|
*/
|
|
4689
|
-
postChat(openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4763
|
+
postChat(openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4690
4764
|
/**
|
|
4691
4765
|
* Implements the OpenAI-compatible chat completions API
|
|
4692
4766
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
4693
4767
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
4768
|
+
* @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.
|
|
4769
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
4694
4770
|
* @param {*} [options] Override http request option.
|
|
4695
4771
|
* @throws {RequiredError}
|
|
4696
4772
|
*/
|
|
4697
|
-
postChatCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4773
|
+
postChatCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4698
4774
|
/**
|
|
4699
4775
|
* Serves one completion to a caller with no account.
|
|
4700
4776
|
* @summary Serves one completion to a caller with no account.
|
|
@@ -4707,10 +4783,12 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
4707
4783
|
* Implements the OpenAI-compatible chat completions API
|
|
4708
4784
|
* @summary Implements the OpenAI-compatible chat completions API
|
|
4709
4785
|
* @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
|
|
4786
|
+
* @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.
|
|
4787
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
4710
4788
|
* @param {*} [options] Override http request option.
|
|
4711
4789
|
* @throws {RequiredError}
|
|
4712
4790
|
*/
|
|
4713
|
-
postCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4791
|
+
postCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>>;
|
|
4714
4792
|
/**
|
|
4715
4793
|
* 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.
|
|
4716
4794
|
* @summary Implements POST /v1/decisions (the Decisions API).
|
|
@@ -4767,10 +4845,12 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
4767
4845
|
/**
|
|
4768
4846
|
* 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.
|
|
4769
4847
|
* @summary Implements POST /v1/responses.
|
|
4848
|
+
* @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.
|
|
4849
|
+
* @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
|
|
4770
4850
|
* @param {*} [options] Override http request option.
|
|
4771
4851
|
* @throws {RequiredError}
|
|
4772
4852
|
*/
|
|
4773
|
-
postResponses(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiResponsesResource>>;
|
|
4853
|
+
postResponses(xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiResponsesResource>>;
|
|
4774
4854
|
/**
|
|
4775
4855
|
* 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.
|
|
4776
4856
|
* @summary Implements POST /v1/videos/generations — the ASYNC create.
|
|
@@ -5087,6 +5167,22 @@ export declare const AiApiFp: (configuration?: Configuration) => {
|
|
|
5087
5167
|
* @export
|
|
5088
5168
|
*/
|
|
5089
5169
|
export declare const AiApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
5170
|
+
/**
|
|
5171
|
+
* 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.
|
|
5172
|
+
* @summary Asks one model one prompt and answers the reply, which model served it and who paid.
|
|
5173
|
+
* @param {AiApiAiChatRequest} requestParameters Request parameters.
|
|
5174
|
+
* @param {*} [options] Override http request option.
|
|
5175
|
+
* @throws {RequiredError}
|
|
5176
|
+
*/
|
|
5177
|
+
aiChat(requestParameters: AiApiAiChatRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiChat>;
|
|
5178
|
+
/**
|
|
5179
|
+
* 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.
|
|
5180
|
+
* @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.
|
|
5181
|
+
* @param {AiApiAiDecideRequest} requestParameters Request parameters.
|
|
5182
|
+
* @param {*} [options] Override http request option.
|
|
5183
|
+
* @throws {RequiredError}
|
|
5184
|
+
*/
|
|
5185
|
+
aiDecide(requestParameters: AiApiAiDecideRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiDecision>;
|
|
5090
5186
|
/**
|
|
5091
5187
|
* 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.
|
|
5092
5188
|
* @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.
|
|
@@ -5102,6 +5198,14 @@ export declare const AiApiFactory: (configuration?: Configuration, basePath?: st
|
|
|
5102
5198
|
* @throws {RequiredError}
|
|
5103
5199
|
*/
|
|
5104
5200
|
aiMCPTools(requestParameters?: AiApiAiMCPToolsRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiMCPSurface>;
|
|
5201
|
+
/**
|
|
5202
|
+
* 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.
|
|
5203
|
+
* @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.
|
|
5204
|
+
* @param {AiApiAiModelsRequest} requestParameters Request parameters.
|
|
5205
|
+
* @param {*} [options] Override http request option.
|
|
5206
|
+
* @throws {RequiredError}
|
|
5207
|
+
*/
|
|
5208
|
+
aiModels(requestParameters?: AiApiAiModelsRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiModels>;
|
|
5105
5209
|
/**
|
|
5106
5210
|
* 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.
|
|
5107
5211
|
* @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
|
|
@@ -6562,10 +6666,11 @@ export declare const AiApiFactory: (configuration?: Configuration, basePath?: st
|
|
|
6562
6666
|
/**
|
|
6563
6667
|
* 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}.
|
|
6564
6668
|
* @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
|
|
6669
|
+
* @param {AiApiPostAiFeedbackRequest} requestParameters Request parameters.
|
|
6565
6670
|
* @param {*} [options] Override http request option.
|
|
6566
6671
|
* @throws {RequiredError}
|
|
6567
6672
|
*/
|
|
6568
|
-
postAiFeedback(options?: RawAxiosRequestConfig): AxiosPromise<PostAiFeedback200Response>;
|
|
6673
|
+
postAiFeedback(requestParameters: AiApiPostAiFeedbackRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostAiFeedback200Response>;
|
|
6569
6674
|
/**
|
|
6570
6675
|
* Create one file.
|
|
6571
6676
|
* @summary Create a file
|
|
@@ -7141,10 +7246,11 @@ export declare const AiApiFactory: (configuration?: Configuration, basePath?: st
|
|
|
7141
7246
|
/**
|
|
7142
7247
|
* 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.
|
|
7143
7248
|
* @summary Implements POST /v1/responses.
|
|
7249
|
+
* @param {AiApiPostResponsesRequest} requestParameters Request parameters.
|
|
7144
7250
|
* @param {*} [options] Override http request option.
|
|
7145
7251
|
* @throws {RequiredError}
|
|
7146
7252
|
*/
|
|
7147
|
-
postResponses(options?: RawAxiosRequestConfig): AxiosPromise<AiResponsesResource>;
|
|
7253
|
+
postResponses(requestParameters?: AiApiPostResponsesRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiResponsesResource>;
|
|
7148
7254
|
/**
|
|
7149
7255
|
* 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.
|
|
7150
7256
|
* @summary Implements POST /v1/videos/generations — the ASYNC create.
|
|
@@ -7410,6 +7516,32 @@ export declare const AiApiFactory: (configuration?: Configuration, basePath?: st
|
|
|
7410
7516
|
*/
|
|
7411
7517
|
putAiWorkflowsByOwnerByName(requestParameters: AiApiPutAiWorkflowsByOwnerByNameRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostAiWorkflows200Response>;
|
|
7412
7518
|
};
|
|
7519
|
+
/**
|
|
7520
|
+
* Request parameters for aiChat operation in AiApi.
|
|
7521
|
+
* @export
|
|
7522
|
+
* @interface AiApiAiChatRequest
|
|
7523
|
+
*/
|
|
7524
|
+
export interface AiApiAiChatRequest {
|
|
7525
|
+
/**
|
|
7526
|
+
*
|
|
7527
|
+
* @type {AiChatIn}
|
|
7528
|
+
* @memberof AiApiAiChat
|
|
7529
|
+
*/
|
|
7530
|
+
readonly aiChatIn: AiChatIn;
|
|
7531
|
+
}
|
|
7532
|
+
/**
|
|
7533
|
+
* Request parameters for aiDecide operation in AiApi.
|
|
7534
|
+
* @export
|
|
7535
|
+
* @interface AiApiAiDecideRequest
|
|
7536
|
+
*/
|
|
7537
|
+
export interface AiApiAiDecideRequest {
|
|
7538
|
+
/**
|
|
7539
|
+
*
|
|
7540
|
+
* @type {AiDecideIn}
|
|
7541
|
+
* @memberof AiApiAiDecide
|
|
7542
|
+
*/
|
|
7543
|
+
readonly aiDecideIn: AiDecideIn;
|
|
7544
|
+
}
|
|
7413
7545
|
/**
|
|
7414
7546
|
* Request parameters for aiMCPTools operation in AiApi.
|
|
7415
7547
|
* @export
|
|
@@ -7423,6 +7555,43 @@ export interface AiApiAiMCPToolsRequest {
|
|
|
7423
7555
|
*/
|
|
7424
7556
|
readonly names?: boolean;
|
|
7425
7557
|
}
|
|
7558
|
+
/**
|
|
7559
|
+
* Request parameters for aiModels operation in AiApi.
|
|
7560
|
+
* @export
|
|
7561
|
+
* @interface AiApiAiModelsRequest
|
|
7562
|
+
*/
|
|
7563
|
+
export interface AiApiAiModelsRequest {
|
|
7564
|
+
/**
|
|
7565
|
+
* Q matches the model\'s id, name, description or owner, ignoring case.
|
|
7566
|
+
* @type {string}
|
|
7567
|
+
* @memberof AiApiAiModels
|
|
7568
|
+
*/
|
|
7569
|
+
readonly q?: string;
|
|
7570
|
+
/**
|
|
7571
|
+
* Class keeps one class: premium (third-party frontier models), ours (Hanzo\'s priced models) or free.
|
|
7572
|
+
* @type {string}
|
|
7573
|
+
* @memberof AiApiAiModels
|
|
7574
|
+
*/
|
|
7575
|
+
readonly _class?: string;
|
|
7576
|
+
/**
|
|
7577
|
+
* Family keeps one Hanzo family: enso, zen, kai or zoo.
|
|
7578
|
+
* @type {string}
|
|
7579
|
+
* @memberof AiApiAiModels
|
|
7580
|
+
*/
|
|
7581
|
+
readonly family?: string;
|
|
7582
|
+
/**
|
|
7583
|
+
* Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).
|
|
7584
|
+
* @type {string}
|
|
7585
|
+
* @memberof AiApiAiModels
|
|
7586
|
+
*/
|
|
7587
|
+
readonly capability?: string;
|
|
7588
|
+
/**
|
|
7589
|
+
* Limit is the most models to answer, 1 to 500; 0 answers 50.
|
|
7590
|
+
* @type {number}
|
|
7591
|
+
* @memberof AiApiAiModels
|
|
7592
|
+
*/
|
|
7593
|
+
readonly limit?: number;
|
|
7594
|
+
}
|
|
7426
7595
|
/**
|
|
7427
7596
|
* Request parameters for aiSetLimits operation in AiApi.
|
|
7428
7597
|
* @export
|
|
@@ -9213,6 +9382,19 @@ export interface AiApiPostAiDeploymentsByOwnerByNameUndeployRequest {
|
|
|
9213
9382
|
*/
|
|
9214
9383
|
readonly body: object;
|
|
9215
9384
|
}
|
|
9385
|
+
/**
|
|
9386
|
+
* Request parameters for postAiFeedback operation in AiApi.
|
|
9387
|
+
* @export
|
|
9388
|
+
* @interface AiApiPostAiFeedbackRequest
|
|
9389
|
+
*/
|
|
9390
|
+
export interface AiApiPostAiFeedbackRequest {
|
|
9391
|
+
/**
|
|
9392
|
+
*
|
|
9393
|
+
* @type {AiRoutingRewardRequest}
|
|
9394
|
+
* @memberof AiApiPostAiFeedback
|
|
9395
|
+
*/
|
|
9396
|
+
readonly aiRoutingRewardRequest: AiRoutingRewardRequest;
|
|
9397
|
+
}
|
|
9216
9398
|
/**
|
|
9217
9399
|
* Request parameters for postAiFiles operation in AiApi.
|
|
9218
9400
|
* @export
|
|
@@ -9816,6 +9998,18 @@ export interface AiApiPostChatRequest {
|
|
|
9816
9998
|
* @memberof AiApiPostChat
|
|
9817
9999
|
*/
|
|
9818
10000
|
readonly openaiChatCompletionRequest: OpenaiChatCompletionRequest;
|
|
10001
|
+
/**
|
|
10002
|
+
* 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.
|
|
10003
|
+
* @type {number}
|
|
10004
|
+
* @memberof AiApiPostChat
|
|
10005
|
+
*/
|
|
10006
|
+
readonly xMaxCost?: number;
|
|
10007
|
+
/**
|
|
10008
|
+
* The slowest model this request accepts, in milliseconds.
|
|
10009
|
+
* @type {number}
|
|
10010
|
+
* @memberof AiApiPostChat
|
|
10011
|
+
*/
|
|
10012
|
+
readonly xMaxLatencyMs?: number;
|
|
9819
10013
|
}
|
|
9820
10014
|
/**
|
|
9821
10015
|
* Request parameters for postChatCompletions operation in AiApi.
|
|
@@ -9829,6 +10023,18 @@ export interface AiApiPostChatCompletionsRequest {
|
|
|
9829
10023
|
* @memberof AiApiPostChatCompletions
|
|
9830
10024
|
*/
|
|
9831
10025
|
readonly openaiChatCompletionRequest: OpenaiChatCompletionRequest;
|
|
10026
|
+
/**
|
|
10027
|
+
* 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.
|
|
10028
|
+
* @type {number}
|
|
10029
|
+
* @memberof AiApiPostChatCompletions
|
|
10030
|
+
*/
|
|
10031
|
+
readonly xMaxCost?: number;
|
|
10032
|
+
/**
|
|
10033
|
+
* The slowest model this request accepts, in milliseconds.
|
|
10034
|
+
* @type {number}
|
|
10035
|
+
* @memberof AiApiPostChatCompletions
|
|
10036
|
+
*/
|
|
10037
|
+
readonly xMaxLatencyMs?: number;
|
|
9832
10038
|
}
|
|
9833
10039
|
/**
|
|
9834
10040
|
* Request parameters for postChatPublic operation in AiApi.
|
|
@@ -9855,6 +10061,18 @@ export interface AiApiPostCompletionsRequest {
|
|
|
9855
10061
|
* @memberof AiApiPostCompletions
|
|
9856
10062
|
*/
|
|
9857
10063
|
readonly openaiChatCompletionRequest: OpenaiChatCompletionRequest;
|
|
10064
|
+
/**
|
|
10065
|
+
* 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.
|
|
10066
|
+
* @type {number}
|
|
10067
|
+
* @memberof AiApiPostCompletions
|
|
10068
|
+
*/
|
|
10069
|
+
readonly xMaxCost?: number;
|
|
10070
|
+
/**
|
|
10071
|
+
* The slowest model this request accepts, in milliseconds.
|
|
10072
|
+
* @type {number}
|
|
10073
|
+
* @memberof AiApiPostCompletions
|
|
10074
|
+
*/
|
|
10075
|
+
readonly xMaxLatencyMs?: number;
|
|
9858
10076
|
}
|
|
9859
10077
|
/**
|
|
9860
10078
|
* Request parameters for postDecisions operation in AiApi.
|
|
@@ -9908,6 +10126,25 @@ export interface AiApiPostModelsByModelAccessRequest {
|
|
|
9908
10126
|
*/
|
|
9909
10127
|
readonly model: string;
|
|
9910
10128
|
}
|
|
10129
|
+
/**
|
|
10130
|
+
* Request parameters for postResponses operation in AiApi.
|
|
10131
|
+
* @export
|
|
10132
|
+
* @interface AiApiPostResponsesRequest
|
|
10133
|
+
*/
|
|
10134
|
+
export interface AiApiPostResponsesRequest {
|
|
10135
|
+
/**
|
|
10136
|
+
* 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.
|
|
10137
|
+
* @type {number}
|
|
10138
|
+
* @memberof AiApiPostResponses
|
|
10139
|
+
*/
|
|
10140
|
+
readonly xMaxCost?: number;
|
|
10141
|
+
/**
|
|
10142
|
+
* The slowest model this request accepts, in milliseconds.
|
|
10143
|
+
* @type {number}
|
|
10144
|
+
* @memberof AiApiPostResponses
|
|
10145
|
+
*/
|
|
10146
|
+
readonly xMaxLatencyMs?: number;
|
|
10147
|
+
}
|
|
9911
10148
|
/**
|
|
9912
10149
|
* Request parameters for putAiArticlesByOwnerByName operation in AiApi.
|
|
9913
10150
|
* @export
|
|
@@ -10529,6 +10766,24 @@ export interface AiApiPutAiWorkflowsByOwnerByNameRequest {
|
|
|
10529
10766
|
* @extends {BaseAPI}
|
|
10530
10767
|
*/
|
|
10531
10768
|
export declare class AiApi extends BaseAPI {
|
|
10769
|
+
/**
|
|
10770
|
+
* 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.
|
|
10771
|
+
* @summary Asks one model one prompt and answers the reply, which model served it and who paid.
|
|
10772
|
+
* @param {AiApiAiChatRequest} requestParameters Request parameters.
|
|
10773
|
+
* @param {*} [options] Override http request option.
|
|
10774
|
+
* @throws {RequiredError}
|
|
10775
|
+
* @memberof AiApi
|
|
10776
|
+
*/
|
|
10777
|
+
aiChat(requestParameters: AiApiAiChatRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiChat, any, {}>>;
|
|
10778
|
+
/**
|
|
10779
|
+
* 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.
|
|
10780
|
+
* @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.
|
|
10781
|
+
* @param {AiApiAiDecideRequest} requestParameters Request parameters.
|
|
10782
|
+
* @param {*} [options] Override http request option.
|
|
10783
|
+
* @throws {RequiredError}
|
|
10784
|
+
* @memberof AiApi
|
|
10785
|
+
*/
|
|
10786
|
+
aiDecide(requestParameters: AiApiAiDecideRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiDecision, any, {}>>;
|
|
10532
10787
|
/**
|
|
10533
10788
|
* 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.
|
|
10534
10789
|
* @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.
|
|
@@ -10546,6 +10801,15 @@ export declare class AiApi extends BaseAPI {
|
|
|
10546
10801
|
* @memberof AiApi
|
|
10547
10802
|
*/
|
|
10548
10803
|
aiMCPTools(requestParameters?: AiApiAiMCPToolsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiMCPSurface, any, {}>>;
|
|
10804
|
+
/**
|
|
10805
|
+
* 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.
|
|
10806
|
+
* @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.
|
|
10807
|
+
* @param {AiApiAiModelsRequest} requestParameters Request parameters.
|
|
10808
|
+
* @param {*} [options] Override http request option.
|
|
10809
|
+
* @throws {RequiredError}
|
|
10810
|
+
* @memberof AiApi
|
|
10811
|
+
*/
|
|
10812
|
+
aiModels(requestParameters?: AiApiAiModelsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiModels, any, {}>>;
|
|
10549
10813
|
/**
|
|
10550
10814
|
* 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.
|
|
10551
10815
|
* @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
|
|
@@ -12201,11 +12465,12 @@ export declare class AiApi extends BaseAPI {
|
|
|
12201
12465
|
/**
|
|
12202
12466
|
* 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}.
|
|
12203
12467
|
* @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
|
|
12468
|
+
* @param {AiApiPostAiFeedbackRequest} requestParameters Request parameters.
|
|
12204
12469
|
* @param {*} [options] Override http request option.
|
|
12205
12470
|
* @throws {RequiredError}
|
|
12206
12471
|
* @memberof AiApi
|
|
12207
12472
|
*/
|
|
12208
|
-
postAiFeedback(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Envelope, any, {}>>;
|
|
12473
|
+
postAiFeedback(requestParameters: AiApiPostAiFeedbackRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Envelope, any, {}>>;
|
|
12209
12474
|
/**
|
|
12210
12475
|
* Create one file.
|
|
12211
12476
|
* @summary Create a file
|
|
@@ -12856,11 +13121,12 @@ export declare class AiApi extends BaseAPI {
|
|
|
12856
13121
|
/**
|
|
12857
13122
|
* 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.
|
|
12858
13123
|
* @summary Implements POST /v1/responses.
|
|
13124
|
+
* @param {AiApiPostResponsesRequest} requestParameters Request parameters.
|
|
12859
13125
|
* @param {*} [options] Override http request option.
|
|
12860
13126
|
* @throws {RequiredError}
|
|
12861
13127
|
* @memberof AiApi
|
|
12862
13128
|
*/
|
|
12863
|
-
postResponses(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiResponsesResource, any, {}>>;
|
|
13129
|
+
postResponses(requestParameters?: AiApiPostResponsesRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiResponsesResource, any, {}>>;
|
|
12864
13130
|
/**
|
|
12865
13131
|
* 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.
|
|
12866
13132
|
* @summary Implements POST /v1/videos/generations — the ASYNC create.
|