Llm.Models
Overview
Available Operations
- list - List available models
- get - Retrieve a model
- listCatalog - List the organization's model catalog
- addCatalogEntry - Define a BYO catalog model
- updateCatalogEntry - Update a BYO catalog model
- deleteCatalogEntry - Remove a BYO catalog model
- checkCatalogHealth - Check a BYO catalog model's health
- listCatalogOrgAccess - List an organization's cluster model access
- addCatalogOrgAccess - Add cluster model access for an organization
- replaceCatalogOrgAccess - Replace an organization's cluster model access
- listCatalogModelAccess - List organizations with access to a cluster model
- listRegistry - List the organization's active model registry
- activateRegistryEntry - Activate a catalog entry
- deactivateRegistryEntry - Deactivate a model registry name
- listOrgAutoModels - List this org's auto-model overrides
- putOrgAutoModel - Set this org's auto-model override for an endpoint
- deleteOrgAutoModel - Clear this org's auto-model override for an endpoint
- getClusterCurrency - Get the cluster currency
- setClusterCurrency - Set the cluster currency
- listClusterPrices - List cluster-default model prices
- setClusterPrice - Set a cluster-default model price
- clearClusterPrice - Clear a cluster-default model price
- listOrgPrices - List an org's price overrides
- setOrgPrice - Set an org price override
- clearOrgPrice - Clear an org price override
- listEffectivePrices - List effective prices for the caller's models
list
Lists the currently available models. Provides basic information about each model including its ID and owner.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.list({});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsList } from "@meetkai/mka1/funcs/llmModelsList.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsList(sdk, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsList failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsList,
useLlmModelsListSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsList,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateLlmModelsList,
invalidateAllLlmModelsList,
} from "@meetkai/mka1/react-query/llmModelsList.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListModelsRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ListModelsResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
get
Retrieves a model instance, providing basic information about the model such as the owner and supported capabilities.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.get({
modelId: "meetkai:functionary-urdu-mini-pak",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsGet } from "@meetkai/mka1/funcs/llmModelsGet.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsGet(sdk, {
modelId: "meetkai:functionary-urdu-mini-pak",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsGet failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsGet,
useLlmModelsGetSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsGet,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateLlmModelsGet,
invalidateAllLlmModelsGet,
} from "@meetkai/mka1/react-query/llmModelsGet.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetModelRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.GetModelResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listCatalog
Lists all BYO, serving, and cluster-access definitions with activation state, blocker, health, and price preview.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.listCatalog();
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListCatalog } from "@meetkai/mka1/funcs/llmModelsListCatalog.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsListCatalog(sdk);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListCatalog failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsListCatalog,
useLlmModelsListCatalogSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListCatalog,
// Utility to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateAllLlmModelsListCatalog,
} from "@meetkai/mka1/react-query/llmModelsListCatalog.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.CatalogListResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
addCatalogEntry
Creates an API-owned BYO definition without activating its name.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.addCatalogEntry({
id: "meetkai:custom-chat-v1",
provider: "openai-compatible",
modelId: "custom-chat-v1",
displayName: "Custom Chat v1",
baseUrl: "https://models.example.com/v1",
apiFormat: "responses",
apiProviderType: "openai",
created: 1704067200,
auth: {
type: "api-key",
value: "sk-provider-key",
},
capabilities: {
modalities: {
input: [
"text",
],
output: [
"text",
],
},
reasoning: true,
},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsAddCatalogEntry } from "@meetkai/mka1/funcs/llmModelsAddCatalogEntry.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsAddCatalogEntry(sdk, {
id: "meetkai:custom-chat-v1",
provider: "openai-compatible",
modelId: "custom-chat-v1",
displayName: "Custom Chat v1",
baseUrl: "https://models.example.com/v1",
apiFormat: "responses",
apiProviderType: "openai",
created: 1704067200,
auth: {
type: "api-key",
value: "sk-provider-key",
},
capabilities: {
modalities: {
input: [
"text",
],
output: [
"text",
],
},
reasoning: true,
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsAddCatalogEntry failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsAddCatalogEntryMutation
} from "@meetkai/mka1/react-query/llmModelsAddCatalogEntry.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.AddCatalogModelRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.CatalogEntry>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
updateCatalogEntry
Updates an API-owned BYO definition; yaml-origin entries are file-managed and immutable through this API.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.updateCatalogEntry({
displayName: "Custom Chat v2",
rpm: 240,
id: "meetkai:custom-chat-v1",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsUpdateCatalogEntry } from "@meetkai/mka1/funcs/llmModelsUpdateCatalogEntry.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsUpdateCatalogEntry(sdk, {
displayName: "Custom Chat v2",
rpm: 240,
id: "meetkai:custom-chat-v1",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsUpdateCatalogEntry failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsUpdateCatalogEntryMutation
} from "@meetkai/mka1/react-query/llmModelsUpdateCatalogEntry.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.UpdateCatalogModelRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.CatalogEntry>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
deleteCatalogEntry
Withdraws a BYO definition and deactivates it only when the active name is sourced from that BYO lineage.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.deleteCatalogEntry({
id: "meetkai:custom-chat-v1",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsDeleteCatalogEntry } from "@meetkai/mka1/funcs/llmModelsDeleteCatalogEntry.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsDeleteCatalogEntry(sdk, {
id: "meetkai:custom-chat-v1",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsDeleteCatalogEntry failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsDeleteCatalogEntryMutation
} from "@meetkai/mka1/react-query/llmModelsDeleteCatalogEntry.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.DeleteModelCatalogEntryRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.DeleteCatalogModelResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
checkCatalogHealth
Probes an available BYO definition whether or not it is active.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.checkCatalogHealth({
id: "meetkai:custom-chat-v1",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsCheckCatalogHealth } from "@meetkai/mka1/funcs/llmModelsCheckCatalogHealth.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsCheckCatalogHealth(sdk, {
id: "meetkai:custom-chat-v1",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsCheckCatalogHealth failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsCheckCatalogHealthMutation
} from "@meetkai/mka1/react-query/llmModelsCheckCatalogHealth.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.CheckModelCatalogHealthRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.CatalogHealthResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listCatalogOrgAccess
Cluster operator view of an org's available cluster catalog entries and their activation state.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.listCatalogOrgAccess({
orgId: "org-acme",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListCatalogOrgAccess } from "@meetkai/mka1/funcs/llmModelsListCatalogOrgAccess.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsListCatalogOrgAccess(sdk, {
orgId: "org-acme",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListCatalogOrgAccess failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsListCatalogOrgAccess,
useLlmModelsListCatalogOrgAccessSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListCatalogOrgAccess,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateLlmModelsListCatalogOrgAccess,
invalidateAllLlmModelsListCatalogOrgAccess,
} from "@meetkai/mka1/react-query/llmModelsListCatalogOrgAccess.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListModelCatalogOrgAccessRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.AccessListResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
addCatalogOrgAccess
Idempotently adds availability without activating or revoking any model names.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.addCatalogOrgAccess({
orgId: "org-acme",
accessMutationRequest: {
modelIds: [
"functionary",
],
},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsAddCatalogOrgAccess } from "@meetkai/mka1/funcs/llmModelsAddCatalogOrgAccess.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsAddCatalogOrgAccess(sdk, {
orgId: "org-acme",
accessMutationRequest: {
modelIds: [
"functionary",
],
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsAddCatalogOrgAccess failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsAddCatalogOrgAccessMutation
} from "@meetkai/mka1/react-query/llmModelsAddCatalogOrgAccess.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.AddModelCatalogOrgAccessRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.AccessMutationResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
replaceCatalogOrgAccess
Serializable full replacement; revoked active cluster names are deactivated and their org price rows are closed.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.replaceCatalogOrgAccess({
orgId: "org-acme",
accessMutationRequest: {
modelIds: [
"functionary",
],
},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsReplaceCatalogOrgAccess } from "@meetkai/mka1/funcs/llmModelsReplaceCatalogOrgAccess.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsReplaceCatalogOrgAccess(sdk, {
orgId: "org-acme",
accessMutationRequest: {
modelIds: [
"functionary",
],
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsReplaceCatalogOrgAccess failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsReplaceCatalogOrgAccessMutation
} from "@meetkai/mka1/react-query/llmModelsReplaceCatalogOrgAccess.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ReplaceModelCatalogOrgAccessRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.AccessMutationResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listCatalogModelAccess
Cluster operator reverse lookup showing availability and activation for one cluster catalog id.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.listCatalogModelAccess({
modelId: "functionary",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListCatalogModelAccess } from "@meetkai/mka1/funcs/llmModelsListCatalogModelAccess.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsListCatalogModelAccess(sdk, {
modelId: "functionary",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListCatalogModelAccess failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsListCatalogModelAccess,
useLlmModelsListCatalogModelAccessSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListCatalogModelAccess,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateLlmModelsListCatalogModelAccess,
invalidateAllLlmModelsListCatalogModelAccess,
} from "@meetkai/mka1/react-query/llmModelsListCatalogModelAccess.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListModelCatalogAccessRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.ReverseAccessListResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listRegistry
Single management view of every active name with source-qualified definition, health, price, and activation audit details.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.listRegistry();
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListRegistry } from "@meetkai/mka1/funcs/llmModelsListRegistry.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsListRegistry(sdk);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListRegistry failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsListRegistry,
useLlmModelsListRegistrySuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListRegistry,
// Utility to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateAllLlmModelsListRegistry,
} from "@meetkai/mka1/react-query/llmModelsListRegistry.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.RegistryManagementListResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
activateRegistryEntry
Claims a model name from one catalog source. Re-activation from the same source is idempotent; a different holder returns 409.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.activateRegistryEntry({
source: "cluster",
modelId: "functionary",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsActivateRegistryEntry } from "@meetkai/mka1/funcs/llmModelsActivateRegistryEntry.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsActivateRegistryEntry(sdk, {
source: "cluster",
modelId: "functionary",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsActivateRegistryEntry failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsActivateRegistryEntryMutation
} from "@meetkai/mka1/react-query/llmModelsActivateRegistryEntry.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.ActivateRegistryEntryRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.RegistryEntryResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
deactivateRegistryEntry
Idempotently removes the active name and closes its org-scope price rows without touching the catalog definition.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.deactivateRegistryEntry({
id: "functionary",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsDeactivateRegistryEntry } from "@meetkai/mka1/funcs/llmModelsDeactivateRegistryEntry.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsDeactivateRegistryEntry(sdk, {
id: "functionary",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsDeactivateRegistryEntry failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsDeactivateRegistryEntryMutation
} from "@meetkai/mka1/react-query/llmModelsDeactivateRegistryEntry.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.DeactivateModelRegistryEntryRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.DeactivateRegistryEntryResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listOrgAutoModels
Returns every endpoint for which this org has set its own "auto" target. Endpoints not listed fall through to the operator's YAML defaults.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.listOrgAutoModels();
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListOrgAutoModels } from "@meetkai/mka1/funcs/llmModelsListOrgAutoModels.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsListOrgAutoModels(sdk);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListOrgAutoModels failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsListOrgAutoModels,
useLlmModelsListOrgAutoModelsSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListOrgAutoModels,
// Utility to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateAllLlmModelsListOrgAutoModels,
} from "@meetkai/mka1/react-query/llmModelsListOrgAutoModels.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.ListOrgAutoModelsResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
putOrgAutoModel
Stores { endpoint → modelId } so subsequent requests with model: "auto" for the endpoint resolve to modelId instead of the operator's YAML default. The target must (a) not be the literal string "auto", (b) be active in this org's model registry, and (c) have the same apiFormat as the endpoint.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.putOrgAutoModel({
endpoint: "tts",
putOrgAutoModelRequest: {
modelId: "functionary",
},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsPutOrgAutoModel } from "@meetkai/mka1/funcs/llmModelsPutOrgAutoModel.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsPutOrgAutoModel(sdk, {
endpoint: "tts",
putOrgAutoModelRequest: {
modelId: "functionary",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsPutOrgAutoModel failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsPutOrgAutoModelMutation
} from "@meetkai/mka1/react-query/llmModelsPutOrgAutoModel.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.PutOrgAutoModelRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.OrgAutoModel>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
deleteOrgAutoModel
Removes the per-org override for the endpoint. Subsequent model: "auto" requests fall through to the operator's YAML default again.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.deleteOrgAutoModel({
endpoint: "tts",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsDeleteOrgAutoModel } from "@meetkai/mka1/funcs/llmModelsDeleteOrgAutoModel.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsDeleteOrgAutoModel(sdk, {
endpoint: "tts",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsDeleteOrgAutoModel failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsDeleteOrgAutoModelMutation
} from "@meetkai/mka1/react-query/llmModelsDeleteOrgAutoModel.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.DeleteOrgAutoModelRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.DeleteOrgAutoModelResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
getClusterCurrency
Returns the single cluster-wide ISO-4217 currency code (null if not set).
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.getClusterCurrency();
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsGetClusterCurrency } from "@meetkai/mka1/funcs/llmModelsGetClusterCurrency.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsGetClusterCurrency(sdk);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsGetClusterCurrency failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsGetClusterCurrency,
useLlmModelsGetClusterCurrencySuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsGetClusterCurrency,
// Utility to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateAllLlmModelsGetClusterCurrency,
} from "@meetkai/mka1/react-query/llmModelsGetClusterCurrency.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.ClusterCurrencyResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
setClusterCurrency
Sets the cluster-wide currency. Changing it does not auto-convert existing prices.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.setClusterCurrency({
currency: "Nakfa",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsSetClusterCurrency } from "@meetkai/mka1/funcs/llmModelsSetClusterCurrency.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsSetClusterCurrency(sdk, {
currency: "Nakfa",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsSetClusterCurrency failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsSetClusterCurrencyMutation
} from "@meetkai/mka1/react-query/llmModelsSetClusterCurrency.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.PutClusterCurrencyBody | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.ClusterCurrencyResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listClusterPrices
Without model, lists every model's current cluster-default price. With model, returns that model's full dated history.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.listClusterPrices({});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListClusterPrices } from "@meetkai/mka1/funcs/llmModelsListClusterPrices.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsListClusterPrices(sdk, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListClusterPrices failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsListClusterPrices,
useLlmModelsListClusterPricesSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListClusterPrices,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateLlmModelsListClusterPrices,
invalidateAllLlmModelsListClusterPrices,
} from "@meetkai/mka1/react-query/llmModelsListClusterPrices.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListClusterPricesRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.ListModelPricesResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
setClusterPrice
Upserts the cluster-default price for a model as a new dated version. rates is a flexible metric→rate map; omitted metrics are not charged.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.setClusterPrice({
model: "Cruze",
rates: {},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsSetClusterPrice } from "@meetkai/mka1/funcs/llmModelsSetClusterPrice.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsSetClusterPrice(sdk, {
model: "Cruze",
rates: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsSetClusterPrice failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsSetClusterPriceMutation
} from "@meetkai/mka1/react-query/llmModelsSetClusterPrice.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.PutModelPriceBody | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.ModelPriceRow>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
clearClusterPrice
Closes the cluster-default price. Active cluster lineage then uses an org override or becomes unpriced ($0).
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.clearClusterPrice({
model: "Alpine",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsClearClusterPrice } from "@meetkai/mka1/funcs/llmModelsClearClusterPrice.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsClearClusterPrice(sdk, {
model: "Alpine",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsClearClusterPrice failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsClearClusterPriceMutation
} from "@meetkai/mka1/react-query/llmModelsClearClusterPrice.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ClearClusterPriceRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.DeleteModelPriceResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listOrgPrices
Without model, lists the org's current overrides. With model, returns that override's dated history.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.listOrgPrices({
orgId: "<id>",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListOrgPrices } from "@meetkai/mka1/funcs/llmModelsListOrgPrices.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsListOrgPrices(sdk, {
orgId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListOrgPrices failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsListOrgPrices,
useLlmModelsListOrgPricesSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListOrgPrices,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateLlmModelsListOrgPrices,
invalidateAllLlmModelsListOrgPrices,
} from "@meetkai/mka1/react-query/llmModelsListOrgPrices.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListOrgPricesRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.ListModelPricesResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
setOrgPrice
Upserts a dated per-org price. Cluster lineage falls back to the cluster default; BYO and serving lineage become unpriced when no org row exists.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.setOrgPrice({
orgId: "<id>",
putModelPriceBody: {
model: "Roadster",
rates: {},
},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsSetOrgPrice } from "@meetkai/mka1/funcs/llmModelsSetOrgPrice.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsSetOrgPrice(sdk, {
orgId: "<id>",
putModelPriceBody: {
model: "Roadster",
rates: {},
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsSetOrgPrice failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsSetOrgPriceMutation
} from "@meetkai/mka1/react-query/llmModelsSetOrgPrice.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.SetOrgPriceRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.ModelPriceRow>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
clearOrgPrice
Closes a per-org price. Only active cluster lineage can then fall back to the cluster default.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.clearOrgPrice({
orgId: "<id>",
model: "XTS",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsClearOrgPrice } from "@meetkai/mka1/funcs/llmModelsClearOrgPrice.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsClearOrgPrice(sdk, {
orgId: "<id>",
model: "XTS",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsClearOrgPrice failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useLlmModelsClearOrgPriceMutation
} from "@meetkai/mka1/react-query/llmModelsClearOrgPrice.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ClearOrgPriceRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.DeleteModelPriceResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listEffectivePrices
For every active model, returns its registry-aware price: an org row, a cluster default for cluster lineage, or unpriced ($0).
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.models.listEffectivePrices({});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListEffectivePrices } from "@meetkai/mka1/funcs/llmModelsListEffectivePrices.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await llmModelsListEffectivePrices(sdk, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListEffectivePrices failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useLlmModelsListEffectivePrices,
useLlmModelsListEffectivePricesSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListEffectivePrices,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateLlmModelsListEffectivePrices,
invalidateAllLlmModelsListEffectivePrices,
} from "@meetkai/mka1/react-query/llmModelsListEffectivePrices.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListEffectivePricesRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.EffectivePricesResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |