MeetKai.MKA1
0.4.53
dotnet add package MeetKai.MKA1 --version 0.4.53
NuGet\Install-Package MeetKai.MKA1 -Version 0.4.53
<PackageReference Include="MeetKai.MKA1" Version="0.4.53" />
<PackageVersion Include="MeetKai.MKA1" Version="0.4.53" />
<PackageReference Include="MeetKai.MKA1" />
paket add MeetKai.MKA1 --version 0.4.53
#r "nuget: MeetKai.MKA1, 0.4.53"
#:package MeetKai.MKA1@0.4.53
#addin nuget:?package=MeetKai.MKA1&version=0.4.53
#tool nuget:?package=MeetKai.MKA1&version=0.4.53
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
Available Resources and Operations
<details open> <summary>Available methods</summary>
AgentRuns
- ListAgentRuns - List runs for an agent
- CreateAgentRun - Start a saved agent run
- StreamAgentRunEvents - Stream agent run events
- WakeAgentRun - Wake a sleeping agent run
- 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
- 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
- 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 a org budget
- DeleteOrg - Delete a org budget
- OrgEvents - List org budget events
- GetApiKey - List apikey budgets
- SetApiKey - Set a apikey budget
- DeleteApiKey - Delete a apikey budget
- ApiKeyEvents - List apikey budget events
- GetCurrency - Get display currency
- SetCurrency - Set display currency
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
- 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
- ListSamples - List eval samples
- GetArtifacts - Get eval run artifacts
- 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
- GetCompletionFeedback - Retrieve feedback by completion ID
- UpdateCompletionFeedback - Update existing completion feedback
- BatchGetCompletionFeedback - Batch retrieve feedback for multiple completions
- CreateResponseFeedback - Submit feedback for response
- GetResponseFeedback - Retrieve feedback by response ID
- UpdateResponseFeedback - Update existing response feedback
- BatchGetResponseFeedback - Batch retrieve feedback for multiple responses
- 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
- 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
- AddClusterRegistryModel - Add a cluster-owned model
- ListClusterRegistryModels - List cluster-owned models
- GetClusterRegistryModel - Get a cluster-owned model
- UpdateClusterRegistryModel - Update a cluster-owned model
- RemoveClusterRegistryModel - Remove a cluster-owned 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
- 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
Sandbox
- Create - Create Session
- List - List Sessions
- Get - Get Session
- GetPricing - Get Sandbox Pricing
- SetPricing - Set Sandbox Pricing
- GetUrl - Get Session URL
- 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
Search.Graphrag
- CreateGraphRAGStore - Create Store
- IngestGraphRAGDocuments - Ingest Documents
- QueryGraphRAGStore - Query Store
- InspectGraphRAGStore - Inspect Graph
- DeleteGraphRAGStore - Delete Store
Search.Tables
- CreateTable - Create Table
- GetTableSchema - Get Table Schema
- DeleteTable - Delete Table
- InsertData - Insert Data
- DeleteData - Delete Data
- SearchData - Search
- CreateIndices - Create Indices
- ListIndices - List Indices
- DropIndex - Drop Index
Search.TextStore
- CreateTextStore - Create Store
- AddTexts - Add Texts
- DeleteTexts - Delete Texts
- SearchTexts - Search Texts
- DeleteTextStore - Delete Store
Serving.Accelerators
- List - List available accelerator types
Serving.Deployments
- Create - Create an inference deployment
- List - List deployments
- Get - Get a deployment
- Update - Update a deployment (new revision)
- Delete - Tear down a deployment
- UpdateScaling - Update autoscaling live (no redeploy)
- ListRevisions - List config revisions
- Rollback - Roll back to a previous revision
- GetLogs - Fetch deployment logs
- GetMetrics - Live serving metrics
- ListReplicas - List running replicas
Serving.FinetuneJobs
- Create - Submit a fine-tune job
- List - List fine-tune jobs
- Get - Get a fine-tune job
- Cancel - Cancel a fine-tune job
- GetLogs - Fetch training logs
- GetEvents - Status timeline
- ListCheckpoints - List output checkpoints
Serving.Images
Serving.Models
Serving.Secrets
Serving.Volumes
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 (234)</summary>
System.Net.Http.HttpRequestException: Network connectivity error. For more details about the underlying cause, inspect theex.InnerException.Inheriting from
SDKException:ServingError: Standard error envelope. Applicable to 34 of 333 methods.*HTTPValidationError: Validation Error. Status code422. Applicable to 34 of 333 methods.*ServingHTTPValidationError: Validation Error. Status code422. Applicable to 33 of 333 methods.*ErrorEnvelope: Error response. Applicable to 20 of 333 methods.*TableErrorResponse: Applicable to 9 of 333 methods.*TextStoreErrorResponse: Error response for text store operations. Applicable to 5 of 333 methods.*GraphRAGErrorResponse: Applicable to 5 of 333 methods.*ValidationErrorResponse: Status code400. Applicable to 3 of 333 methods.*ErrorResponse: Status code400. Applicable to 2 of 333 methods.*GetFileContentBadRequestException: Invalid request - File ID is required. Status code400. Applicable to 1 of 333 methods.*CreateScopedApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*ListScopedApiKeysBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*UpdateScopedApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*RegenerateScopedApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*ExchangeApiKeyTokenBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*CreateTeamBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*ListTeamsBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*GetTeamBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*UpdateTeamBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*DeleteTeamBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*AddTeamMemberBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*ListTeamMembersBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*RemoveTeamMemberBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*CreateServiceAccountBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*ListServiceAccountsBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*GetServiceAccountBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*DeleteServiceAccountBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*ListServiceAccountApiKeysBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*UpdateServiceAccountApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*DeleteServiceAccountApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*RegenerateServiceAccountApiKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*GetOrgQuotaBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*UpdateOrgQuotaBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*GetOrgRateLimitBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*UpdateOrgRateLimitBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*CreateClusterInviteBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*ListClusterInvitesBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*RevokeClusterInviteBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*ListClusterOrgsBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*GetClusterOrgBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*DeleteClusterOrgBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*SuspendClusterOrgBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*UnsuspendClusterOrgBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*ReissueOwnerKeyBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*GetClusterInviteInfoBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*AcceptClusterInviteBadRequestException: Bad request. Status code400. Applicable to 1 of 333 methods.*GetJwtFromKeyBadRequestException: Invalid request body. Status code400. Applicable to 1 of 333 methods.*GetFileContentUnauthorizedException: Unauthorized - Invalid or missing authentication. Status code401. Applicable to 1 of 333 methods.*CreateScopedApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*ListScopedApiKeysUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*UpdateScopedApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*RegenerateScopedApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*ExchangeApiKeyTokenUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*CreateTeamUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*ListTeamsUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*GetTeamUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*UpdateTeamUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*DeleteTeamUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*AddTeamMemberUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*ListTeamMembersUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*RemoveTeamMemberUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*CreateServiceAccountUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*ListServiceAccountsUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*GetServiceAccountUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*DeleteServiceAccountUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*ListServiceAccountApiKeysUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*UpdateServiceAccountApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*DeleteServiceAccountApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*RegenerateServiceAccountApiKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*GetOrgQuotaUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*UpdateOrgQuotaUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*GetOrgRateLimitUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*UpdateOrgRateLimitUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*CreateClusterInviteUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*ListClusterInvitesUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*RevokeClusterInviteUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*ListClusterOrgsUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*GetClusterOrgUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*DeleteClusterOrgUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*SuspendClusterOrgUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*UnsuspendClusterOrgUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*ReissueOwnerKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*GetClusterInviteInfoUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*AcceptClusterInviteUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*GetJwtFromKeyUnauthorizedException: Unauthorized. Status code401. Applicable to 1 of 333 methods.*CreateScopedApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*ListScopedApiKeysForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*UpdateScopedApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*RegenerateScopedApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*ExchangeApiKeyTokenForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*CreateTeamForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*ListTeamsForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*GetTeamForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*UpdateTeamForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*DeleteTeamForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*AddTeamMemberForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*ListTeamMembersForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*RemoveTeamMemberForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*CreateServiceAccountForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*ListServiceAccountsForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*GetServiceAccountForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*DeleteServiceAccountForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*ListServiceAccountApiKeysForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*UpdateServiceAccountApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*DeleteServiceAccountApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*RegenerateServiceAccountApiKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*GetOrgQuotaForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*UpdateOrgQuotaForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*GetOrgRateLimitForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*UpdateOrgRateLimitForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*CreateClusterInviteForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*ListClusterInvitesForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*RevokeClusterInviteForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*ListClusterOrgsForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*GetClusterOrgForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*DeleteClusterOrgForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*SuspendClusterOrgForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*UnsuspendClusterOrgForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*ReissueOwnerKeyForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*GetClusterInviteInfoForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*AcceptClusterInviteForbiddenException: Forbidden. Status code403. Applicable to 1 of 333 methods.*GetFileContentNotFoundException: File not found. Status code404. Applicable to 1 of 333 methods.*CreateScopedApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*ListScopedApiKeysNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*UpdateScopedApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*RegenerateScopedApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*ExchangeApiKeyTokenNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*CreateTeamNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*ListTeamsNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*GetTeamNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*UpdateTeamNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*DeleteTeamNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*AddTeamMemberNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*ListTeamMembersNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*RemoveTeamMemberNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*CreateServiceAccountNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*ListServiceAccountsNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*GetServiceAccountNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*DeleteServiceAccountNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*ListServiceAccountApiKeysNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*UpdateServiceAccountApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*DeleteServiceAccountApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*RegenerateServiceAccountApiKeyNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*GetOrgQuotaNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*UpdateOrgQuotaNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*GetOrgRateLimitNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*UpdateOrgRateLimitNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*CreateClusterInviteNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*ListClusterInvitesNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*RevokeClusterInviteNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*ListClusterOrgsNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*GetClusterOrgNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*DeleteClusterOrgNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*SuspendClusterOrgNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*UnsuspendClusterOrgNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*ReissueOwnerKeyNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*GetClusterInviteInfoNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*AcceptClusterInviteNotFoundException: Not found. Status code404. Applicable to 1 of 333 methods.*CreateScopedApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*ListScopedApiKeysConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*UpdateScopedApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*RegenerateScopedApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*ExchangeApiKeyTokenConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*CreateTeamConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*ListTeamsConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*GetTeamConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*UpdateTeamConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*DeleteTeamConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*AddTeamMemberConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*ListTeamMembersConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*RemoveTeamMemberConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*CreateServiceAccountConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*ListServiceAccountsConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*GetServiceAccountConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*DeleteServiceAccountConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*ListServiceAccountApiKeysConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*UpdateServiceAccountApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*DeleteServiceAccountApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*RegenerateServiceAccountApiKeyConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*GetOrgQuotaConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*UpdateOrgQuotaConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*GetOrgRateLimitConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*UpdateOrgRateLimitConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*CreateClusterInviteConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*ListClusterInvitesConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*RevokeClusterInviteConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*ListClusterOrgsConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*GetClusterOrgConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*DeleteClusterOrgConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*SuspendClusterOrgConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*UnsuspendClusterOrgConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*ReissueOwnerKeyConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*GetClusterInviteInfoConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*AcceptClusterInviteConflictException: Conflict. Status code409. Applicable to 1 of 333 methods.*CreateScopedApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*ListScopedApiKeysTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*UpdateScopedApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*RegenerateScopedApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*ExchangeApiKeyTokenTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*CreateTeamTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*ListTeamsTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*GetTeamTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*UpdateTeamTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*DeleteTeamTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*AddTeamMemberTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*ListTeamMembersTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*RemoveTeamMemberTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*CreateServiceAccountTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*ListServiceAccountsTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*GetServiceAccountTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*DeleteServiceAccountTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*ListServiceAccountApiKeysTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*UpdateServiceAccountApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*DeleteServiceAccountApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*RegenerateServiceAccountApiKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*GetOrgQuotaTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*UpdateOrgQuotaTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*GetOrgRateLimitTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*UpdateOrgRateLimitTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*CreateClusterInviteTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*ListClusterInvitesTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*RevokeClusterInviteTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*ListClusterOrgsTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*GetClusterOrgTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*DeleteClusterOrgTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*SuspendClusterOrgTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*UnsuspendClusterOrgTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*ReissueOwnerKeyTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*GetClusterInviteInfoTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*AcceptClusterInviteTooManyRequestsException: Rate limited. Status code429. Applicable to 1 of 333 methods.*GetFileContentInternalServerError: Internal server error. Status code500. Applicable to 1 of 333 methods.*GetJwtFromKeyInternalServerError: Internal server error. Status code500. Applicable to 1 of 333 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. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
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.4.53 | 0 | 7/9/2026 |
| 0.4.52 | 0 | 7/8/2026 |
| 0.4.51 | 0 | 7/8/2026 |
| 0.4.50 | 0 | 7/8/2026 |
| 0.4.49 | 0 | 7/8/2026 |
| 0.4.48 | 34 | 7/8/2026 |
| 0.4.47 | 48 | 7/8/2026 |
| 0.4.46 | 38 | 7/8/2026 |
| 0.4.45 | 40 | 7/8/2026 |
| 0.4.44 | 40 | 7/8/2026 |
| 0.4.43 | 38 | 7/8/2026 |
| 0.4.42 | 45 | 7/7/2026 |
| 0.4.41 | 37 | 7/7/2026 |
| 0.4.40 | 55 | 7/7/2026 |
| 0.4.39 | 95 | 7/2/2026 |
| 0.4.38 | 90 | 7/1/2026 |
| 0.4.37 | 90 | 7/1/2026 |
| 0.4.36 | 107 | 6/30/2026 |
| 0.4.35 | 79 | 6/30/2026 |
| 0.4.34 | 97 | 6/29/2026 |