MeetKai.MKA1
0.10.30
dotnet add package MeetKai.MKA1 --version 0.10.30
NuGet\Install-Package MeetKai.MKA1 -Version 0.10.30
<PackageReference Include="MeetKai.MKA1" Version="0.10.30" />
<PackageVersion Include="MeetKai.MKA1" Version="0.10.30" />
<PackageReference Include="MeetKai.MKA1" />
paket add MeetKai.MKA1 --version 0.10.30
#r "nuget: MeetKai.MKA1, 0.10.30"
#:package MeetKai.MKA1@0.10.30
#addin nuget:?package=MeetKai.MKA1&version=0.10.30
#tool nuget:?package=MeetKai.MKA1&version=0.10.30
MKA1
Developer-friendly & type-safe Csharp SDK specifically catered to leverage MKA1 API.
<br /><br />
This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your workspace. Delete this section before > publishing to a package manager.
Summary
MKA1 API: The MKA1 API is a RESTful API that provides access to the MKA1 platform. Learn how to get started with the API and the TypeScript SDK here.
Table of Contents
SDK Installation
To add a reference to a local instance of the SDK in a .NET project:
dotnet add reference src/MeetKai/MKA1/MeetKai.MKA1.csproj
SDK Example Usage
Example
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Permissions.Llm.GrantAsync(body: new GrantPermissionRequest() {
ResourceType = LlmResourceType.Completion,
ResourceId = "my-completion-123",
UserId = "user-abc456",
Role = ResourceRole.Writer,
});
// handle response
Authentication
Per-Client Security Schemes
This SDK supports the following security scheme globally:
| Name | Type | Scheme |
|---|---|---|
BearerAuth |
http | HTTP Bearer |
To authenticate with the API the BearerAuth parameter must be set when initializing the SDK client instance. For example:
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Permissions.Llm.GrantAsync(body: new GrantPermissionRequest() {
ResourceType = LlmResourceType.Completion,
ResourceId = "my-completion-123",
UserId = "user-abc456",
Role = ResourceRole.Writer,
});
// handle response
Per-Operation Security Schemes
Some operations in this SDK require the security scheme to be specified at the request level. For example:
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK();
var res = await sdk.Auth.Orgs.GetByIdAsync(
security: new GetOrgByIdSecurity() {
}, orgId: "<id>"
);
// handle response
Available Resources and Operations
<details open> <summary>Available methods</summary>
AgentConnectors
- ListAgentConnectors - List connectors for an agent
- CreateAgentConnector - Create a connector
- SetupWhatsAppAppWebhook - Set up a WhatsApp app webhook (Beta)
- GetAgentConnector - Retrieve a connector
- DeleteAgentConnector - Delete a connector
- ActivateAgentConnector - Activate a connector
AgentRuns
- ListAgentRuns - List runs for an agent
- CreateAgentRun - Start a saved agent run
- StreamAgentRunEvents - Stream agent run events
- WakeAgentRun - Wake a sleeping agent run
- DecideAgentRunMcpApproval - Approve or deny a pending MCP tool call
- GetAgentRun - Retrieve an agent run
AgentSchedules
- ListAgentSchedules - List schedules for an agent
- CreateAgentSchedule - Create an agent schedule
- GetAgentSchedule - Retrieve an agent schedule
- UpdateAgentSchedule - Update an agent schedule
- DeleteAgentSchedule - Delete an agent schedule
- PauseAgentSchedule - Pause an agent schedule
- ResumeAgentSchedule - Resume an agent schedule
AgentVersions
- ListAgentVersions - List agent versions
- GetAgentVersion - Retrieve an agent version
- RollbackAgentVersion - Roll back an agent to a version
Agents
- ListAgents - List agents
- CreateAgent - Create an agent
- GetAgent - Retrieve an agent
- UpdateAgent - Update an agent
- DeleteAgent - Delete an agent
Auth.ApiKey
GetJwtFromKey- Exchange API key for a JWT token ⚠️ Deprecated Use ExchangeToken instead.
Auth.ApiKeys
- Create - Mint a scoped API key
- List - List scoped API keys
- Update - Update a scoped API key
- Regenerate - Rotate a scoped API key's secret
- ExchangeToken - Exchange API key for a JWT token
Auth.Cluster
- CreateInvite - Create a cluster invitation
- ListInvites - List cluster invitations
- UpdateInvite - Update a pending cluster invitation
- RevokeInvite - Revoke a cluster invitation
- ListOrgs - List all organizations
- GetOrg - Get an organization
- DeleteOrg - Soft-delete an organization
- SuspendOrg - Suspend an organization
- UnsuspendOrg - Unsuspend an organization
- ReissueOwnerKey - Re-issue an org owner key (recovery)
- InviteInfo - Read cluster-invite info (public)
- AcceptInvite - Accept a cluster invitation (public)
Auth.Orgs
- GetById - Get basic organization details
- Update - Patch organization metadata (cluster-admin)
- GetQuota - Get an org's usage quota
- UpdateQuota - Set an org's usage quota (cluster-admin)
- GetRateLimit - Get an org's rate limit
- UpdateRateLimit - Set an org's rate limit (cluster-admin)
Auth.ServiceAccounts
- Create - Create a service account
- List - List service accounts
- Get - Get a service account
- Delete - Delete a service account
- ListApiKeys - List a service account's API keys
- UpdateApiKey - Update a service-account API key
- DeleteApiKey - Delete a service-account API key
- RegenerateApiKey - Rotate a service-account API key's secret
Auth.Teams
- Create - Create a team
- List - List teams in an org
- Get - Get a team
- Update - Rename a team
- Delete - Delete a team
- AddMember - Add a team member
- ListMembers - List team members
- RemoveMember - Remove a team member
Budgets
- List - List budgets
- GetOrg - List org budgets
- SetOrg - Set an org budget
- DeleteOrg - Delete an org budget
- OrgEvents - List org budget events
- GetApiKey - List apikey budgets
- SetApiKey - Set an apikey budget
- DeleteApiKey - Delete an apikey budget
- ApiKeyEvents - List apikey budget events
- GetUser - List user budgets
- SetUser - Set a user budget
- DeleteUser - Delete a user budget
- UserEvents - List user budget events
- GetTeam - List team budgets
- SetTeam - Set a team budget
- DeleteTeam - Delete a team budget
- TeamEvents - List team budget events
- GetExternalUser - List external user budgets
- SetExternalUser - Set a external user budget
- DeleteExternalUser - Delete a external user budget
- ExternalUserEvents - List external user budget events
- GetUserDefault - List per-user default budgets
- SetUserDefault - Set a per-user default budget
- DeleteUserDefault - Delete a per-user default budget
- UserDefaultEvents - List per-user default budget events
- GetTeamDefault - List per-team default budgets
- SetTeamDefault - Set a per-team default budget
- DeleteTeamDefault - Delete a per-team default budget
- TeamDefaultEvents - List per-team default budget events
- GetExternalUserDefault - List per-external user default budgets
- SetExternalUserDefault - Set a per-external user default budget
- DeleteExternalUserDefault - Delete a per-external user default budget
- ExternalUserDefaultEvents - List per-external user default budget events
- GetCurrency - Get display currency
- SetCurrency - Set display currency
ComputeCatalog
- ListAccelerators - List accelerators
- GetAccelerator - Get an accelerator
- ListComputeOffers - List provider offers
- ListComputeProviders - List provider health
- CreateComputeQuote - Create a quote
ComputeJobs
- ListJobs - List jobs
- CreateJob - Create a job
- GetJob - Get a job
- ListJobEvents - List job events
- ListJobInstances - List observed job instances
- ListJobLogs - List job logs
- TerminateJob - Terminate a job
ComputePricing
- GetPricing - Get the latest committed storage price
- PutPricing - Create an immutable storage-price version
ComputeSecrets
- ListComputeSecrets - List secrets
- CreateComputeSecret - Create a secret
- DeleteComputeSecret - Delete a secret
- GetComputeSecret - Get a secret
ComputeServices
- ListServices - List services
- CreateService - Create a service
- GetService - Get a service
- ListServiceEvents - List service events
- ListServiceInstances - List observed service instances
- ListServiceLogs - List service logs
- TerminateService - Terminate a service
ComputeTenants
- ListComputeTenants - List tenants
- GetComputeTenant - Get a tenant
- PutComputeTenant - Update a tenant
ComputeUsage
- GetComputeUsage - Get usage
ComputeVolumes
- ListStandaloneVolumes - List organization volumes
- CreateStandaloneVolume - Create a standalone shared volume
- DeleteStandaloneVolume - Permanently delete a standalone volume
- GetStandaloneVolume - Get a standalone volume
- ListStandaloneVolumeAttachments - List volume attachments
Guardrails
- GetGuardrails - Get effective guardrails
- UpdateGuardrails - Update guardrails policy
- DeleteGuardrails - Delete guardrails policy
- ListGuardrailsPolicies - List guardrails policies
- TestGuardrails - Test content against guardrails
Llm.Batches
Llm.Chat
CreateChat- [Deprecated] Chat completions for OpenAI SDK/client usage ⚠️ DeprecatedStream- [Deprecated] Streaming chat completions for generated SDK usage ⚠️ Deprecated
Llm.Classify
- Classify - Classify text into predefined categories
Llm.Conversations
- Create - Create a conversation
- List - List conversations
- Get - Retrieve a conversation
- Update - Update a conversation
- Delete - Delete a conversation
- ListItems - List conversation items
- CreateItems - Create conversation items
- DeleteItems - Delete multiple conversation items
- GetItem - Retrieve a conversation item
- DeleteItem - Delete a conversation item
Llm.Embeddings
- ListModels - List available embedding models
- Embed - Create text embeddings
Llm.Evals
- CreateSuite - Create an eval suite
- ListSuites - List eval suites
- GetSuite - Get an eval suite
- DeleteSuite - Delete an eval suite
- CreateSuiteVersion - Create an eval suite version
- ListSuiteVersions - List eval suite versions
- GetSuiteVersion - Get an eval suite version
- ListSuiteLeaderboardRuns - List leaderboard runs for an eval suite
- GetSuiteLeaderboard - Get the coding-agent leaderboard for an eval suite
- CreateRun - Create an eval run
- ListRuns - List eval runs
- GetRun - Get an eval run
- DeleteRun - Delete an eval run
- CancelRun - Cancel an eval run
- RerunFailedSamples - Rerun failed eval samples
- RetryFailedRun - Retry an eval run
- GetRunOverview - Get an eval run overview
- ListSamples - List eval samples
- GetSampleAudio - Get eval sample audio
- GetSampleTrajectory - Get an eval sample trajectory
- UploadSampleTrajectory - Upload an eval sample trajectory
- GetArtifacts - Get eval run artifacts
- ImportAgentRun - Import a finished coding-agent run
- AppendAgentTrials - Append trials to an open coding-agent run
- ImportHistoricalResults - Import historical eval results from Hugging Face
- CreateSchedule - Create an eval schedule
- ListSchedules - List eval schedules
- GetSchedule - Get an eval schedule
- UpdateSchedule - Update an eval schedule
- DeleteSchedule - Delete an eval schedule
- TriggerSchedule - Trigger an eval schedule now
- ListScheduleRuns - List runs created by an eval schedule
Llm.Extract
- Extract - Extract structured data with inline JSON Schema
- CreateSchema - Create reusable extraction schema template
- GetSchema - Get extraction schema by ID
- UpdateSchema - Update extraction schema by ID
- DeleteSchema - Delete extraction schema by ID
- ExtractWithSchema - Extract data using saved schema template
Llm.Feedback
- CreateCompletionFeedback - Submit feedback for chat completion
- ListCompletionFeedback - List chat completion feedback
- GetCompletionFeedback - Retrieve feedback by completion ID
- UpdateCompletionFeedback - Update existing completion feedback
- BatchGetCompletionFeedback - Batch retrieve feedback for multiple completions
- CreateResponseFeedback - Submit feedback for response
- ListResponseFeedback - List response feedback
- GetResponseFeedback - Retrieve feedback by response ID
- UpdateResponseFeedback - Update existing response feedback
- BatchGetResponseFeedback - Batch retrieve feedback for multiple responses
- ExportCompletionFeedback - Export completion feedback as CSV
- ExportResponseFeedback - Export response feedback as CSV
- StartExport - Start feedback export
- GetExportStatus - Get feedback export status
Llm.Files
- Upload - Upload file
- List - List files
- Get - Retrieve file
- Delete - Delete file
- Content - Retrieve file content
Llm.FineTuning
- Create - Create a fine-tuning job
- List - List fine-tuning jobs
- Retrieve - Retrieve a fine-tuning job
- Cancel - Cancel a fine-tuning job
- Pause - Pause a fine-tuning job
- Resume - Resume a fine-tuning job
- ListEvents - List fine-tuning events
- ListCheckpoints - List fine-tuning checkpoints
Llm.Images
- Create - Generate images from text descriptions
Llm.McpVault
- CreateServer - Create MCP server
- ListServers - List MCP servers
- GetServer - Retrieve MCP server
- UpdateServer - Update MCP server
- DeleteServer - Delete MCP server
- CreateCredential - Create MCP credential
- ListCredentials - List MCP credentials
- DeleteCredential - Delete MCP credential
- TestServer - Test MCP server
Llm.MemoryStores
- Create - Create memory store
- List - List memory stores
- Get - Retrieve memory store
- Update - Update memory store
- Delete - Delete memory store
- CreateEntry - Create memory entry
- ListEntries - List memory entries
- GetEntry - Retrieve memory entry
- UpdateEntry - Update memory entry
- DeleteEntry - Delete memory entry
Llm.Models
- 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 policy 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
Llm.Prompts
- Create - Create a prompt
- List - List prompts
- Get - Get a prompt
- Update - Update a prompt
- Delete - Delete a prompt
- CreateVersion - Create a new version
- ListVersions - List versions
- GetVersion - Get a specific version
- Rollback - Rollback to a version
Llm.Responses
- Create - Create an agent-powered response with tool support
- List - List all responses with pagination
- Get - Retrieve response by ID with status and results
- Update - Update a response
- Delete - Permanently delete a response and its data
- Cancel - Cancel an in-progress background response
- Wake - Wake a sleeping background response
- ListInputItems - List paginated input items for a response
- Compact - Compact a conversation
Llm.Skills
- Create - Create skill
- List - List skills
- Get - Retrieve skill
- Update - Update skill
- Delete - Delete skill
- Content - Download skill content
- CreateVersion - Create skill version
- ListVersions - List skill versions
- GetVersion - Retrieve skill version
- DeleteVersion - Delete skill version
- VersionContent - Download skill version content
- ListPreconfigured - List preconfigured skills
Llm.Speech
- Transcribe - Speech to text transcription
- Speak - Text to speech
- SpeakStreaming - Streaming text to speech
- LivekitToken - Generate LiveKit room token
- ListTtsHistory - List text-to-speech history
- GetTtsHistory - Retrieve text-to-speech history item
- DeleteTtsHistory - Delete text-to-speech history item
- GetTtsHistoryContent - Retrieve text-to-speech audio
- ListTranscriptionHistory - List speech-to-text history
- GetTranscriptionHistory - Retrieve speech-to-text history item
- DeleteTranscriptionHistory - Delete speech-to-text history item
- GetTranscriptionHistoryContent - Retrieve speech-to-text audio
Llm.Usage
- Completions - Get completions usage
- Responses - Get responses usage
- Conversations - Get conversations usage
- Embeddings - Get embeddings usage
- Extract - Get extract usage
- Classify - Get classify usage
- VectorStores - Get vector stores usage
- Files - Get files usage
- Costs - Get cost by model
Llm.VectorStores
- Create - Create a vector store
- List - List vector stores
- Get - Retrieve a vector store
- Update - Modify a vector store
- Delete - Delete a vector store
- Search - Search a vector store
- CreateFile - Add a file to a vector store
- ListFiles - List files in a vector store
- GetFile - Retrieve a vector store file
- UpdateFile - Update file attributes
- DeleteFile - Remove file from vector store
- GetFileContent - Retrieve parsed file content
- CreateFileBatch - Batch add multiple files to vector store
- GetFileBatch - Retrieve file batch status
- CancelFileBatch - Cancel batch file processing
- ListFilesInBatch - List files in a batch
Permissions.Llm
- Grant - Grant permission to a user or make public
- Revoke - Revoke permission from a user or remove public access
- Check - Check user permission
Repos
- List - List the caller's org's repositories
- Create - Create a repository
- Delete - Delete a repository
- Get - Get a repository
- Update - Update a repository's labels
Sandbox
- Create - Create Session
- List - List Sessions
- Get - Get Session
- GetPricing - Get Sandbox Pricing
- SetPricing - Set Sandbox Pricing
- GetBrowserUrl - Get Browser Session URL
GetUrl- Get Browser Session URL (Deprecated) ⚠️ Deprecated Use GetBrowserUrl instead.- ProxyBrowserPortRequest - Proxy Browser Port Request
- RunCommand - Run Command
- RunCode - Run Code
- Terminate - Terminate Session
- GetWorkspace - Get Workspace Manifest
- DownloadFile - Download Workspace File
- UploadFile - Upload Workspace File
- DownloadArchive - Download Workspace Archive
- UploadArchive - Upload Workspace Archive
Schema3Other
- CreateIntentApiV1SandboxGithubOauthIntentsPost - Create Intent
- ConnectApiV1SandboxGithubOauthConnectionsPost - Connect
- GetConnectionApiV1SandboxGithubOauthConnectionsGet - Get Connection
- DisconnectApiV1SandboxGithubOauthConnectionsDelete - Disconnect
- ListRepositoriesApiV1SandboxGithubRepositoriesGet - List Repositories
- RefreshRepositoriesApiV1SandboxGithubRepositoriesRefreshPost - Refresh Repositories
- ResolveReferenceApiV1SandboxGithubRepositoriesResolvePost - Resolve Reference
- ReadCloneApiV1SandboxSessionsSessionIdGithubReadClonePost - Read Clone
- ManifestApiV1SandboxSessionsSessionIdGithubRepositoriesGet - Manifest
- PutRepositoryApiV1SandboxSessionsSessionIdGithubRepositoriesRepositoryIdPut - Put Repository
- DismissRepositoryApiV1SandboxSessionsSessionIdGithubRepositoriesRepositoryIdDelete - Dismiss Repository
- ListEnvironmentsApiV1SandboxEnvironmentsGet - List Environments
- CreateEnvironmentApiV1SandboxEnvironmentsPost - Create Environment
- GetEnvironmentApiV1SandboxEnvironmentsEnvironmentIdGet - Get Environment
- UpdateEnvironmentApiV1SandboxEnvironmentsEnvironmentIdPut - Update Environment
- DeleteEnvironmentApiV1SandboxEnvironmentsEnvironmentIdDelete - Delete Environment
- RunEnvironmentSetupApiV1SandboxSessionsSessionIdEnvironmentSetupPost - Run Environment Setup
- PushApiV1SandboxSessionsSessionIdGithubPushPost - Push
- CreateOrUpdateApiV1SandboxSessionsSessionIdGithubPullRequestPost - Create Or Update
Session
- ExchangeSessionToken - Exchange a live session for a delegated access token
Usage
</details>
Server-sent event streaming
Server-sent events (SSE) are used to stream content from certain operations. SSE is a web standard that allows a server to push data to a client over a single HTTP connection in real-time.
These operations return an instance of EventStream, which implements IDisposable. It should be consumed using the RAII (Resource Acquisition Is Initialization) pattern. The recommended approach is to use a using statement, which ensures that the stream is properly disposed of when you're done with it, even if an exception occurs. Alternatively, you can manually call Dispose() on the EventStream object when finished.
The EventStream instance can be consumed by repeatedly calling Next() until it returns null, indicating the end of the stream.
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Llm.Responses.CreateAsync(body: new ResponsesCreateRequest() {
Model = "meetkai:functionary-urdu-mini-pak",
Input = ResponsesCreateRequestInput.CreateStr(
"What is the capital of France?"
),
});
// Handle event stream response
if (res.Object != null)
{
using (var eventStream = res.Object)
{
CreateResponseResponseBody? eventData;
while ((eventData = await eventStream.Next()) != null)
{
// handle eventData
}
}
}
// Handle JSON response
else if (res.ResponseObject != null)
{
// handle JSON response
var jsonResponse = res.ResponseObject;
}
Retries
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
To change the default retry strategy for a single API call, simply pass a RetryConfig to the call:
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Permissions.Llm.GrantAsync(
retryConfig: new RetryConfig(
strategy: RetryConfig.RetryStrategy.BACKOFF,
backoff: new BackoffStrategy(
initialIntervalMs: 1L,
maxIntervalMs: 50L,
maxElapsedTimeMs: 100L,
exponent: 1.1
),
retryConnectionErrors: false
),
body: new GrantPermissionRequest() {
ResourceType = LlmResourceType.Completion,
ResourceId = "my-completion-123",
UserId = "user-abc456",
Role = ResourceRole.Writer,
}
);
// handle response
If you'd like to override the default retry strategy for all operations that support retries, you can use the RetryConfig optional parameter when intitializing the SDK:
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(
retryConfig: new RetryConfig(
strategy: RetryConfig.RetryStrategy.BACKOFF,
backoff: new BackoffStrategy(
initialIntervalMs: 1L,
maxIntervalMs: 50L,
maxElapsedTimeMs: 100L,
exponent: 1.1
),
retryConnectionErrors: false
),
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>"
);
var res = await sdk.Permissions.Llm.GrantAsync(body: new GrantPermissionRequest() {
ResourceType = LlmResourceType.Completion,
ResourceId = "my-completion-123",
UserId = "user-abc456",
Role = ResourceRole.Writer,
});
// handle response
Error Handling
SDKException is the base exception class for all HTTP error responses. It has the following properties:
| Property | Type | Description |
|---|---|---|
Message |
string | Error message |
Request |
HttpRequestMessage | HTTP request object |
Response |
HttpResponseMessage | HTTP response object |
Some exceptions in this SDK include an additional Payload field, which will contain deserialized custom error data when present. Possible exceptions are listed in the Error Classes section.
Example
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using MeetKai.MKA1.Types.Errors;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
try
{
var res = await sdk.Llm.Files.ContentAsync(fileId: "file-abc123");
// handle response
}
catch (SDKException ex) // all SDK exceptions inherit from SDKException
{
// ex.ToString() provides a detailed error message
System.Console.WriteLine(ex);
// Base exception fields
HttpRequestMessage request = ex.Request;
HttpResponseMessage response = ex.Response;
var statusCode = (int)response.StatusCode;
var responseBody = ex.Body;
if (ex is GetFileContentBadRequestException) // different exceptions may be thrown depending on the method
{
// Check error data fields
GetFileContentBadRequestExceptionPayload payload = ex.Payload;
BadRequestError Error = payload.Error;
HTTPMetadata HttpMeta = payload.HttpMeta;
}
// An underlying cause may be provided
if (ex.InnerException != null)
{
Exception cause = ex.InnerException;
}
}
catch (OperationCanceledException ex)
{
// CancellationToken was cancelled
}
catch (System.Net.Http.HttpRequestException ex)
{
// Check ex.InnerException for Network connectivity errors
}
Error Classes
Primary exception:
SDKException: The base class for HTTP error responses.
<details><summary>Less common exceptions (295)</summary>
System.Net.Http.HttpRequestException: Network connectivity error. For more details about the underlying cause, inspect theex.InnerException.Inheriting from
SDKException:HTTPValidationError: Validation Error. Status code422. Applicable to 30 of 384 methods.*ErrorEnvelope: Error response. Applicable to 27 of 384 methods.*RepoError: The uniform error envelope.erroris a stable machine-readable code (never an internal reason);correlation_idechoes the request'sX-Correlation-IDfor log correlation. Applicable to 5 of 384 methods.*ExchangeSessionTokenBadRequestException: Invalid request. Status code400. Applicable to 1 of 384 methods.*GetFileContentBadRequestException: Invalid request - File ID is required. Status code400. Applicable to 1 of 384 methods.*CreateScopedApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*ListScopedApiKeysBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*UpdateScopedApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*RegenerateScopedApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*ExchangeApiKeyTokenBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*CreateTeamBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*ListTeamsBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*GetTeamBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*UpdateTeamBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*DeleteTeamBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*AddTeamMemberBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*ListTeamMembersBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*RemoveTeamMemberBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*CreateServiceAccountBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*ListServiceAccountsBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*GetServiceAccountBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*DeleteServiceAccountBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*ListServiceAccountApiKeysBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*UpdateServiceAccountApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*DeleteServiceAccountApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*RegenerateServiceAccountApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*GetOrgByIdBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*UpdateOrganizationBadRequestException: Invalid JSON or metadata patch. Status code400. Applicable to 1 of 384 methods.*GetOrgQuotaBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*UpdateOrgQuotaBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*GetOrgRateLimitBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*UpdateOrgRateLimitBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*CreateClusterInviteBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*ListClusterInvitesBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*UpdateClusterInviteBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*RevokeClusterInviteBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*ListClusterOrgsBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*GetClusterOrgBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*DeleteClusterOrgBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*SuspendClusterOrgBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*UnsuspendClusterOrgBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*ReissueOwnerKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*GetClusterInviteInfoBadRequestException: Bad request. Status code400. Applicable to 1 of 384 methods.*AcceptClusterInviteBadRequestException: Bad request.code: "reserved_org_slug"distinguishes a slug that nobody may hold from the 409 returned when another org already holds it. Status code400. Applicable to 1 of 384 methods.*GetJwtFromKeyBadRequestException: Invalid request body. Status code400. Applicable to 1 of 384 methods.*ExchangeSessionTokenUnauthorizedException: Missing, invalid, revoked or expiring session. Status code401. Applicable to 1 of 384 methods.*GetFileContentUnauthorizedException: Unauthorized - Invalid or missing authentication. Status code401. Applicable to 1 of 384 methods.*CreateScopedApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*ListScopedApiKeysUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*UpdateScopedApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*RegenerateScopedApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*ExchangeApiKeyTokenUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*CreateTeamUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*ListTeamsUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*GetTeamUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*UpdateTeamUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*DeleteTeamUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*AddTeamMemberUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*ListTeamMembersUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*RemoveTeamMemberUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*CreateServiceAccountUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*ListServiceAccountsUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*GetServiceAccountUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*DeleteServiceAccountUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*ListServiceAccountApiKeysUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*UpdateServiceAccountApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*DeleteServiceAccountApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*RegenerateServiceAccountApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*GetOrgByIdUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*UpdateOrganizationUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*GetOrgQuotaUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*UpdateOrgQuotaUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*GetOrgRateLimitUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*UpdateOrgRateLimitUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*CreateClusterInviteUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*ListClusterInvitesUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*UpdateClusterInviteUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*RevokeClusterInviteUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*ListClusterOrgsUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*GetClusterOrgUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*DeleteClusterOrgUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*SuspendClusterOrgUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*UnsuspendClusterOrgUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*ReissueOwnerKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*GetClusterInviteInfoUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*AcceptClusterInviteUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*GetJwtFromKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 384 methods.*ExchangeSessionTokenForbiddenException: Active organization or team is missing or inaccessible. Status code403. Applicable to 1 of 384 methods.*CreateScopedApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*ListScopedApiKeysForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*UpdateScopedApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*RegenerateScopedApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*ExchangeApiKeyTokenForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*CreateTeamForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*ListTeamsForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*GetTeamForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*UpdateTeamForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*DeleteTeamForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*AddTeamMemberForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*ListTeamMembersForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*RemoveTeamMemberForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*CreateServiceAccountForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*ListServiceAccountsForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*GetServiceAccountForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*DeleteServiceAccountForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*ListServiceAccountApiKeysForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*UpdateServiceAccountApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*DeleteServiceAccountApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*RegenerateServiceAccountApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*GetOrgByIdForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*UpdateOrganizationForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*GetOrgQuotaForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*UpdateOrgQuotaForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*GetOrgRateLimitForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*UpdateOrgRateLimitForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*CreateClusterInviteForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*ListClusterInvitesForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*UpdateClusterInviteForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*RevokeClusterInviteForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*ListClusterOrgsForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*GetClusterOrgForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*DeleteClusterOrgForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*SuspendClusterOrgForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*UnsuspendClusterOrgForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*ReissueOwnerKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*GetClusterInviteInfoForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*AcceptClusterInviteForbiddenException: Forbidden. Status code403. Applicable to 1 of 384 methods.*GetFileContentNotFoundException: File not found. Status code404. Applicable to 1 of 384 methods.*CreateScopedApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*ListScopedApiKeysNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*UpdateScopedApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*RegenerateScopedApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*ExchangeApiKeyTokenNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*CreateTeamNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*ListTeamsNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*GetTeamNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*UpdateTeamNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*DeleteTeamNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*AddTeamMemberNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*ListTeamMembersNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*RemoveTeamMemberNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*CreateServiceAccountNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*ListServiceAccountsNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*GetServiceAccountNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*DeleteServiceAccountNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*ListServiceAccountApiKeysNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*UpdateServiceAccountApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*DeleteServiceAccountApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*RegenerateServiceAccountApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*GetOrgByIdNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*UpdateOrganizationNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*GetOrgQuotaNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*UpdateOrgQuotaNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*GetOrgRateLimitNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*UpdateOrgRateLimitNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*CreateClusterInviteNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*ListClusterInvitesNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*UpdateClusterInviteNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*RevokeClusterInviteNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*ListClusterOrgsNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*GetClusterOrgNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*DeleteClusterOrgNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*SuspendClusterOrgNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*UnsuspendClusterOrgNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*ReissueOwnerKeyNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*GetClusterInviteInfoNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*AcceptClusterInviteNotFoundException: Not found. Status code404. Applicable to 1 of 384 methods.*CreateScopedApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*ListScopedApiKeysConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*UpdateScopedApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*RegenerateScopedApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*ExchangeApiKeyTokenConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*CreateTeamConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*ListTeamsConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*GetTeamConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*UpdateTeamConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*DeleteTeamConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*AddTeamMemberConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*ListTeamMembersConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*RemoveTeamMemberConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*CreateServiceAccountConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*ListServiceAccountsConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*GetServiceAccountConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*DeleteServiceAccountConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*ListServiceAccountApiKeysConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*UpdateServiceAccountApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*DeleteServiceAccountApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*RegenerateServiceAccountApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*GetOrgByIdConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*UpdateOrganizationConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*GetOrgQuotaConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*UpdateOrgQuotaConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*GetOrgRateLimitConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*UpdateOrgRateLimitConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*CreateClusterInviteConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*ListClusterInvitesConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*UpdateClusterInviteConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*RevokeClusterInviteConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*ListClusterOrgsConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*GetClusterOrgConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*DeleteClusterOrgConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*SuspendClusterOrgConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*UnsuspendClusterOrgConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*ReissueOwnerKeyConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*GetClusterInviteInfoConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*AcceptClusterInviteConflictException: Conflict. Status code409. Applicable to 1 of 384 methods.*CreateScopedApiKeyGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*ListScopedApiKeysGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*UpdateScopedApiKeyGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*RegenerateScopedApiKeyGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*ExchangeApiKeyTokenGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*CreateTeamGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*ListTeamsGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*GetTeamGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*UpdateTeamGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*DeleteTeamGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*AddTeamMemberGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*ListTeamMembersGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*RemoveTeamMemberGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*CreateServiceAccountGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*ListServiceAccountsGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*GetServiceAccountGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*DeleteServiceAccountGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*ListServiceAccountApiKeysGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*UpdateServiceAccountApiKeyGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*DeleteServiceAccountApiKeyGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*RegenerateServiceAccountApiKeyGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*GetOrgByIdGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*UpdateOrganizationGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*GetOrgQuotaGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*UpdateOrgQuotaGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*GetOrgRateLimitGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*UpdateOrgRateLimitGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*CreateClusterInviteGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*ListClusterInvitesGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*UpdateClusterInviteGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*RevokeClusterInviteGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*ListClusterOrgsGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*GetClusterOrgGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*DeleteClusterOrgGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*SuspendClusterOrgGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*UnsuspendClusterOrgGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*ReissueOwnerKeyGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*GetClusterInviteInfoGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*AcceptClusterInviteGoneException: Gone. Status code410. Applicable to 1 of 384 methods.*ExchangeSessionTokenRequestEntityTooLargeException: Request body exceeds the endpoint's 4 KiB limit. Status code413. Applicable to 1 of 384 methods.*UpdateOrganizationRequestEntityTooLargeException: Request or merged metadata exceeds 64 KiB. Status code413. Applicable to 1 of 384 methods.*ExchangeSessionTokenTooManyRequestsException: Per-session or per-user mint rate exceeded. Status code429. Applicable to 1 of 384 methods.*CreateScopedApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*ListScopedApiKeysTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*UpdateScopedApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*RegenerateScopedApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*ExchangeApiKeyTokenTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*CreateTeamTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*ListTeamsTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*GetTeamTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*UpdateTeamTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*DeleteTeamTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*AddTeamMemberTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*ListTeamMembersTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*RemoveTeamMemberTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*CreateServiceAccountTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*ListServiceAccountsTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*GetServiceAccountTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*DeleteServiceAccountTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*ListServiceAccountApiKeysTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*UpdateServiceAccountApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*DeleteServiceAccountApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*RegenerateServiceAccountApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*GetOrgByIdTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*UpdateOrganizationTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*GetOrgQuotaTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*UpdateOrgQuotaTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*GetOrgRateLimitTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*UpdateOrgRateLimitTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*CreateClusterInviteTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*ListClusterInvitesTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*UpdateClusterInviteTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*RevokeClusterInviteTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*ListClusterOrgsTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*GetClusterOrgTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*DeleteClusterOrgTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*SuspendClusterOrgTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*UnsuspendClusterOrgTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*ReissueOwnerKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*GetClusterInviteInfoTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*AcceptClusterInviteTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 384 methods.*ExchangeSessionTokenInternalServerError: Internal server error. Status code500. Applicable to 1 of 384 methods.*GetFileContentInternalServerError: Internal server error. Status code500. Applicable to 1 of 384 methods.*GetOrgByIdInternalServerError: Stored organization metadata is invalid. Status code500. Applicable to 1 of 384 methods.*UpdateOrganizationInternalServerError: Stored organization metadata is invalid. Status code500. Applicable to 1 of 384 methods.*GetJwtFromKeyInternalServerError: Internal server error. Status code500. Applicable to 1 of 384 methods.*ServiceUnavailableException: The invitation spend limit could not be confirmed. The organization and invitation claim were rolled back; retry acceptance. Status code503. Applicable to 1 of 384 methods.*ResponseValidationError: Thrown when the response data could not be deserialized into the expected type. </details>
* Refer to the relevant documentation to determine whether an exception applies to a specific operation.
Server Selection
Select Server by Index
You can override the default server globally by passing a server index to the serverIndex: int optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
| # | Server | Description |
|---|---|---|
| 0 | https://apigw.mka1.com |
MKA1 API Gateway |
| 1 | / |
Relative server URL (configurable via SDK constructor) |
Example
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(
serverIndex: 0,
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>"
);
var res = await sdk.Permissions.Llm.GrantAsync(body: new GrantPermissionRequest() {
ResourceType = LlmResourceType.Completion,
ResourceId = "my-completion-123",
UserId = "user-abc456",
Role = ResourceRole.Writer,
});
// handle response
Override Server URL Per-Client
The default server can also be overridden globally by passing a URL to the serverUrl: string optional parameter when initializing the SDK client instance. For example:
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(
serverUrl: "https://apigw.mka1.com",
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>"
);
var res = await sdk.Permissions.Llm.GrantAsync(body: new GrantPermissionRequest() {
ResourceType = LlmResourceType.Completion,
ResourceId = "my-completion-123",
UserId = "user-abc456",
Role = ResourceRole.Writer,
});
// handle response
Custom HTTP Client
The C# SDK makes API calls using an ISpeakeasyHttpClient that wraps the native
HttpClient. This
client provides the ability to attach hooks around the request lifecycle that can be used to modify the request or handle
errors and response.
The ISpeakeasyHttpClient interface allows you to either use the default SpeakeasyHttpClient that comes with the SDK,
or provide your own custom implementation with customized configuration such as custom message handlers, timeouts,
connection pooling, and other HTTP client settings.
The following example shows how to create a custom HTTP client with request modification and error handling:
using MeetKai.MKA1;
using MeetKai.MKA1.Utils;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
// Create a custom HTTP client
public class CustomHttpClient : ISpeakeasyHttpClient
{
private readonly ISpeakeasyHttpClient _defaultClient;
public CustomHttpClient()
{
_defaultClient = new SpeakeasyHttpClient();
}
public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken? cancellationToken = null)
{
// Add custom header and timeout
request.Headers.Add("x-custom-header", "custom value");
request.Headers.Add("x-request-timeout", "30");
try
{
var response = await _defaultClient.SendAsync(request, cancellationToken);
// Log successful response
Console.WriteLine($"Request successful: {response.StatusCode}");
return response;
}
catch (Exception error)
{
// Log error
Console.WriteLine($"Request failed: {error.Message}");
throw;
}
}
public void Dispose()
{
_httpClient?.Dispose();
_defaultClient?.Dispose();
}
}
// Use the custom HTTP client with the SDK
var customHttpClient = new CustomHttpClient();
var sdk = new SDK(client: customHttpClient);
<details> <summary>You can also provide a completely custom HTTP client with your own configuration:</summary>
using MeetKai.MKA1.Utils;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
// Custom HTTP client with custom configuration
public class AdvancedHttpClient : ISpeakeasyHttpClient
{
private readonly HttpClient _httpClient;
public AdvancedHttpClient()
{
var handler = new HttpClientHandler()
{
MaxConnectionsPerServer = 10,
// ServerCertificateCustomValidationCallback = customCertValidation, // Custom SSL validation if needed
};
_httpClient = new HttpClient(handler)
{
Timeout = TimeSpan.FromSeconds(30)
};
}
public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken? cancellationToken = null)
{
return await _httpClient.SendAsync(request, cancellationToken ?? CancellationToken.None);
}
public void Dispose()
{
_httpClient?.Dispose();
}
}
var sdk = SDK.Builder()
.WithClient(new AdvancedHttpClient())
.Build();
</details>
<details> <summary>For simple debugging, you can enable request/response logging by implementing a custom client:</summary>
public class LoggingHttpClient : ISpeakeasyHttpClient
{
private readonly ISpeakeasyHttpClient _innerClient;
public LoggingHttpClient(ISpeakeasyHttpClient innerClient = null)
{
_innerClient = innerClient ?? new SpeakeasyHttpClient();
}
public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken? cancellationToken = null)
{
// Log request
Console.WriteLine($"Sending {request.Method} request to {request.RequestUri}");
var response = await _innerClient.SendAsync(request, cancellationToken);
// Log response
Console.WriteLine($"Received {response.StatusCode} response");
return response;
}
public void Dispose() => _innerClient?.Dispose();
}
var sdk = new SDK(client: new LoggingHttpClient());
</details>
The SDK also provides built-in hook support through the SDKConfiguration.Hooks system, which automatically handles
BeforeRequestAsync, AfterSuccessAsync, and AfterErrorAsync hooks for advanced request lifecycle management.
Development
Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
Contributions
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
SDK Created by Speakeasy
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- newtonsoft.json (>= 13.0.3)
- nodatime (>= 3.1.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.10.30 | 44 | 9/11/2026 |
| 0.10.29 | 42 | 9/10/2026 |
| 0.10.28 | 36 | 9/10/2026 |
| 0.10.27 | 46 | 9/10/2026 |
| 0.10.26 | 43 | 9/9/2026 |
| 0.10.25 | 88 | 9/5/2026 |
| 0.10.24 | 96 | 9/4/2026 |
| 0.10.23 | 86 | 9/4/2026 |
| 0.10.22 | 81 | 9/4/2026 |
| 0.10.21 | 85 | 9/3/2026 |
| 0.10.20 | 87 | 9/3/2026 |
| 0.10.19 | 85 | 9/3/2026 |
| 0.10.18 | 82 | 9/3/2026 |
| 0.10.17 | 79 | 9/3/2026 |
| 0.10.16 | 84 | 9/3/2026 |
| 0.10.15 | 83 | 9/2/2026 |
| 0.10.14 | 86 | 9/2/2026 |
| 0.10.13 | 78 | 9/2/2026 |
| 0.10.12 | 84 | 8/31/2026 |
| 0.10.11 | 78 | 8/31/2026 |