Llm.Models
Overview
Available Operations
- list - List available models
- get - Retrieve a model
- addRegistryModel - Add a model to the registry
- listRegistryModels - List all registry models
- updateRegistryModel - Update a database model in the registry
- removeRegistryModel - Remove a database model from the registry
- getRegistryModel - Get a specific registry model
- checkRegistryModelHealth - Check health of a specific model
- listClusterRegistry - List the cluster registry catalog
- listClusterRegistryOrgGrants - List an org's cluster registry grants
- putClusterRegistryOrgGrants - Replace an org's cluster registry grants
- 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
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 | */* |
addRegistryModel
Adds a new database-sourced model to the registry. YAML models cannot be overridden.
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.addRegistryModel({
id: "meetkai:my-custom-chat-v1",
provider: "openai-compatible",
modelId: "my-custom-chat-v1",
displayName: "My Custom Chat v1",
baseUrl: "https://models.example.com/v1",
apiFormat: "responses",
apiProviderType: "groq",
created: 1704067200,
auth: {
type: "api-key",
value: "sk-your-provider-api-key",
},
capabilities: {
modalities: {
input: [
"text",
],
output: [
"text",
],
},
reasoning: true,
supportsTemperature: true,
supportsTopP: true,
},
contextWindow: 131072,
rpm: 120,
defaultParams: {
temperature: 0.2,
topP: 0.95,
},
hidden: false,
healthCheck: {
mode: "periodic",
intervalSeconds: 965416,
path: "/dev",
},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsAddRegistryModel } from "@meetkai/mka1/funcs/llmModelsAddRegistryModel.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 llmModelsAddRegistryModel(sdk, {
id: "meetkai:my-custom-chat-v1",
provider: "openai-compatible",
modelId: "my-custom-chat-v1",
displayName: "My Custom Chat v1",
baseUrl: "https://models.example.com/v1",
apiFormat: "responses",
apiProviderType: "meetkaiGateway",
created: 1704067200,
auth: {
type: "api-key",
value: "sk-your-provider-api-key",
},
capabilities: {
modalities: {
input: [
"text",
],
output: [
"text",
],
},
reasoning: true,
supportsTemperature: true,
supportsTopP: true,
},
contextWindow: 131072,
rpm: 120,
defaultParams: {
temperature: 0.2,
topP: 0.95,
},
hidden: false,
healthCheck: {
mode: "preflight",
path: "/bin",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsAddRegistryModel 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.
useLlmModelsAddRegistryModelMutation
} from "@meetkai/mka1/react-query/llmModelsAddRegistryModel.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | components.AddRegistryModelRequest | ✔️ | 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.RegistryModelResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listRegistryModels
Lists all models in the registry with full details including source and health status.
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.listRegistryModels();
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListRegistryModels } from "@meetkai/mka1/funcs/llmModelsListRegistryModels.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 llmModelsListRegistryModels(sdk);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListRegistryModels 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.
useLlmModelsListRegistryModels,
useLlmModelsListRegistryModelsSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListRegistryModels,
// Utility to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateAllLlmModelsListRegistryModels,
} from "@meetkai/mka1/react-query/llmModelsListRegistryModels.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.RegistryModelListResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
updateRegistryModel
Partially updates a database-sourced model. Only provided fields are changed; omitted fields are preserved. YAML models cannot be updated.
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.updateRegistryModel({
id: "meetkai:my-custom-chat-v1",
updateRegistryModelRequest: {
displayName: "My Custom Chat v2",
rpm: 240,
defaultParams: {
temperature: 0.1,
topP: 0.9,
},
},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsUpdateRegistryModel } from "@meetkai/mka1/funcs/llmModelsUpdateRegistryModel.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 llmModelsUpdateRegistryModel(sdk, {
id: "meetkai:my-custom-chat-v1",
updateRegistryModelRequest: {
displayName: "My Custom Chat v2",
rpm: 240,
defaultParams: {
temperature: 0.1,
topP: 0.9,
},
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsUpdateRegistryModel 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.
useLlmModelsUpdateRegistryModelMutation
} from "@meetkai/mka1/react-query/llmModelsUpdateRegistryModel.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.UpdateRegistryModelRequest | ✔️ | 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.RegistryModelResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
removeRegistryModel
Removes a database-sourced model. YAML models cannot be removed.
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.removeRegistryModel({
id: "meetkai:my-custom-chat-v1",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsRemoveRegistryModel } from "@meetkai/mka1/funcs/llmModelsRemoveRegistryModel.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 llmModelsRemoveRegistryModel(sdk, {
id: "meetkai:my-custom-chat-v1",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsRemoveRegistryModel 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.
useLlmModelsRemoveRegistryModelMutation
} from "@meetkai/mka1/react-query/llmModelsRemoveRegistryModel.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.RemoveRegistryModelRequest | ✔️ | 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.DeleteRegistryModelResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
getRegistryModel
Returns full model definition and health status for a specific model.
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.getRegistryModel({
id: "meetkai:my-custom-chat-v1",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsGetRegistryModel } from "@meetkai/mka1/funcs/llmModelsGetRegistryModel.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 llmModelsGetRegistryModel(sdk, {
id: "meetkai:my-custom-chat-v1",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsGetRegistryModel 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.
useLlmModelsGetRegistryModel,
useLlmModelsGetRegistryModelSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsGetRegistryModel,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateLlmModelsGetRegistryModel,
invalidateAllLlmModelsGetRegistryModel,
} from "@meetkai/mka1/react-query/llmModelsGetRegistryModel.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetRegistryModelRequest | ✔️ | 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.RegistryModelResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
checkRegistryModelHealth
Probes the model's provider endpoint and updates health status.
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.checkRegistryModelHealth({
id: "meetkai:my-custom-chat-v1",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsCheckRegistryModelHealth } from "@meetkai/mka1/funcs/llmModelsCheckRegistryModelHealth.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 llmModelsCheckRegistryModelHealth(sdk, {
id: "meetkai:my-custom-chat-v1",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsCheckRegistryModelHealth 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.
useLlmModelsCheckRegistryModelHealthMutation
} from "@meetkai/mka1/react-query/llmModelsCheckRegistryModelHealth.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.CheckRegistryModelHealthRequest | ✔️ | 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.HealthCheckResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listClusterRegistry
Cluster admin only. Lists every operator-provisioned model that ships with this deployment — the universe from which per-org grants are drawn. Org-registered models (under /models/registry) are not included; orgs already own those.
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.listClusterRegistry();
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListClusterRegistry } from "@meetkai/mka1/funcs/llmModelsListClusterRegistry.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 llmModelsListClusterRegistry(sdk);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListClusterRegistry 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.
useLlmModelsListClusterRegistry,
useLlmModelsListClusterRegistrySuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListClusterRegistry,
// Utility to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateAllLlmModelsListClusterRegistry,
} from "@meetkai/mka1/react-query/llmModelsListClusterRegistry.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.ListClusterRegistryResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listClusterRegistryOrgGrants
Cluster admin only. Returns the set of cluster-registry model ids this org is allowed to resolve. An empty array means the org cannot see any operator-provisioned models (it may still have its own database-registered models under /models/registry).
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.listClusterRegistryOrgGrants({
orgId: "org-acme",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsListClusterRegistryOrgGrants } from "@meetkai/mka1/funcs/llmModelsListClusterRegistryOrgGrants.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 llmModelsListClusterRegistryOrgGrants(sdk, {
orgId: "org-acme",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsListClusterRegistryOrgGrants 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.
useLlmModelsListClusterRegistryOrgGrants,
useLlmModelsListClusterRegistryOrgGrantsSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchLlmModelsListClusterRegistryOrgGrants,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateLlmModelsListClusterRegistryOrgGrants,
invalidateAllLlmModelsListClusterRegistryOrgGrants,
} from "@meetkai/mka1/react-query/llmModelsListClusterRegistryOrgGrants.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListClusterRegistryOrgGrantsRequest | ✔️ | 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.ListClusterRegistryGrantsResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
putClusterRegistryOrgGrants
Cluster admin only. Idempotent full replacement: model ids in the body are granted, anything currently granted but missing from the body is revoked. Empty modelIds array revokes all cluster-registry access for the org. Returns the resulting grant 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.putClusterRegistryOrgGrants({
orgId: "org-acme",
putClusterRegistryGrantsRequest: {
modelIds: [
"openai:gpt-4.1-mini",
"openai:gpt-4o-mini",
],
},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmModelsPutClusterRegistryOrgGrants } from "@meetkai/mka1/funcs/llmModelsPutClusterRegistryOrgGrants.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 llmModelsPutClusterRegistryOrgGrants(sdk, {
orgId: "org-acme",
putClusterRegistryGrantsRequest: {
modelIds: [
"openai:gpt-4.1-mini",
"openai:gpt-4o-mini",
],
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("llmModelsPutClusterRegistryOrgGrants 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.
useLlmModelsPutClusterRegistryOrgGrantsMutation
} from "@meetkai/mka1/react-query/llmModelsPutClusterRegistryOrgGrants.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.PutClusterRegistryOrgGrantsRequest | ✔️ | 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.PutClusterRegistryGrantsResponse>
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 resolvable for this org (a granted cluster-registry model or one of the org's own DB-registered models), 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: "openai:tts-1",
},
});
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: "openai:tts-1",
},
});
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 | */* |