diff --git a/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.ListCreditsPurchasesSKILLMd.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.ListCreditsPurchasesSKILLMd.g.cs
new file mode 100644
index 00000000..4fe40d23
--- /dev/null
+++ b/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.ListCreditsPurchasesSKILLMd.g.cs
@@ -0,0 +1,411 @@
+
+#nullable enable
+
+namespace OpenRouter
+{
+ public partial class CreditsClient
+ {
+
+
+ private static readonly global::OpenRouter.EndPointSecurityRequirement s_ListCreditsPurchasesSKILLMdSecurityRequirement0 =
+ new global::OpenRouter.EndPointSecurityRequirement
+ {
+ Authorizations = new global::OpenRouter.EndPointAuthorizationRequirement[]
+ { new global::OpenRouter.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "Bearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::OpenRouter.EndPointSecurityRequirement[] s_ListCreditsPurchasesSKILLMdSecurityRequirements =
+ new global::OpenRouter.EndPointSecurityRequirement[]
+ { s_ListCreditsPurchasesSKILLMdSecurityRequirement0,
+ };
+ partial void PrepareListCreditsPurchasesSKILLMdArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareListCreditsPurchasesSKILLMdRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessListCreditsPurchasesSKILLMdResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListCreditsPurchasesSKILLMdResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Agent skill for buying OpenRouter credits
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task ListCreditsPurchasesSKILLMdAsync(
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListCreditsPurchasesSKILLMdAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Agent skill for buying OpenRouter credits
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListCreditsPurchasesSKILLMdAsResponseAsync(
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListCreditsPurchasesSKILLMdArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::OpenRouter.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListCreditsPurchasesSKILLMdSecurityRequirements,
+ operationName: "ListCreditsPurchasesSKILLMdAsync");
+
+ using var __timeoutCancellationTokenSource = global::OpenRouter.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::OpenRouter.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::OpenRouter.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::OpenRouter.PathBuilder(
+ path: "/credits/purchases/SKILL.md",
+ baseUri: HttpClient.BaseAddress ?? new global::System.Uri("https://openrouter.ai/api/v1", global::System.UriKind.RelativeOrAbsolute));
+ var __path = __pathBuilder.ToString();
+ __path = global::OpenRouter.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::OpenRouter.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareListCreditsPurchasesSKILLMdRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListCreditsPurchasesSKILLMd",
+ methodName: "ListCreditsPurchasesSKILLMdAsync",
+ pathTemplate: "\"/credits/purchases/SKILL.md\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::OpenRouter.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListCreditsPurchasesSKILLMd",
+ methodName: "ListCreditsPurchasesSKILLMdAsync",
+ pathTemplate: "\"/credits/purchases/SKILL.md\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::OpenRouter.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::OpenRouter.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListCreditsPurchasesSKILLMd",
+ methodName: "ListCreditsPurchasesSKILLMdAsync",
+ pathTemplate: "\"/credits/purchases/SKILL.md\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListCreditsPurchasesSKILLMdResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListCreditsPurchasesSKILLMd",
+ methodName: "ListCreditsPurchasesSKILLMdAsync",
+ pathTemplate: "\"/credits/purchases/SKILL.md\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListCreditsPurchasesSKILLMd",
+ methodName: "ListCreditsPurchasesSKILLMdAsync",
+ pathTemplate: "\"/credits/purchases/SKILL.md\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessListCreditsPurchasesSKILLMdResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::OpenRouter.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::OpenRouter.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ return new global::OpenRouter.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::OpenRouter.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.ListCreditsPurchasesSetup.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.ListCreditsPurchasesSetup.g.cs
new file mode 100644
index 00000000..b1076969
--- /dev/null
+++ b/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.ListCreditsPurchasesSetup.g.cs
@@ -0,0 +1,411 @@
+
+#nullable enable
+
+namespace OpenRouter
+{
+ public partial class CreditsClient
+ {
+
+
+ private static readonly global::OpenRouter.EndPointSecurityRequirement s_ListCreditsPurchasesSetupSecurityRequirement0 =
+ new global::OpenRouter.EndPointSecurityRequirement
+ {
+ Authorizations = new global::OpenRouter.EndPointAuthorizationRequirement[]
+ { new global::OpenRouter.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "Bearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::OpenRouter.EndPointSecurityRequirement[] s_ListCreditsPurchasesSetupSecurityRequirements =
+ new global::OpenRouter.EndPointSecurityRequirement[]
+ { s_ListCreditsPurchasesSetupSecurityRequirement0,
+ };
+ partial void PrepareListCreditsPurchasesSetupArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareListCreditsPurchasesSetupRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessListCreditsPurchasesSetupResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListCreditsPurchasesSetupResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Agent setup guide for buying credits with a machine payment
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task ListCreditsPurchasesSetupAsync(
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListCreditsPurchasesSetupAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Agent setup guide for buying credits with a machine payment
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListCreditsPurchasesSetupAsResponseAsync(
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListCreditsPurchasesSetupArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::OpenRouter.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListCreditsPurchasesSetupSecurityRequirements,
+ operationName: "ListCreditsPurchasesSetupAsync");
+
+ using var __timeoutCancellationTokenSource = global::OpenRouter.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::OpenRouter.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::OpenRouter.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::OpenRouter.PathBuilder(
+ path: "/credits/purchases/setup",
+ baseUri: HttpClient.BaseAddress ?? new global::System.Uri("https://openrouter.ai/api/v1", global::System.UriKind.RelativeOrAbsolute));
+ var __path = __pathBuilder.ToString();
+ __path = global::OpenRouter.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::OpenRouter.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareListCreditsPurchasesSetupRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListCreditsPurchasesSetup",
+ methodName: "ListCreditsPurchasesSetupAsync",
+ pathTemplate: "\"/credits/purchases/setup\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::OpenRouter.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListCreditsPurchasesSetup",
+ methodName: "ListCreditsPurchasesSetupAsync",
+ pathTemplate: "\"/credits/purchases/setup\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::OpenRouter.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::OpenRouter.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListCreditsPurchasesSetup",
+ methodName: "ListCreditsPurchasesSetupAsync",
+ pathTemplate: "\"/credits/purchases/setup\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListCreditsPurchasesSetupResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListCreditsPurchasesSetup",
+ methodName: "ListCreditsPurchasesSetupAsync",
+ pathTemplate: "\"/credits/purchases/setup\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListCreditsPurchasesSetup",
+ methodName: "ListCreditsPurchasesSetupAsync",
+ pathTemplate: "\"/credits/purchases/setup\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessListCreditsPurchasesSetupResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::OpenRouter.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::OpenRouter.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ return new global::OpenRouter.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::OpenRouter.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ICreditsClient.ListCreditsPurchasesSKILLMd.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ICreditsClient.ListCreditsPurchasesSKILLMd.g.cs
new file mode 100644
index 00000000..480bc954
--- /dev/null
+++ b/src/libs/OpenRouter/Generated/OpenRouter.ICreditsClient.ListCreditsPurchasesSKILLMd.g.cs
@@ -0,0 +1,26 @@
+#nullable enable
+
+namespace OpenRouter
+{
+ public partial interface ICreditsClient
+ {
+ ///
+ /// Agent skill for buying OpenRouter credits
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ListCreditsPurchasesSKILLMdAsync(
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Agent skill for buying OpenRouter credits
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListCreditsPurchasesSKILLMdAsResponseAsync(
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ICreditsClient.ListCreditsPurchasesSetup.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ICreditsClient.ListCreditsPurchasesSetup.g.cs
new file mode 100644
index 00000000..bbd491e6
--- /dev/null
+++ b/src/libs/OpenRouter/Generated/OpenRouter.ICreditsClient.ListCreditsPurchasesSetup.g.cs
@@ -0,0 +1,26 @@
+#nullable enable
+
+namespace OpenRouter
+{
+ public partial interface ICreditsClient
+ {
+ ///
+ /// Agent setup guide for buying credits with a machine payment
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ListCreditsPurchasesSetupAsync(
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Agent setup guide for buying credits with a machine payment
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListCreditsPurchasesSetupAsResponseAsync(
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsChatCompletions.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsChatCompletions.g.cs
index 741f856d..bbfa7ed3 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsChatCompletions.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsChatCompletions.g.cs
@@ -15,7 +15,7 @@ public partial interface IPresetsClient
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -38,7 +38,7 @@ public partial interface IPresetsClient
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -61,7 +61,7 @@ public partial interface IPresetsClient
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsMessages.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsMessages.g.cs
index c91b1b9e..3ba1a052 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsMessages.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsMessages.g.cs
@@ -15,7 +15,7 @@ public partial interface IPresetsClient
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -38,7 +38,7 @@ public partial interface IPresetsClient
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -61,7 +61,7 @@ public partial interface IPresetsClient
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsResponses.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsResponses.g.cs
index ef1a5c7b..b8f9efd6 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsResponses.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.CreatePresetsResponses.g.cs
@@ -15,7 +15,7 @@ public partial interface IPresetsClient
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -38,7 +38,7 @@ public partial interface IPresetsClient
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -61,7 +61,7 @@ public partial interface IPresetsClient
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.Delete.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.Delete.g.cs
new file mode 100644
index 00000000..e9a2c255
--- /dev/null
+++ b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.Delete.g.cs
@@ -0,0 +1,48 @@
+#nullable enable
+
+namespace OpenRouter
+{
+ public partial interface IPresetsClient
+ {
+ ///
+ /// Delete a preset
+ /// Archives a preset: it no longer resolves for inference and is hidden from get and list. The preset and its versions are kept, so the slug stays taken; restore it with `POST /presets/{slug}/restore`. Deleting an already-archived preset succeeds again. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. `workspace_id` may be sent as a query parameter or a JSON body field.
+ ///
+ ///
+ /// URL-safe slug identifying the preset.
+ /// Example: my-preset
+ ///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteAsync(
+ string slug,
+ global::System.Guid? workspaceId = default,
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete a preset
+ /// Archives a preset: it no longer resolves for inference and is hidden from get and list. The preset and its versions are kept, so the slug stays taken; restore it with `POST /presets/{slug}/restore`. Deleting an already-archived preset succeeds again. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. `workspace_id` may be sent as a query parameter or a JSON body field.
+ ///
+ ///
+ /// URL-safe slug identifying the preset.
+ /// Example: my-preset
+ ///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> DeleteAsResponseAsync(
+ string slug,
+ global::System.Guid? workspaceId = default,
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.Get.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.Get.g.cs
index 129a73ca..7caf1790 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.Get.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.Get.g.cs
@@ -12,11 +12,16 @@ public partial interface IPresetsClient
/// URL-safe slug identifying the preset.
/// Example: my-preset
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task GetAsync(
string slug,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
@@ -27,11 +32,16 @@ public partial interface IPresetsClient
/// URL-safe slug identifying the preset.
/// Example: my-preset
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task> GetAsResponseAsync(
string slug,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.GetVersion.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.GetVersion.g.cs
index 64cb7ce8..65e26555 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.GetVersion.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.GetVersion.g.cs
@@ -16,12 +16,17 @@ public partial interface IPresetsClient
/// Version number of the preset.
/// Example: 1
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task GetVersionAsync(
string slug,
string version,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
@@ -36,12 +41,17 @@ public partial interface IPresetsClient
/// Version number of the preset.
/// Example: 1
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task> GetVersionAsResponseAsync(
string slug,
string version,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.List.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.List.g.cs
index 1f1928fa..ff51c532 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.List.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.List.g.cs
@@ -18,12 +18,17 @@ public partial interface IPresetsClient
/// Default Value: 50
/// Example: 50
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task ListAsync(
int? offset = default,
int? limit = default,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
@@ -40,12 +45,17 @@ public partial interface IPresetsClient
/// Default Value: 50
/// Example: 50
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task> ListAsResponseAsync(
int? offset = default,
int? limit = default,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.ListVersions.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.ListVersions.g.cs
index 3a9cbe7b..20d60006 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.ListVersions.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.ListVersions.g.cs
@@ -22,6 +22,10 @@ public partial interface IPresetsClient
/// Default Value: 50
/// Example: 50
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -29,6 +33,7 @@ public partial interface IPresetsClient
string slug,
int? offset = default,
int? limit = default,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
@@ -49,6 +54,10 @@ public partial interface IPresetsClient
/// Default Value: 50
/// Example: 50
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -56,6 +65,7 @@ public partial interface IPresetsClient
string slug,
int? offset = default,
int? limit = default,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.Restore.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.Restore.g.cs
new file mode 100644
index 00000000..414a793d
--- /dev/null
+++ b/src/libs/OpenRouter/Generated/OpenRouter.IPresetsClient.Restore.g.cs
@@ -0,0 +1,48 @@
+#nullable enable
+
+namespace OpenRouter
+{
+ public partial interface IPresetsClient
+ {
+ ///
+ /// Restore a preset
+ /// Re-activates an archived preset so it resolves for inference again. No version is created and the designated version is unchanged. Restoring an active preset returns it unchanged. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. `workspace_id` may be sent as a query parameter or a JSON body field.
+ ///
+ ///
+ /// URL-safe slug identifying the preset.
+ /// Example: my-preset
+ ///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task RestoreAsync(
+ string slug,
+ global::System.Guid? workspaceId = default,
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Restore a preset
+ /// Re-activates an archived preset so it resolves for inference again. No version is created and the designated version is unchanged. Restoring an active preset returns it unchanged. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. `workspace_id` may be sent as a query parameter or a JSON body field.
+ ///
+ ///
+ /// URL-safe slug identifying the preset.
+ /// Example: my-preset
+ ///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> RestoreAsResponseAsync(
+ string slug,
+ global::System.Guid? workspaceId = default,
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.CreditPurchase.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.CreditPurchase.g.cs
index 77c06fca..e9bf6b1c 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.Models.CreditPurchase.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.CreditPurchase.g.cs
@@ -29,7 +29,7 @@ public sealed partial class CreditPurchase
public string? FailureReason { get; set; }
///
- /// Opaque purchase id, owned by the calling account.
+ /// Purchase id, the Stripe PaymentIntent that owns the deposit address.
///
[global::System.Text.Json.Serialization.JsonPropertyName("id")]
[global::System.Text.Json.Serialization.JsonRequired]
@@ -42,12 +42,6 @@ public sealed partial class CreditPurchase
[global::System.Text.Json.Serialization.JsonRequired]
public required string Network { get; set; }
- ///
- ///
- ///
- [global::System.Text.Json.Serialization.JsonPropertyName("payment_intent_id")]
- public string? PaymentIntentId { get; set; }
-
///
///
///
@@ -89,7 +83,7 @@ public sealed partial class CreditPurchase
///
///
///
- /// Opaque purchase id, owned by the calling account.
+ /// Purchase id, the Stripe PaymentIntent that owns the deposit address.
///
///
///
@@ -97,7 +91,6 @@ public sealed partial class CreditPurchase
///
///
///
- ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
@@ -110,15 +103,13 @@ public CreditPurchase(
string protocol,
global::OpenRouter.CreditPurchaseStatus status,
string totalChargedUsd,
- string? failureReason,
- string? paymentIntentId)
+ string? failureReason)
{
this.CreatedAt = createdAt ?? throw new global::System.ArgumentNullException(nameof(createdAt));
this.CreditAmountUsd = creditAmountUsd ?? throw new global::System.ArgumentNullException(nameof(creditAmountUsd));
this.FailureReason = failureReason;
this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
this.Network = network ?? throw new global::System.ArgumentNullException(nameof(network));
- this.PaymentIntentId = paymentIntentId;
this.PlatformFeeUsd = platformFeeUsd ?? throw new global::System.ArgumentNullException(nameof(platformFeeUsd));
this.Protocol = protocol ?? throw new global::System.ArgumentNullException(nameof(protocol));
this.Status = status;
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.CreditPurchaseStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.CreditPurchaseStatus.g.cs
index 7fa45b25..9f2e3de7 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.Models.CreditPurchaseStatus.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.CreditPurchaseStatus.g.cs
@@ -24,22 +24,22 @@ public CreditPurchaseStatus(string value)
///
///
///
- public static CreditPurchaseStatus Credited { get; } = new("credited");
+ public static CreditPurchaseStatus AwaitingPayment { get; } = new("awaiting_payment");
///
///
///
- public static CreditPurchaseStatus Failed { get; } = new("failed");
+ public static CreditPurchaseStatus Credited { get; } = new("credited");
///
///
///
- public static CreditPurchaseStatus Settled { get; } = new("settled");
+ public static CreditPurchaseStatus Failed { get; } = new("failed");
///
///
///
- public static CreditPurchaseStatus Settling { get; } = new("settling");
+ public static CreditPurchaseStatus Processing { get; } = new("processing");
///
///
///
@@ -49,10 +49,10 @@ public static CreditPurchaseStatus FromValue(string value)
return value switch
{
+ "awaiting_payment" => AwaitingPayment,
"credited" => Credited,
"failed" => Failed,
- "settled" => Settled,
- "settling" => Settling,
+ "processing" => Processing,
_ => new CreditPurchaseStatus(value),
};
}
@@ -62,10 +62,10 @@ public static CreditPurchaseStatus FromValue(string value)
///
public bool IsKnown => Value switch
{
+ "awaiting_payment" => true,
"credited" => true,
"failed" => true,
- "settled" => true,
- "settling" => true,
+ "processing" => true,
_ => false,
};
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.DeferredBm25Search.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.DeferredBm25Search.g.cs
index 4a1403c8..4efbb8b5 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.Models.DeferredBm25Search.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.DeferredBm25Search.g.cs
@@ -16,7 +16,7 @@ public sealed partial class DeferredBm25Search
public int? MaxResults { get; set; }
///
- /// Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `<server>_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.
+ /// Universal profile only, for searches the router answers through the `tool_search` wrapper. Unless false, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `<server>_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. False: a miss suggests other keywords and the closest names only.
///
[global::System.Text.Json.Serialization.JsonPropertyName("miss_sources")]
public bool? MissSources { get; set; }
@@ -51,7 +51,7 @@ public sealed partial class DeferredBm25Search
///
///
///
- /// Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `<server>_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.
+ /// Universal profile only, for searches the router answers through the `tool_search` wrapper. Unless false, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `<server>_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. False: a miss suggests other keywords and the closest names only.
///
///
/// Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone.
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.DeferredRegexSearch.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.DeferredRegexSearch.g.cs
index 43cc19cf..743a887d 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.Models.DeferredRegexSearch.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.DeferredRegexSearch.g.cs
@@ -16,7 +16,7 @@ public sealed partial class DeferredRegexSearch
public int? MaxResults { get; set; }
///
- /// Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `<server>_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.
+ /// Universal profile only, for searches the router answers through the `tool_search` wrapper. Unless false, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `<server>_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. False: a miss suggests other keywords and the closest names only.
///
[global::System.Text.Json.Serialization.JsonPropertyName("miss_sources")]
public bool? MissSources { get; set; }
@@ -45,7 +45,7 @@ public sealed partial class DeferredRegexSearch
///
///
///
- /// Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `<server>_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.
+ /// Universal profile only, for searches the router answers through the `tool_search` wrapper. Unless false, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `<server>_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. False: a miss suggests other keywords and the closest names only.
///
///
/// Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone.
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenResponsesErrorFieldCode.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenResponsesErrorFieldCode.g.cs
index c86c7b18..db0da335 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenResponsesErrorFieldCode.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenResponsesErrorFieldCode.g.cs
@@ -46,6 +46,11 @@ public OpenResponsesErrorFieldCode(string value)
///
public static OpenResponsesErrorFieldCode FailedToDownloadImage { get; } = new("failed_to_download_image");
+ ///
+ ///
+ ///
+ public static OpenResponsesErrorFieldCode FlexUnavailable { get; } = new("flex_unavailable");
+
///
///
///
@@ -149,6 +154,7 @@ public static OpenResponsesErrorFieldCode FromValue(string value)
"data_residency_mismatch" => DataResidencyMismatch,
"empty_image_file" => EmptyImageFile,
"failed_to_download_image" => FailedToDownloadImage,
+ "flex_unavailable" => FlexUnavailable,
"image_content_policy_violation" => ImageContentPolicyViolation,
"image_file_not_found" => ImageFileNotFound,
"image_file_too_large" => ImageFileTooLarge,
@@ -181,6 +187,7 @@ public static OpenResponsesErrorFieldCode FromValue(string value)
"data_residency_mismatch" => true,
"empty_image_file" => true,
"failed_to_download_image" => true,
+ "flex_unavailable" => true,
"image_content_policy_violation" => true,
"image_file_not_found" => true,
"image_file_too_large" => true,
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesErrorFieldCode.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesErrorFieldCode.g.cs
index 96e198d7..e7fdee0b 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesErrorFieldCode.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesErrorFieldCode.g.cs
@@ -46,6 +46,11 @@ public ResponsesErrorFieldCode(string value)
///
public static ResponsesErrorFieldCode FailedToDownloadImage { get; } = new("failed_to_download_image");
+ ///
+ ///
+ ///
+ public static ResponsesErrorFieldCode FlexUnavailable { get; } = new("flex_unavailable");
+
///
///
///
@@ -149,6 +154,7 @@ public static ResponsesErrorFieldCode FromValue(string value)
"data_residency_mismatch" => DataResidencyMismatch,
"empty_image_file" => EmptyImageFile,
"failed_to_download_image" => FailedToDownloadImage,
+ "flex_unavailable" => FlexUnavailable,
"image_content_policy_violation" => ImageContentPolicyViolation,
"image_file_not_found" => ImageFileNotFound,
"image_file_too_large" => ImageFileTooLarge,
@@ -181,6 +187,7 @@ public static ResponsesErrorFieldCode FromValue(string value)
"data_residency_mismatch" => true,
"empty_image_file" => true,
"failed_to_download_image" => true,
+ "flex_unavailable" => true,
"image_content_policy_violation" => true,
"image_file_not_found" => true,
"image_file_too_large" => true,
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.CreateAuthCode.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.CreateAuthCode.g.cs
index 52928192..06e6a4cb 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.CreateAuthCode.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.CreateAuthCode.g.cs
@@ -522,6 +522,43 @@ partial void ProcessCreateAuthCodeResponseContent(
h => h.Key,
h => h.Value));
}
+ // Service Unavailable - Service temporarily unavailable
+ if ((int)__response.StatusCode == 503)
+ {
+ string? __content_503 = null;
+ global::System.Exception? __exception_503 = null;
+ global::OpenRouter.ServiceUnavailableResponse? __value_503 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_503 = global::OpenRouter.ServiceUnavailableResponse.FromJson(__content_503, JsonSerializerContext);
+ }
+ else
+ {
+ __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_503 = global::OpenRouter.ServiceUnavailableResponse.FromJson(__content_503, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_503 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_503 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_503,
+ responseBody: __content_503,
+ responseObject: __value_503,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
if (__effectiveReadResponseAsString)
{
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsChatCompletions.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsChatCompletions.g.cs
index b0e69603..0b59a1a0 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsChatCompletions.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsChatCompletions.g.cs
@@ -56,7 +56,7 @@ partial void ProcessCreatePresetsChatCompletionsResponseContent(
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -91,7 +91,7 @@ partial void ProcessCreatePresetsChatCompletionsResponseContent(
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -701,7 +701,7 @@ partial void ProcessCreatePresetsChatCompletionsResponseContent(
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsMessages.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsMessages.g.cs
index 696cc8c8..71f61094 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsMessages.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsMessages.g.cs
@@ -56,7 +56,7 @@ partial void ProcessCreatePresetsMessagesResponseContent(
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -91,7 +91,7 @@ partial void ProcessCreatePresetsMessagesResponseContent(
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -701,7 +701,7 @@ partial void ProcessCreatePresetsMessagesResponseContent(
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsResponses.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsResponses.g.cs
index 86e69851..3614efc3 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsResponses.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsResponses.g.cs
@@ -56,7 +56,7 @@ partial void ProcessCreatePresetsResponsesResponseContent(
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -91,7 +91,7 @@ partial void ProcessCreatePresetsResponsesResponseContent(
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
@@ -701,7 +701,7 @@ partial void ProcessCreatePresetsResponsesResponseContent(
/// Example: my-preset
///
///
- /// Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
/// Example: 750e8400-e29b-41d4-a716-446655440002
///
///
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.Delete.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.Delete.g.cs
new file mode 100644
index 00000000..e1287e27
--- /dev/null
+++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.Delete.g.cs
@@ -0,0 +1,674 @@
+
+#nullable enable
+
+namespace OpenRouter
+{
+ public partial class PresetsClient
+ {
+
+
+ private static readonly global::OpenRouter.EndPointSecurityRequirement s_DeleteSecurityRequirement0 =
+ new global::OpenRouter.EndPointSecurityRequirement
+ {
+ Authorizations = new global::OpenRouter.EndPointAuthorizationRequirement[]
+ { new global::OpenRouter.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "Bearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::OpenRouter.EndPointSecurityRequirement[] s_DeleteSecurityRequirements =
+ new global::OpenRouter.EndPointSecurityRequirement[]
+ { s_DeleteSecurityRequirement0,
+ };
+ partial void PrepareDeleteArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string slug,
+ ref global::System.Guid? workspaceId);
+ partial void PrepareDeleteRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string slug,
+ global::System.Guid? workspaceId);
+ partial void ProcessDeleteResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessDeleteResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Delete a preset
+ /// Archives a preset: it no longer resolves for inference and is hidden from get and list. The preset and its versions are kept, so the slug stays taken; restore it with `POST /presets/{slug}/restore`. Deleting an already-archived preset succeeds again. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. `workspace_id` may be sent as a query parameter or a JSON body field.
+ ///
+ ///
+ /// URL-safe slug identifying the preset.
+ /// Example: my-preset
+ ///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteAsync(
+ string slug,
+ global::System.Guid? workspaceId = default,
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteAsResponseAsync(
+ slug: slug,
+ workspaceId: workspaceId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete a preset
+ /// Archives a preset: it no longer resolves for inference and is hidden from get and list. The preset and its versions are kept, so the slug stays taken; restore it with `POST /presets/{slug}/restore`. Deleting an already-archived preset succeeds again. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. `workspace_id` may be sent as a query parameter or a JSON body field.
+ ///
+ ///
+ /// URL-safe slug identifying the preset.
+ /// Example: my-preset
+ ///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> DeleteAsResponseAsync(
+ string slug,
+ global::System.Guid? workspaceId = default,
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareDeleteArguments(
+ httpClient: HttpClient,
+ slug: ref slug,
+ workspaceId: ref workspaceId);
+
+
+ var __authorizations = global::OpenRouter.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_DeleteSecurityRequirements,
+ operationName: "DeleteAsync");
+
+ using var __timeoutCancellationTokenSource = global::OpenRouter.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::OpenRouter.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::OpenRouter.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::OpenRouter.PathBuilder(
+ path: $"/presets/{slug}",
+ baseUri: HttpClient.BaseAddress ?? new global::System.Uri("https://openrouter.ai/api/v1", global::System.UriKind.RelativeOrAbsolute));
+ __pathBuilder
+ .AddOptionalParameter("workspace_id", workspaceId?.ToString())
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::OpenRouter.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Delete,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::OpenRouter.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareDeleteRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ slug: slug,
+ workspaceId: workspaceId);
+
+ global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "Delete",
+ methodName: "DeleteAsync",
+ pathTemplate: "$\"/presets/{slug}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::OpenRouter.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "Delete",
+ methodName: "DeleteAsync",
+ pathTemplate: "$\"/presets/{slug}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::OpenRouter.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::OpenRouter.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "Delete",
+ methodName: "DeleteAsync",
+ pathTemplate: "$\"/presets/{slug}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessDeleteResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "Delete",
+ methodName: "DeleteAsync",
+ pathTemplate: "$\"/presets/{slug}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "Delete",
+ methodName: "DeleteAsync",
+ pathTemplate: "$\"/presets/{slug}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request - Invalid request parameters or malformed input
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::OpenRouter.BadRequestResponse? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::OpenRouter.BadRequestResponse.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::OpenRouter.BadRequestResponse.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Unauthorized - Authentication required or invalid credentials
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::OpenRouter.UnauthorizedResponse? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::OpenRouter.UnauthorizedResponse.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::OpenRouter.UnauthorizedResponse.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Forbidden - Authentication successful but insufficient permissions
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::OpenRouter.ForbiddenResponse? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::OpenRouter.ForbiddenResponse.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::OpenRouter.ForbiddenResponse.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Not Found - Resource does not exist
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::OpenRouter.NotFoundResponse? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::OpenRouter.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::OpenRouter.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Conflict - Resource conflict or concurrent modification
+ if ((int)__response.StatusCode == 409)
+ {
+ string? __content_409 = null;
+ global::System.Exception? __exception_409 = null;
+ global::OpenRouter.ConflictResponse? __value_409 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_409 = global::OpenRouter.ConflictResponse.FromJson(__content_409, JsonSerializerContext);
+ }
+ else
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_409 = global::OpenRouter.ConflictResponse.FromJson(__content_409, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_409 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_409 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_409,
+ responseBody: __content_409,
+ responseObject: __value_409,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Internal Server Error - Unexpected server error
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::OpenRouter.InternalServerResponse? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::OpenRouter.InternalServerResponse.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::OpenRouter.InternalServerResponse.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessDeleteResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::OpenRouter.GetPresetResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::OpenRouter.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::OpenRouter.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::OpenRouter.GetPresetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::OpenRouter.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::OpenRouter.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.Get.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.Get.g.cs
index 43ec4081..b3dac8fd 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.Get.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.Get.g.cs
@@ -27,11 +27,13 @@ public partial class PresetsClient
};
partial void PrepareGetArguments(
global::System.Net.Http.HttpClient httpClient,
- ref string slug);
+ ref string slug,
+ ref global::System.Guid? workspaceId);
partial void PrepareGetRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
- string slug);
+ string slug,
+ global::System.Guid? workspaceId);
partial void ProcessGetResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -49,16 +51,22 @@ partial void ProcessGetResponseContent(
/// URL-safe slug identifying the preset.
/// Example: my-preset
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task GetAsync(
string slug,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await GetAsResponseAsync(
slug: slug,
+ workspaceId: workspaceId,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -73,11 +81,16 @@ partial void ProcessGetResponseContent(
/// URL-safe slug identifying the preset.
/// Example: my-preset
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task> GetAsResponseAsync(
string slug,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -85,7 +98,8 @@ partial void ProcessGetResponseContent(
client: HttpClient);
PrepareGetArguments(
httpClient: HttpClient,
- slug: ref slug);
+ slug: ref slug,
+ workspaceId: ref workspaceId);
var __authorizations = global::OpenRouter.EndPointSecurityResolver.ResolveAuthorizations(
@@ -113,6 +127,9 @@ partial void ProcessGetResponseContent(
var __pathBuilder = new global::OpenRouter.PathBuilder(
path: $"/presets/{slug}",
baseUri: HttpClient.BaseAddress ?? new global::System.Uri("https://openrouter.ai/api/v1", global::System.UriKind.RelativeOrAbsolute));
+ __pathBuilder
+ .AddOptionalParameter("workspace_id", workspaceId?.ToString())
+ ;
var __path = __pathBuilder.ToString();
__path = global::OpenRouter.AutoSDKRequestOptionsSupport.AppendQueryParameters(
path: __path,
@@ -153,7 +170,8 @@ partial void ProcessGetResponseContent(
PrepareGetRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
- slug: slug);
+ slug: slug,
+ workspaceId: workspaceId);
global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest);
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetVersion.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetVersion.g.cs
index 8ad8642e..99149861 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetVersion.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetVersion.g.cs
@@ -28,12 +28,14 @@ public partial class PresetsClient
partial void PrepareGetVersionArguments(
global::System.Net.Http.HttpClient httpClient,
ref string slug,
- ref string version);
+ ref string version,
+ ref global::System.Guid? workspaceId);
partial void PrepareGetVersionRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string slug,
- string version);
+ string version,
+ global::System.Guid? workspaceId);
partial void ProcessGetVersionResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -55,18 +57,24 @@ partial void ProcessGetVersionResponseContent(
/// Version number of the preset.
/// Example: 1
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task GetVersionAsync(
string slug,
string version,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await GetVersionAsResponseAsync(
slug: slug,
version: version,
+ workspaceId: workspaceId,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -85,12 +93,17 @@ partial void ProcessGetVersionResponseContent(
/// Version number of the preset.
/// Example: 1
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task> GetVersionAsResponseAsync(
string slug,
string version,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -99,7 +112,8 @@ partial void ProcessGetVersionResponseContent(
PrepareGetVersionArguments(
httpClient: HttpClient,
slug: ref slug,
- version: ref version);
+ version: ref version,
+ workspaceId: ref workspaceId);
var __authorizations = global::OpenRouter.EndPointSecurityResolver.ResolveAuthorizations(
@@ -127,6 +141,9 @@ partial void ProcessGetVersionResponseContent(
var __pathBuilder = new global::OpenRouter.PathBuilder(
path: $"/presets/{slug}/versions/{version}",
baseUri: HttpClient.BaseAddress ?? new global::System.Uri("https://openrouter.ai/api/v1", global::System.UriKind.RelativeOrAbsolute));
+ __pathBuilder
+ .AddOptionalParameter("workspace_id", workspaceId?.ToString())
+ ;
var __path = __pathBuilder.ToString();
__path = global::OpenRouter.AutoSDKRequestOptionsSupport.AppendQueryParameters(
path: __path,
@@ -168,7 +185,8 @@ partial void ProcessGetVersionResponseContent(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
slug: slug,
- version: version);
+ version: version,
+ workspaceId: workspaceId);
global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest);
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.List.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.List.g.cs
index a412f365..7fac63d9 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.List.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.List.g.cs
@@ -28,12 +28,14 @@ public partial class PresetsClient
partial void PrepareListArguments(
global::System.Net.Http.HttpClient httpClient,
ref int? offset,
- ref int? limit);
+ ref int? limit,
+ ref global::System.Guid? workspaceId);
partial void PrepareListRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
int? offset,
- int? limit);
+ int? limit,
+ global::System.Guid? workspaceId);
partial void ProcessListResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -57,18 +59,24 @@ partial void ProcessListResponseContent(
/// Default Value: 50
/// Example: 50
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task ListAsync(
int? offset = default,
int? limit = default,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await ListAsResponseAsync(
offset: offset,
limit: limit,
+ workspaceId: workspaceId,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -89,12 +97,17 @@ partial void ProcessListResponseContent(
/// Default Value: 50
/// Example: 50
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task> ListAsResponseAsync(
int? offset = default,
int? limit = default,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -103,7 +116,8 @@ partial void ProcessListResponseContent(
PrepareListArguments(
httpClient: HttpClient,
offset: ref offset,
- limit: ref limit);
+ limit: ref limit,
+ workspaceId: ref workspaceId);
var __authorizations = global::OpenRouter.EndPointSecurityResolver.ResolveAuthorizations(
@@ -134,6 +148,7 @@ partial void ProcessListResponseContent(
__pathBuilder
.AddOptionalParameter("offset", offset?.ToString())
.AddOptionalParameter("limit", limit?.ToString())
+ .AddOptionalParameter("workspace_id", workspaceId?.ToString())
;
var __path = __pathBuilder.ToString();
__path = global::OpenRouter.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -176,7 +191,8 @@ partial void ProcessListResponseContent(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
offset: offset,
- limit: limit);
+ limit: limit,
+ workspaceId: workspaceId);
global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest);
@@ -468,6 +484,43 @@ partial void ProcessListResponseContent(
h => h.Key,
h => h.Value));
}
+ // Not Found - Resource does not exist
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::OpenRouter.NotFoundResponse? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::OpenRouter.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::OpenRouter.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
// Internal Server Error - Unexpected server error
if ((int)__response.StatusCode == 500)
{
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListVersions.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListVersions.g.cs
index 615fcd8d..49775027 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListVersions.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListVersions.g.cs
@@ -29,13 +29,15 @@ partial void PrepareListVersionsArguments(
global::System.Net.Http.HttpClient httpClient,
ref string slug,
ref int? offset,
- ref int? limit);
+ ref int? limit,
+ ref global::System.Guid? workspaceId);
partial void PrepareListVersionsRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string slug,
int? offset,
- int? limit);
+ int? limit,
+ global::System.Guid? workspaceId);
partial void ProcessListVersionsResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -63,6 +65,10 @@ partial void ProcessListVersionsResponseContent(
/// Default Value: 50
/// Example: 50
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -70,6 +76,7 @@ partial void ProcessListVersionsResponseContent(
string slug,
int? offset = default,
int? limit = default,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -77,6 +84,7 @@ partial void ProcessListVersionsResponseContent(
slug: slug,
offset: offset,
limit: limit,
+ workspaceId: workspaceId,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -101,6 +109,10 @@ partial void ProcessListVersionsResponseContent(
/// Default Value: 50
/// Example: 50
///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -108,6 +120,7 @@ partial void ProcessListVersionsResponseContent(
string slug,
int? offset = default,
int? limit = default,
+ global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -117,7 +130,8 @@ partial void ProcessListVersionsResponseContent(
httpClient: HttpClient,
slug: ref slug,
offset: ref offset,
- limit: ref limit);
+ limit: ref limit,
+ workspaceId: ref workspaceId);
var __authorizations = global::OpenRouter.EndPointSecurityResolver.ResolveAuthorizations(
@@ -148,6 +162,7 @@ partial void ProcessListVersionsResponseContent(
__pathBuilder
.AddOptionalParameter("offset", offset?.ToString())
.AddOptionalParameter("limit", limit?.ToString())
+ .AddOptionalParameter("workspace_id", workspaceId?.ToString())
;
var __path = __pathBuilder.ToString();
__path = global::OpenRouter.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -191,7 +206,8 @@ partial void ProcessListVersionsResponseContent(
httpRequestMessage: __httpRequest,
slug: slug,
offset: offset,
- limit: limit);
+ limit: limit,
+ workspaceId: workspaceId);
global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest);
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.Restore.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.Restore.g.cs
new file mode 100644
index 00000000..24da4deb
--- /dev/null
+++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.Restore.g.cs
@@ -0,0 +1,674 @@
+
+#nullable enable
+
+namespace OpenRouter
+{
+ public partial class PresetsClient
+ {
+
+
+ private static readonly global::OpenRouter.EndPointSecurityRequirement s_RestoreSecurityRequirement0 =
+ new global::OpenRouter.EndPointSecurityRequirement
+ {
+ Authorizations = new global::OpenRouter.EndPointAuthorizationRequirement[]
+ { new global::OpenRouter.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "Bearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::OpenRouter.EndPointSecurityRequirement[] s_RestoreSecurityRequirements =
+ new global::OpenRouter.EndPointSecurityRequirement[]
+ { s_RestoreSecurityRequirement0,
+ };
+ partial void PrepareRestoreArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string slug,
+ ref global::System.Guid? workspaceId);
+ partial void PrepareRestoreRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string slug,
+ global::System.Guid? workspaceId);
+ partial void ProcessRestoreResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessRestoreResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Restore a preset
+ /// Re-activates an archived preset so it resolves for inference again. No version is created and the designated version is unchanged. Restoring an active preset returns it unchanged. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. `workspace_id` may be sent as a query parameter or a JSON body field.
+ ///
+ ///
+ /// URL-safe slug identifying the preset.
+ /// Example: my-preset
+ ///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task RestoreAsync(
+ string slug,
+ global::System.Guid? workspaceId = default,
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await RestoreAsResponseAsync(
+ slug: slug,
+ workspaceId: workspaceId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Restore a preset
+ /// Re-activates an archived preset so it resolves for inference again. No version is created and the designated version is unchanged. Restoring an active preset returns it unchanged. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. `workspace_id` may be sent as a query parameter or a JSON body field.
+ ///
+ ///
+ /// URL-safe slug identifying the preset.
+ /// Example: my-preset
+ ///
+ ///
+ /// Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.
+ /// Example: 750e8400-e29b-41d4-a716-446655440002
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> RestoreAsResponseAsync(
+ string slug,
+ global::System.Guid? workspaceId = default,
+ global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareRestoreArguments(
+ httpClient: HttpClient,
+ slug: ref slug,
+ workspaceId: ref workspaceId);
+
+
+ var __authorizations = global::OpenRouter.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_RestoreSecurityRequirements,
+ operationName: "RestoreAsync");
+
+ using var __timeoutCancellationTokenSource = global::OpenRouter.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::OpenRouter.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::OpenRouter.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::OpenRouter.PathBuilder(
+ path: $"/presets/{slug}/restore",
+ baseUri: HttpClient.BaseAddress ?? new global::System.Uri("https://openrouter.ai/api/v1", global::System.UriKind.RelativeOrAbsolute));
+ __pathBuilder
+ .AddOptionalParameter("workspace_id", workspaceId?.ToString())
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::OpenRouter.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::OpenRouter.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareRestoreRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ slug: slug,
+ workspaceId: workspaceId);
+
+ global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "Restore",
+ methodName: "RestoreAsync",
+ pathTemplate: "$\"/presets/{slug}/restore\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::OpenRouter.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "Restore",
+ methodName: "RestoreAsync",
+ pathTemplate: "$\"/presets/{slug}/restore\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::OpenRouter.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::OpenRouter.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "Restore",
+ methodName: "RestoreAsync",
+ pathTemplate: "$\"/presets/{slug}/restore\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessRestoreResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "Restore",
+ methodName: "RestoreAsync",
+ pathTemplate: "$\"/presets/{slug}/restore\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::OpenRouter.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::OpenRouter.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "Restore",
+ methodName: "RestoreAsync",
+ pathTemplate: "$\"/presets/{slug}/restore\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request - Invalid request parameters or malformed input
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::OpenRouter.BadRequestResponse? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::OpenRouter.BadRequestResponse.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::OpenRouter.BadRequestResponse.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Unauthorized - Authentication required or invalid credentials
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::OpenRouter.UnauthorizedResponse? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::OpenRouter.UnauthorizedResponse.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::OpenRouter.UnauthorizedResponse.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Forbidden - Authentication successful but insufficient permissions
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::OpenRouter.ForbiddenResponse? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::OpenRouter.ForbiddenResponse.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::OpenRouter.ForbiddenResponse.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Not Found - Resource does not exist
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::OpenRouter.NotFoundResponse? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::OpenRouter.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::OpenRouter.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Conflict - Resource conflict or concurrent modification
+ if ((int)__response.StatusCode == 409)
+ {
+ string? __content_409 = null;
+ global::System.Exception? __exception_409 = null;
+ global::OpenRouter.ConflictResponse? __value_409 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_409 = global::OpenRouter.ConflictResponse.FromJson(__content_409, JsonSerializerContext);
+ }
+ else
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_409 = global::OpenRouter.ConflictResponse.FromJson(__content_409, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_409 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_409 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_409,
+ responseBody: __content_409,
+ responseObject: __value_409,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Internal Server Error - Unexpected server error
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::OpenRouter.InternalServerResponse? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::OpenRouter.InternalServerResponse.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::OpenRouter.InternalServerResponse.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessRestoreResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::OpenRouter.GetPresetResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::OpenRouter.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::OpenRouter.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::OpenRouter.GetPresetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::OpenRouter.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::OpenRouter.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::OpenRouter.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/OpenRouter/Generated/autosdk.generated-examples.json b/src/libs/OpenRouter/Generated/autosdk.generated-examples.json
index 62a79932..7c4539a4 100644
--- a/src/libs/OpenRouter/Generated/autosdk.generated-examples.json
+++ b/src/libs/OpenRouter/Generated/autosdk.generated-examples.json
@@ -1168,28 +1168,39 @@
},
{
"Order": 107,
+ "Title": "Delete a preset",
+ "Slug": "deletepreset",
+ "Description": "Archives a preset: it no longer resolves for inference and is hidden from get and list. The preset and its versions are kept, so the slug stays taken; restore it with \u0060POST /presets/{slug}/restore\u0060. Deleting an already-archived preset succeeds again. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. \u0060workspace_id\u0060 may be sent as a query parameter or a JSON body field.",
+ "Language": "http",
+ "Code": "### Delete a preset\n# @name deletePreset\nDELETE {{host}}/presets/{{slug}}?workspace_id={{workspace_id}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: The archived preset with its designated version.\n# Content-Type: application/json\n# 400\n# Description: Bad Request - Invalid request parameters or malformed input\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - Authentication required or invalid credentials\n# Content-Type: application/json\n# 403\n# Description: Forbidden - Authentication successful but insufficient permissions\n# Content-Type: application/json\n# 404\n# Description: Not Found - Resource does not exist\n# Content-Type: application/json\n# 409\n# Description: Conflict - Resource conflict or concurrent modification\n# Content-Type: application/json\n# 500\n# Description: Internal Server Error - Unexpected server error\n# Content-Type: application/json",
+ "Format": "http",
+ "OperationId": "deletePreset",
+ "Setup": null
+ },
+ {
+ "Order": 108,
"Title": "Get a preset",
"Slug": "getpreset",
"Description": "Retrieves a preset by its slug with its currently designated version inline.",
"Language": "http",
- "Code": "### Get a preset\n# @name getPreset\nGET {{host}}/presets/{{slug}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Preset with its designated version.\n# Content-Type: application/json\n# 400\n# Description: Bad Request - Invalid request parameters or malformed input\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - Authentication required or invalid credentials\n# Content-Type: application/json\n# 403\n# Description: Forbidden - Authentication successful but insufficient permissions\n# Content-Type: application/json\n# 404\n# Description: Not Found - Resource does not exist\n# Content-Type: application/json\n# 500\n# Description: Internal Server Error - Unexpected server error\n# Content-Type: application/json\n# 503\n# Description: Service Unavailable - Service temporarily unavailable\n# Content-Type: application/json",
+ "Code": "### Get a preset\n# @name getPreset\nGET {{host}}/presets/{{slug}}?workspace_id={{workspace_id}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Preset with its designated version.\n# Content-Type: application/json\n# 400\n# Description: Bad Request - Invalid request parameters or malformed input\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - Authentication required or invalid credentials\n# Content-Type: application/json\n# 403\n# Description: Forbidden - Authentication successful but insufficient permissions\n# Content-Type: application/json\n# 404\n# Description: Not Found - Resource does not exist\n# Content-Type: application/json\n# 500\n# Description: Internal Server Error - Unexpected server error\n# Content-Type: application/json\n# 503\n# Description: Service Unavailable - Service temporarily unavailable\n# Content-Type: application/json",
"Format": "http",
"OperationId": "getPreset",
"Setup": null
},
{
- "Order": 108,
+ "Order": 109,
"Title": "Get a specific version of a preset",
"Slug": "getpresetversion",
"Description": "Retrieves a specific version of a preset by its slug and version number.",
"Language": "http",
- "Code": "### Get a specific version of a preset\n# @name getPresetVersion\nGET {{host}}/presets/{{slug}}/versions/{{version}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: The requested preset version.\n# Content-Type: application/json\n# 400\n# Description: Bad Request - Invalid request parameters or malformed input\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - Authentication required or invalid credentials\n# Content-Type: application/json\n# 403\n# Description: Forbidden - Authentication successful but insufficient permissions\n# Content-Type: application/json\n# 404\n# Description: Not Found - Resource does not exist\n# Content-Type: application/json\n# 500\n# Description: Internal Server Error - Unexpected server error\n# Content-Type: application/json\n# 503\n# Description: Service Unavailable - Service temporarily unavailable\n# Content-Type: application/json",
+ "Code": "### Get a specific version of a preset\n# @name getPresetVersion\nGET {{host}}/presets/{{slug}}/versions/{{version}}?workspace_id={{workspace_id}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: The requested preset version.\n# Content-Type: application/json\n# 400\n# Description: Bad Request - Invalid request parameters or malformed input\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - Authentication required or invalid credentials\n# Content-Type: application/json\n# 403\n# Description: Forbidden - Authentication successful but insufficient permissions\n# Content-Type: application/json\n# 404\n# Description: Not Found - Resource does not exist\n# Content-Type: application/json\n# 500\n# Description: Internal Server Error - Unexpected server error\n# Content-Type: application/json\n# 503\n# Description: Service Unavailable - Service temporarily unavailable\n# Content-Type: application/json",
"Format": "http",
"OperationId": "getPresetVersion",
"Setup": null
},
{
- "Order": 109,
+ "Order": 110,
"Title": "List presets",
"Slug": "listpresets",
"Description": "Lists all presets for the authenticated user, ordered by most recently updated first.",
@@ -1200,18 +1211,29 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 110,
+ "Order": 111,
"Title": "List versions of a preset",
"Slug": "listpresetversions",
"Description": "Lists all versions of a preset, ordered by version number ascending (oldest first).",
"Language": "http",
- "Code": "### List versions of a preset\n# @name listPresetVersions\nGET {{host}}/presets/{{slug}}/versions?offset=0\u0026limit=50\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Paginated list of preset versions.\n# Content-Type: application/json\n# 400\n# Description: Bad Request - Invalid request parameters or malformed input\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - Authentication required or invalid credentials\n# Content-Type: application/json\n# 403\n# Description: Forbidden - Authentication successful but insufficient permissions\n# Content-Type: application/json\n# 404\n# Description: Not Found - Resource does not exist\n# Content-Type: application/json\n# 500\n# Description: Internal Server Error - Unexpected server error\n# Content-Type: application/json\n# 503\n# Description: Service Unavailable - Service temporarily unavailable\n# Content-Type: application/json",
+ "Code": "### List versions of a preset\n# @name listPresetVersions\nGET {{host}}/presets/{{slug}}/versions?offset=0\u0026limit=50\u0026workspace_id={{workspace_id}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Paginated list of preset versions.\n# Content-Type: application/json\n# 400\n# Description: Bad Request - Invalid request parameters or malformed input\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - Authentication required or invalid credentials\n# Content-Type: application/json\n# 403\n# Description: Forbidden - Authentication successful but insufficient permissions\n# Content-Type: application/json\n# 404\n# Description: Not Found - Resource does not exist\n# Content-Type: application/json\n# 500\n# Description: Internal Server Error - Unexpected server error\n# Content-Type: application/json\n# 503\n# Description: Service Unavailable - Service temporarily unavailable\n# Content-Type: application/json",
"Format": "http",
"OperationId": "listPresetVersions",
"Setup": null
},
{
- "Order": 111,
+ "Order": 112,
+ "Title": "Restore a preset",
+ "Slug": "restorepreset",
+ "Description": "Re-activates an archived preset so it resolves for inference again. No version is created and the designated version is unchanged. Restoring an active preset returns it unchanged. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. \u0060workspace_id\u0060 may be sent as a query parameter or a JSON body field.",
+ "Language": "http",
+ "Code": "### Restore a preset\n# @name restorePreset\nPOST {{host}}/presets/{{slug}}/restore?workspace_id={{workspace_id}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: The restored preset with its designated version.\n# Content-Type: application/json\n# 400\n# Description: Bad Request - Invalid request parameters or malformed input\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - Authentication required or invalid credentials\n# Content-Type: application/json\n# 403\n# Description: Forbidden - Authentication successful but insufficient permissions\n# Content-Type: application/json\n# 404\n# Description: Not Found - Resource does not exist\n# Content-Type: application/json\n# 409\n# Description: Conflict - Resource conflict or concurrent modification\n# Content-Type: application/json\n# 500\n# Description: Internal Server Error - Unexpected server error\n# Content-Type: application/json",
+ "Format": "http",
+ "OperationId": "restorePreset",
+ "Setup": null
+ },
+ {
+ "Order": 113,
"Title": "Activate a validated private endpoint",
"Slug": "activateprivateendpoint",
"Description": "Make a validated draft routable. Returns 409 when the endpoint was never validated, the validation is stale, or it is already active. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1222,7 +1244,7 @@
"Setup": null
},
{
- "Order": 112,
+ "Order": 114,
"Title": "Create a private endpoint",
"Slug": "createprivateendpoint",
"Description": "Create a private endpoint as a draft. Drafts are not routable: validate one with \u0060POST /private-endpoints/{id}/validate\u0060, then activate it with \u0060POST /private-endpoints/{id}/activate\u0060. Pass \u0060activate\u0060 to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an \u0060Idempotency-Key\u0060 header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 \u0060idempotency_key_reused\u0060. Returns 400 \u0060parameters_invalid\u0060 when \u0060tool_choice\u0060 is declared without \u0060tools\u0060. The response does not echo \u0060declared_parameters\u0060 or \u0060tested_parameters\u0060; read them with \u0060GET /private-endpoints/{id}\u0060. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1233,7 +1255,7 @@
"Setup": null
},
{
- "Order": 113,
+ "Order": 115,
"Title": "Delete a private endpoint",
"Slug": "deleteprivateendpoint",
"Description": "Delete a private endpoint and stop routing to it. Pass \u0060draft_only=true\u0060 to refuse (409) when the endpoint has been activated. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1244,7 +1266,7 @@
"Setup": null
},
{
- "Order": 114,
+ "Order": 116,
"Title": "Disable a private endpoint",
"Slug": "disableprivateendpoint",
"Description": "Stop routing to an active endpoint without deleting it. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1255,7 +1277,7 @@
"Setup": null
},
{
- "Order": 115,
+ "Order": 117,
"Title": "Enable a private endpoint",
"Slug": "enableprivateendpoint",
"Description": "Resume routing to a disabled endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1266,7 +1288,7 @@
"Setup": null
},
{
- "Order": 116,
+ "Order": 118,
"Title": "Get a private endpoint",
"Slug": "getprivateendpoint",
"Description": "Get one private endpoint with its upstream configuration and current pricing. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1277,7 +1299,7 @@
"Setup": null
},
{
- "Order": 117,
+ "Order": 119,
"Title": "List private endpoints",
"Slug": "listprivateendpoints",
"Description": "List the organization\u0027s private endpoints, including drafts. Requires the private endpoints entitlement. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1288,7 +1310,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 118,
+ "Order": 120,
"Title": "Update a private endpoint",
"Slug": "updateprivateendpoint",
"Description": "Change any of the endpoint fields you own in one call; only the fields present change, and the response is the whole endpoint. \u0060pricing\u0060 and \u0060declared_parameters\u0060 replace their stored value, \u0060settings\u0060 changes only the fields it names (\u0060null\u0060 clears a limit or restores the provider default); routing picks these up for subsequent requests on drafts and active endpoints alike. \u0060declared_zdr\u0060 and \u0060declared_region\u0060 change on drafts and active endpoints alike; on an active endpoint the change keeps its validation and tested parameters, and routing applies it to subsequent requests. \u0060upstream_model_id\u0060 and \u0060base_url\u0060 re-point a draft: an omitted \u0060upstream_model_id\u0060 or \u0060base_url\u0060 keeps the stored one, omitted data-policy declarations are kept while the upstream is unchanged and cleared when it changes, and any change to the upstream or declarations of a draft clears earlier validation. Naming \u0060upstream_model_id\u0060 or \u0060base_url\u0060 on an active endpoint returns 409 \u0060already_active\u0060 and writes nothing, even alongside other fields; delete and re-create instead. Every group is checked before anything is written: 400 \u0060parameters_invalid\u0060 when \u0060tool_choice\u0060 is declared without \u0060tools\u0060 tested or declared, 400 \u0060settings_invalid\u0060 when \u0060max_prompt_tokens\u0060 exceeds the context length, both completion APIs are off, or \u0060excluded_parameters\u0060 names a tested parameter, 422 \u0060pricing_invalid\u0060 for rates the provider strategy cannot represent. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1299,7 +1321,7 @@
"Setup": null
},
{
- "Order": 119,
+ "Order": 121,
"Title": "Validate a draft private endpoint",
"Slug": "validateprivateendpoint",
"Description": "Send a live test request to the draft endpoint using the given workspace\u0027s BYOK credential for its provider. A passing validation is required before activation. Failed checks return 200 with \u0060passed: false\u0060. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1310,7 +1332,7 @@
"Setup": null
},
{
- "Order": 120,
+ "Order": 122,
"Title": "Create a private provider",
"Slug": "createprivateprovider",
"Description": "Create a private, bring-your-own-key provider visible only to your organization. Use its slug as \u0060provider_slug\u0060 when creating private endpoints. Requires the private endpoints entitlement. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1321,7 +1343,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 121,
+ "Order": 123,
"Title": "Delete a private provider",
"Slug": "deleteprivateprovider",
"Description": "Delete a private provider. Refuses (409) while any private endpoint still runs under it. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1332,7 +1354,7 @@
"Setup": null
},
{
- "Order": 122,
+ "Order": 124,
"Title": "Get a private provider",
"Slug": "getprivateprovider",
"Description": "Get one of the organization\u2019s private providers by slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1343,7 +1365,7 @@
"Setup": null
},
{
- "Order": 123,
+ "Order": 125,
"Title": "List private providers",
"Slug": "listprivateproviders",
"Description": "List the organization\u0027s private providers. Requires the private endpoints entitlement. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1354,7 +1376,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 124,
+ "Order": 126,
"Title": "Update a private provider",
"Slug": "updateprivateprovider",
"Description": "Update a private provider\u2019s display name or base URL. The name and slug cannot change, and the data policy is fixed by OpenRouter, so a body with no editable field is rejected (400). [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1365,7 +1387,7 @@
"Setup": null
},
{
- "Order": 125,
+ "Order": 127,
"Title": "List all providers",
"Slug": "listproviders",
"Description": "Generated from OpenAPI examples.",
@@ -1376,7 +1398,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 126,
+ "Order": 128,
"Title": "Submit a rerank request",
"Slug": "creatererank",
"Description": "Submits a rerank request to the rerank router",
@@ -1387,7 +1409,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 127,
+ "Order": 129,
"Title": "Create a response",
"Slug": "createresponses",
"Description": "Creates a streaming or non-streaming response using OpenResponses API format",
@@ -1398,7 +1420,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 128,
+ "Order": 130,
"Title": "Create a SCIM group mapping",
"Slug": "createscimgroupmapping",
"Description": "Create a SCIM group-to-workspace role mapping. Creating a mapping that already exists with the same role succeeds and re-applies the mapping to the group members. Requesting a different role for an existing mapping returns 409. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1409,7 +1431,7 @@
"Setup": null
},
{
- "Order": 129,
+ "Order": 131,
"Title": "Start a SCIM directory sync",
"Slug": "createscimsyncjob",
"Description": "Start a SCIM directory sync. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1420,7 +1442,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 130,
+ "Order": 132,
"Title": "Delete a SCIM group mapping",
"Slug": "deletescimgroupmapping",
"Description": "Delete a SCIM group-to-workspace mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1431,7 +1453,7 @@
"Setup": null
},
{
- "Order": 131,
+ "Order": 133,
"Title": "Get SCIM directory sync status",
"Slug": "getscimsyncjob",
"Description": "Get SCIM directory sync status. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1442,7 +1464,7 @@
"Setup": null
},
{
- "Order": 132,
+ "Order": 134,
"Title": "List SCIM groups",
"Slug": "listscimgroups",
"Description": "List SCIM groups for the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1453,7 +1475,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 133,
+ "Order": 135,
"Title": "List SCIM group mappings",
"Slug": "listscimgroupmappings",
"Description": "List SCIM group-to-workspace mappings for the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1464,7 +1486,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 134,
+ "Order": 136,
"Title": "Get a SCIM group mapping",
"Slug": "getscimgroupmapping",
"Description": "Get a SCIM group-to-workspace mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1475,7 +1497,7 @@
"Setup": null
},
{
- "Order": 135,
+ "Order": 137,
"Title": "Update a SCIM group mapping",
"Slug": "updatescimgroupmapping",
"Description": "Update a SCIM group mapping role. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1486,7 +1508,7 @@
"Setup": null
},
{
- "Order": 136,
+ "Order": 138,
"Title": "Create transcription",
"Slug": "createaudiotranscriptions",
"Description": "Transcribes audio into text. Accepts base64-encoded audio input as JSON, an OpenAI-style multipart/form-data file upload, or a URL the provider downloads directly, and returns the transcribed text.",
@@ -1497,7 +1519,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 137,
+ "Order": 139,
"Title": "Submit a System One request",
"Slug": "createsystemone",
"Description": "Sends state and typed questions to a System One model such as Jev and returns its answers. Compatible with the TypeSafe SDKs. Bare System One model IDs such as \u0060jev-1.13\u0060 and \u0060jev-latest\u0060 are mapped onto the \u0060typesafe/\u0060 namespace.",
@@ -1508,7 +1530,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 138,
+ "Order": 140,
"Title": "Get a server tool",
"Slug": "gettool",
"Description": "One server tool by canonical name or any accepted alias, with the models that run it natively.",
@@ -1519,7 +1541,7 @@
"Setup": null
},
{
- "Order": 139,
+ "Order": 141,
"Title": "List server tools",
"Slug": "listtools",
"Description": "Lists every server tool OpenRouter can run on behalf of a model: accepted \u0060tools[].type\u0060 spellings per API format, the engines behind it with their pricing, and how many endpoints run it natively.",
@@ -1530,7 +1552,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 140,
+ "Order": 142,
"Title": "Create speech",
"Slug": "createaudiospeech",
"Description": "Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).",
@@ -1541,7 +1563,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 141,
+ "Order": 143,
"Title": "Copy workspace secrets to an intern",
"Slug": "copyvaultsecretstointern",
"Description": "Copies the named workspace secrets into one intern\u0027s scope, replacing any intern secret with the same name. Each copy keeps the source value and host bindings. Every name must exist in the workspace scope or the request fails with 404 and nothing is copied. A workspace secret whose \u0060hosts\u0060 is \u0060null\u0060 cannot be copied: the request fails with 409 and nothing is copied until that secret is stored again with hosts. The response carries metadata only. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key\u0027s active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern\u0027s own API key is confined to that intern: it can always read the intern\u0027s secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as \u0060eu.openrouter.ai\u0060 are refused. [API key](/docs/api-reference/authentication) required.",
@@ -1552,7 +1574,7 @@
"Setup": null
},
{
- "Order": 142,
+ "Order": 144,
"Title": "Delete an intern secret",
"Slug": "deleteinternvaultsecret",
"Description": "Deletes a secret stored for one intern. Returns 204 with no body on success and 404 when the secret does not exist in the selected scope. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key\u0027s active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern\u0027s own API key is confined to that intern: it can always read the intern\u0027s secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as \u0060eu.openrouter.ai\u0060 are refused. [API key](/docs/api-reference/authentication) required.",
@@ -1563,7 +1585,7 @@
"Setup": null
},
{
- "Order": 143,
+ "Order": 145,
"Title": "Delete a workspace secret",
"Slug": "deletevaultsecret",
"Description": "Deletes a secret from the workspace of the authenticated API key. Returns 204 with no body on success and 404 when the secret does not exist in the selected scope. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key\u0027s active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern\u0027s own API key is confined to that intern: it can always read the intern\u0027s secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as \u0060eu.openrouter.ai\u0060 are refused. [API key](/docs/api-reference/authentication) required.",
@@ -1574,7 +1596,7 @@
"Setup": null
},
{
- "Order": 144,
+ "Order": 146,
"Title": "List the connections an intern can use",
"Slug": "listinternconnections",
"Description": "Lists the connections in scope for the intern, by the key of their card on the dashboard\u0027s Connections tab: \u0060github\u0060, \u0060slack\u0060, \u0060google\u0060, a catalog MCP server such as \u0060linear\u0060 or \u0060notion\u0060, or \u0060mcp:\u003Chost\u003E\u0060 for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. \u0060ori features add\u0060 checks a feature\u0027s \u0060ori.requires.connections\u0060 against this list. \u0060routing\u0060 is the vault\u0027s routing table for the intern: the credentials it holds and what it would inject each for, from the same lookups the egress proxy picks a credential with, GitHub repository coverage read through the installation token and cached. \u0060routing_text\u0060 is that table as the lines the intern reads in its instructions. Never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key\u0027s active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern\u0027s own API key is confined to that intern: it can always read the intern\u0027s secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as \u0060eu.openrouter.ai\u0060 are refused. [API key](/docs/api-reference/authentication) required.",
@@ -1585,7 +1607,7 @@
"Setup": null
},
{
- "Order": 145,
+ "Order": 147,
"Title": "List the secrets an intern receives",
"Slug": "listinterneffectivevaultsecrets",
"Description": "Lists, one entry per name, the secret the intern\u0027s outbound requests receive: its own secrets, secrets from an attached vault, and workspace secrets, including ones stored before workspace-scoped storage. Where several vaults hold a name, the entry is the one that wins, in the order intern, attached, workspace. The same resolution decides what outbound requests receive, so this list and the intern\u0027s requests agree. \u0060scope\u0060 says which vault the entry comes from. Responses carry metadata only, never values. Results are ordered by name and paginated with \u0060limit\u0060 and \u0060offset\u0060. Returns 404 when the intern\u0027s attached vault is no longer available, since the intern then receives no secrets. The scope is selected by the API key: workspace routes act on the key\u0027s active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern\u0027s own API key is confined to that intern: it can always read the intern\u0027s secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as \u0060eu.openrouter.ai\u0060 are refused. [API key](/docs/api-reference/authentication) required.",
@@ -1596,7 +1618,7 @@
"Setup": null
},
{
- "Order": 146,
+ "Order": 148,
"Title": "List intern secrets",
"Slug": "listinternvaultsecrets",
"Description": "Lists secret metadata stored for one intern. The list includes secrets stored from the dashboard or at provisioning before workspace-scoped storage; where both exist under one name, the one stored through this API is listed. Those older secrets cannot be deleted or copied through this API, and storing the same name through this API replaces them. Responses contain names, bound hosts, fingerprints and creation times, never secret values. Results are ordered by name and paginated with \u0060limit\u0060 and \u0060offset\u0060. The scope is selected by the API key: workspace routes act on the key\u0027s active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern\u0027s own API key is confined to that intern: it can always read the intern\u0027s secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as \u0060eu.openrouter.ai\u0060 are refused. [API key](/docs/api-reference/authentication) required.",
@@ -1607,7 +1629,7 @@
"Setup": null
},
{
- "Order": 147,
+ "Order": 149,
"Title": "List workspace secrets",
"Slug": "listvaultsecrets",
"Description": "Lists secret metadata for the workspace of the authenticated API key. The list includes secrets stored from the dashboard or at provisioning before workspace-scoped storage; where both exist under one name, the one stored through this API is listed. Those older secrets cannot be deleted or copied through this API, and storing the same name through this API replaces them. Responses contain names, bound hosts, fingerprints and creation times, never secret values. Results are ordered by name and paginated with \u0060limit\u0060 and \u0060offset\u0060. The scope is selected by the API key: workspace routes act on the key\u0027s active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern\u0027s own API key is confined to that intern: it can always read the intern\u0027s secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as \u0060eu.openrouter.ai\u0060 are refused. [API key](/docs/api-reference/authentication) required.",
@@ -1618,7 +1640,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 148,
+ "Order": 150,
"Title": "Store an intern secret",
"Slug": "storeinternvaultsecret",
"Description": "Creates or replaces a secret stored for one intern. The value is encrypted at rest and released only to the exact hostnames in \u0060hosts\u0060. The response carries metadata only. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key\u0027s active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern\u0027s own API key is confined to that intern: it can always read the intern\u0027s secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as \u0060eu.openrouter.ai\u0060 are refused. [API key](/docs/api-reference/authentication) required.",
@@ -1629,7 +1651,7 @@
"Setup": null
},
{
- "Order": 149,
+ "Order": 151,
"Title": "Store a workspace secret",
"Slug": "storevaultsecret",
"Description": "Creates or replaces a secret in the workspace of the authenticated API key. The value is encrypted at rest and released only to the exact hostnames in \u0060hosts\u0060. The response carries metadata only. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key\u0027s active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern\u0027s own API key is confined to that intern: it can always read the intern\u0027s secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as \u0060eu.openrouter.ai\u0060 are refused. [API key](/docs/api-reference/authentication) required.",
@@ -1640,7 +1662,7 @@
"Setup": null
},
{
- "Order": 150,
+ "Order": 152,
"Title": "Submit a video generation request",
"Slug": "createvideos",
"Description": "Submits a video generation request and returns a polling URL to check status",
@@ -1651,7 +1673,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 151,
+ "Order": 153,
"Title": "Poll video generation status",
"Slug": "getvideos",
"Description": "Returns job status and content URLs when completed",
@@ -1662,7 +1684,7 @@
"Setup": null
},
{
- "Order": 152,
+ "Order": 154,
"Title": "Download generated video content",
"Slug": "listvideoscontent",
"Description": "Streams the generated video content from the upstream provider",
@@ -1673,7 +1695,7 @@
"Setup": null
},
{
- "Order": 153,
+ "Order": 155,
"Title": "List all video generation models",
"Slug": "listvideosmodels",
"Description": "Returns a list of all available video generation models and their properties",
@@ -1684,7 +1706,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 154,
+ "Order": 156,
"Title": "Bulk add members to a workspace",
"Slug": "bulkaddworkspacemembers",
"Description": "Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1695,7 +1717,7 @@
"Setup": null
},
{
- "Order": 155,
+ "Order": 157,
"Title": "Bulk remove members from a workspace",
"Slug": "bulkremoveworkspacemembers",
"Description": "Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. SCIM-managed members cannot be removed; changes must be made in your identity provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1706,7 +1728,7 @@
"Setup": null
},
{
- "Order": 156,
+ "Order": 158,
"Title": "Create a workspace",
"Slug": "createworkspace",
"Description": "Create a new workspace for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1717,7 +1739,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 157,
+ "Order": 159,
"Title": "Delete a workspace",
"Slug": "deleteworkspace",
"Description": "Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace requires confirm_default_workspace_deletion=true. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1728,7 +1750,7 @@
"Setup": null
},
{
- "Order": 158,
+ "Order": 160,
"Title": "Delete a workspace budget",
"Slug": "deleteworkspacebudget",
"Description": "Remove the budget for a given interval. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1739,7 +1761,7 @@
"Setup": null
},
{
- "Order": 159,
+ "Order": 161,
"Title": "Get a workspace",
"Slug": "getworkspace",
"Description": "Get a single workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1750,7 +1772,7 @@
"Setup": null
},
{
- "Order": 160,
+ "Order": 162,
"Title": "Get a workspace budget",
"Slug": "getworkspacebudget",
"Description": "Retrieve the budget for a given interval. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1761,7 +1783,7 @@
"Setup": null
},
{
- "Order": 161,
+ "Order": 163,
"Title": "List workspaces",
"Slug": "listworkspaces",
"Description": "List all workspaces for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1772,7 +1794,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 162,
+ "Order": 164,
"Title": "List workspace budgets",
"Slug": "listworkspacebudgets",
"Description": "List all budgets configured for a workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1783,7 +1805,7 @@
"Setup": null
},
{
- "Order": 163,
+ "Order": 165,
"Title": "List workspace members",
"Slug": "listworkspacemembers",
"Description": "List all members of a workspace. Returns paginated results. For the default workspace, returns all organization members (implicit membership). [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1794,7 +1816,7 @@
"Setup": "This example assumes \u0060using OpenRouter;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 164,
+ "Order": 166,
"Title": "Create or update a workspace budget",
"Slug": "upsertworkspacebudget",
"Description": "Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime \u003E monthly \u003E weekly \u003E daily). The optional \u0060include_byok_in_budgets\u0060 flag is a workspace-wide setting: when provided it applies to every budget interval for the workspace, not just the interval in this request. Note that a change made here is applied to budget enforcement immediately, but an already-open workspace settings page in the web dashboard may keep showing the previous value until it is reloaded. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
@@ -1805,7 +1827,7 @@
"Setup": null
},
{
- "Order": 165,
+ "Order": 167,
"Title": "Update a workspace",
"Slug": "updateworkspace",
"Description": "Update an existing workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.",
diff --git a/src/libs/OpenRouter/openapi.yaml b/src/libs/OpenRouter/openapi.yaml
index 5988f8ef..e25db5ad 100644
--- a/src/libs/OpenRouter/openapi.yaml
+++ b/src/libs/OpenRouter/openapi.yaml
@@ -16333,18 +16333,12 @@
]
},
"id": {
- "description": "Opaque purchase id, owned by the calling account.",
+ "description": "Purchase id, the Stripe PaymentIntent that owns the deposit address.",
"type": "string"
},
"network": {
"type": "string"
},
- "payment_intent_id": {
- "type": [
- "string",
- "null"
- ]
- },
"platform_fee_usd": {
"type": "string"
},
@@ -16353,8 +16347,8 @@
},
"status": {
"enum": [
- "settling",
- "settled",
+ "awaiting_payment",
+ "processing",
"credited",
"failed"
],
@@ -16373,7 +16367,6 @@
"total_charged_usd",
"protocol",
"network",
- "payment_intent_id",
"failure_reason",
"created_at"
],
@@ -17523,7 +17516,7 @@
"type": "integer"
},
"miss_sources": {
- "description": "Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.",
+ "description": "Universal profile only, for searches the router answers through the `tool_search` wrapper. Unless false, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. False: a miss suggests other keywords and the closest names only.",
"type": "boolean"
},
"siblings": {
@@ -17591,7 +17584,7 @@
"type": "integer"
},
"miss_sources": {
- "description": "Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.",
+ "description": "Universal profile only, for searches the router answers through the `tool_search` wrapper. Unless false, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and the leading word is not among the words of the deferred tools' names (the union of every deferred tool name's tokens, whole and split as the search index splits names; a camel-case word counts when each of its parts is), with descriptions left out so a tool that merely mentions another product cannot mask it (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. False: a miss suggests other keywords and the closest names only.",
"type": "boolean"
},
"siblings": {
@@ -37278,6 +37271,7 @@
"cyber_policy",
"misalignment_policy_violation",
"data_residency_mismatch",
+ "flex_unavailable",
"permission_denied"
],
"title": "CodeEnum",
@@ -45955,6 +45949,7 @@
"cyber_policy",
"misalignment_policy_violation",
"data_residency_mismatch",
+ "flex_unavailable",
"permission_denied"
],
"type": "string",
@@ -58190,6 +58185,22 @@
}
},
"description": "Internal Server Error - Unexpected server error"
+ },
+ "503": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 503,
+ "message": "Service temporarily unavailable"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/ServiceUnavailableResponse"
+ }
+ }
+ },
+ "description": "Service Unavailable - Service temporarily unavailable"
}
},
"summary": "Create authorization code",
@@ -61563,8 +61574,23 @@
},
"/credits/purchases": {
"post": {
- "description": "Starts an agent credit purchase paid with a Machine Payments Protocol (MPP) credential on Tempo. The first call answers `402` with a `WWW-Authenticate: Payment ...` challenge; retry the same request, same `Idempotency-Key`, with the signed credential in `Payment-Authorization: Payment ...` (or in `Authorization: Payment ...` when the API key is sent as `X-Api-Key`). A paid request answers `202`: the transfer was broadcast and Stripe is still screening the payment, so credits arrive asynchronously. Poll `GET /api/v1/credits/purchases/{id}` until `status` is `credited` or `failed`. A retry with the same `Idempotency-Key` after the purchase is credited answers `200`.",
+ "description": "Starts an agent credit purchase paid with a Machine Payments Protocol (MPP) credential on Tempo. The first call answers `402` with a `WWW-Authenticate: Payment ...` challenge; retry the same request, same `Idempotency-Key`, with the signed credential in `Payment-Authorization: Payment ...` (or in `Authorization: Payment ...` when the management key is sent as `X-Api-Key`). A paid request answers `202`: the transfer was broadcast and Stripe is still screening the payment, so credits arrive asynchronously. Poll the URL in the `Location` header, `GET /api/v1/credits/purchases/{id}`, until `status` is `credited` or `failed`.",
"operationId": "createCreditsPurchases",
+ "parameters": [
+ {
+ "description": "Identifies the purchase. Send the same value on the unpaid request and on the paid retry; use a new value for a new purchase.",
+ "in": "header",
+ "name": "idempotency-key",
+ "required": true,
+ "schema": {
+ "description": "Identifies the purchase. Send the same value on the unpaid request and on the paid retry; use a new value for a new purchase.",
+ "example": "6f1f7f0e-2b1a-4f57-9a43-3c1f6f3e8b0d",
+ "maxLength": 255,
+ "minLength": 1,
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"content": {
"application/json": {
@@ -61576,7 +61602,7 @@
"required": true
},
"responses": {
- "200": {
+ "202": {
"content": {
"application/json": {
"schema": {
@@ -61584,17 +61610,18 @@
}
}
},
- "description": "Credits minted."
- },
- "202": {
- "content": {
- "application/json": {
+ "description": "Payment accepted; credits are minted when the PaymentIntent succeeds.",
+ "headers": {
+ "Location": {
+ "description": "The purchase to poll: `GET /api/v1/credits/purchases/{id}`.",
+ "required": true,
"schema": {
- "$ref": "#/components/schemas/CreditPurchaseResponse"
+ "description": "The purchase to poll: `GET /api/v1/credits/purchases/{id}`.",
+ "example": "/api/v1/credits/purchases/pi_3PqXyZ2eZvKYlo2C0abc1234",
+ "type": "string"
}
}
- },
- "description": "Payment accepted; credits are minted when the PaymentIntent succeeds."
+ }
},
"400": {
"content": {
@@ -61636,7 +61663,7 @@
}
}
},
- "description": "Payment required. An unpaid request carries the MPP challenge in `WWW-Authenticate`; a purchase whose transfer was rejected returns its record with `status: failed`."
+ "description": "Payment required. An unpaid request carries the MPP challenge in `WWW-Authenticate`, and a `Link: rel=\"help\"` header plus a `setup` field pointing at the agent setup guide, `GET /api/v1/credits/purchases/setup`."
},
"403": {
"content": {
@@ -61686,6 +61713,22 @@
},
"description": "Conflict - Resource conflict or concurrent modification"
},
+ "429": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 429,
+ "message": "Rate limit exceeded"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/TooManyRequestsResponse"
+ }
+ }
+ },
+ "description": "Too Many Requests - Rate limit exceeded"
+ },
"500": {
"content": {
"application/json": {
@@ -61730,8 +61773,7 @@
],
"x-fern-ignore": true,
"x-hidden": true,
- "x-speakeasy-ignore": true,
- "parameters": []
+ "x-speakeasy-ignore": true
},
"parameters": [
{
@@ -61747,7 +61789,7 @@
},
"/credits/purchases/{id}": {
"get": {
- "description": "Returns one agent credit purchase made with a key of the calling workspace. Poll this after a `202` until `status` is `credited` or `failed`.",
+ "description": "Returns one agent credit purchase of the calling account, read from its Stripe PaymentIntent. Poll this after a `202` until `status` is `credited` or `failed`.",
"operationId": "listCreditsPurchases",
"parameters": [
{
@@ -61755,7 +61797,7 @@
"name": "id",
"required": true,
"schema": {
- "format": "uuid",
+ "pattern": "^pi_[A-Za-z0-9]{1,64}$",
"type": "string"
}
}
@@ -61835,6 +61877,22 @@
},
"description": "Not Found - Resource does not exist"
},
+ "429": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 429,
+ "message": "Rate limit exceeded"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/TooManyRequestsResponse"
+ }
+ }
+ },
+ "description": "Too Many Requests - Rate limit exceeded"
+ },
"500": {
"content": {
"application/json": {
@@ -61850,6 +61908,22 @@
}
},
"description": "Internal Server Error - Unexpected server error"
+ },
+ "503": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 503,
+ "message": "Service temporarily unavailable"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/ServiceUnavailableResponse"
+ }
+ }
+ },
+ "description": "Service Unavailable - Service temporarily unavailable"
}
},
"security": [
@@ -61877,6 +61951,72 @@
}
]
},
+ "/credits/purchases/setup": {
+ "get": {
+ "operationId": "listCreditsPurchasesSetup",
+ "responses": {
+ "200": {
+ "content": {
+ "text/markdown": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Markdown document, readable without a key."
+ }
+ },
+ "summary": "Agent setup guide for buying credits with a machine payment",
+ "tags": [
+ "Credits"
+ ],
+ "parameters": []
+ },
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/AppIdentifier"
+ },
+ {
+ "$ref": "#/components/parameters/AppDisplayName"
+ },
+ {
+ "$ref": "#/components/parameters/AppCategories"
+ }
+ ]
+ },
+ "/credits/purchases/SKILL.md": {
+ "get": {
+ "operationId": "listCreditsPurchasesSKILL.md",
+ "responses": {
+ "200": {
+ "content": {
+ "text/markdown": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Markdown document, readable without a key."
+ }
+ },
+ "summary": "Agent skill for buying OpenRouter credits",
+ "tags": [
+ "Credits"
+ ],
+ "parameters": []
+ },
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/AppIdentifier"
+ },
+ {
+ "$ref": "#/components/parameters/AppDisplayName"
+ },
+ {
+ "$ref": "#/components/parameters/AppCategories"
+ }
+ ]
+ },
"/datasets/app-rankings": {
"get": {
"description": "Returns the top public apps on OpenRouter ranked by token usage inside the requested\ndate window, matching the public apps marketplace on openrouter.ai/apps. Token totals\nare `prompt_tokens + completion_tokens`; hidden and private apps are excluded and\ntraffic from related app aliases is merged into the canonical visible app.\n\n`sort=popular` (default) ranks by total token volume inside the window.\n`sort=trending` ranks by absolute excess token growth: window volume minus the average\nvolume of the three equal-length periods immediately preceding the window. Apps with\nno excess growth are omitted, so `trending` may return fewer than `limit` rows.\n\nFilter with `category` (marketplace category group, e.g. `coding`) or `subcategory`\n(e.g. `cli-agent`). Ranks are re-numbered 1..N after filtering. Page with `offset` —\n`rank` stays absolute, so the first row of `offset=50` is `rank: 51`.\n\nAuthenticate with any valid OpenRouter API key (same key used for inference).\nRate-limited to 30 requests/minute per key and 500 requests/day per account.\n\nWhen republishing or quoting this dataset, OpenRouter must be cited as:\n\"Source: OpenRouter (openrouter.ai/apps), as of {as_of}.\"\n\nToken counts come from each upstream provider's own tokenizer, so a token attributed\nto one app is not directly comparable to a token attributed to another app whose\ntraffic flows through a different provider.\n\nLicensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.",
@@ -77370,6 +77510,18 @@
"minimum": 1,
"type": "integer"
}
+ },
+ {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "in": "query",
+ "name": "workspace_id",
+ "required": false,
+ "schema": {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "example": "750e8400-e29b-41d4-a716-446655440002",
+ "format": "uuid",
+ "type": "string"
+ }
}
],
"responses": {
@@ -77449,6 +77601,22 @@
},
"description": "Forbidden - Authentication successful but insufficient permissions"
},
+ "404": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 404,
+ "message": "Resource not found"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundResponse"
+ }
+ }
+ },
+ "description": "Not Found - Resource does not exist"
+ },
"500": {
"content": {
"application/json": {
@@ -77524,6 +77692,154 @@
]
},
"/presets/{slug}": {
+ "delete": {
+ "description": "Archives a preset: it no longer resolves for inference and is hidden from get and list. The preset and its versions are kept, so the slug stays taken; restore it with `POST /presets/{slug}/restore`. Deleting an already-archived preset succeeds again. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. `workspace_id` may be sent as a query parameter or a JSON body field.",
+ "operationId": "deletePreset",
+ "parameters": [
+ {
+ "description": "URL-safe slug identifying the preset.",
+ "in": "path",
+ "name": "slug",
+ "required": true,
+ "schema": {
+ "description": "URL-safe slug identifying the preset.",
+ "example": "my-preset",
+ "minLength": 1,
+ "type": "string"
+ }
+ },
+ {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "in": "query",
+ "name": "workspace_id",
+ "required": false,
+ "schema": {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "example": "750e8400-e29b-41d4-a716-446655440002",
+ "format": "uuid",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetPresetResponse"
+ }
+ }
+ },
+ "description": "The archived preset with its designated version."
+ },
+ "400": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 400,
+ "message": "Invalid request parameters"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestResponse"
+ }
+ }
+ },
+ "description": "Bad Request - Invalid request parameters or malformed input"
+ },
+ "401": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 401,
+ "message": "Missing Authentication header"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedResponse"
+ }
+ }
+ },
+ "description": "Unauthorized - Authentication required or invalid credentials"
+ },
+ "403": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 403,
+ "message": "Only management keys can perform this operation"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenResponse"
+ }
+ }
+ },
+ "description": "Forbidden - Authentication successful but insufficient permissions"
+ },
+ "404": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 404,
+ "message": "Resource not found"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundResponse"
+ }
+ }
+ },
+ "description": "Not Found - Resource does not exist"
+ },
+ "409": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 409,
+ "message": "Resource conflict. Please try again later."
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/ConflictResponse"
+ }
+ }
+ },
+ "description": "Conflict - Resource conflict or concurrent modification"
+ },
+ "500": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 500,
+ "message": "Internal Server Error"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/InternalServerResponse"
+ }
+ }
+ },
+ "description": "Internal Server Error - Unexpected server error"
+ }
+ },
+ "security": [
+ {
+ "apiKey": []
+ }
+ ],
+ "summary": "Delete a preset",
+ "tags": [
+ "Presets"
+ ],
+ "x-speakeasy-name-override": "delete"
+ },
"get": {
"description": "Retrieves a preset by its slug with its currently designated version inline.",
"operationId": "getPreset",
@@ -77539,6 +77855,18 @@
"minLength": 1,
"type": "string"
}
+ },
+ {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "in": "query",
+ "name": "workspace_id",
+ "required": false,
+ "schema": {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "example": "750e8400-e29b-41d4-a716-446655440002",
+ "format": "uuid",
+ "type": "string"
+ }
}
],
"responses": {
@@ -77718,12 +78046,12 @@
}
},
{
- "description": "Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
"in": "query",
"name": "workspace_id",
"required": false,
"schema": {
- "description": "Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
"example": "750e8400-e29b-41d4-a716-446655440002",
"format": "uuid",
"type": "string"
@@ -77930,12 +78258,12 @@
}
},
{
- "description": "Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
"in": "query",
"name": "workspace_id",
"required": false,
"schema": {
- "description": "Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
"example": "750e8400-e29b-41d4-a716-446655440002",
"format": "uuid",
"type": "string"
@@ -78139,12 +78467,12 @@
}
},
{
- "description": "Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
"in": "query",
"name": "workspace_id",
"required": false,
"schema": {
- "description": "Workspace to create the preset in. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
"example": "750e8400-e29b-41d4-a716-446655440002",
"format": "uuid",
"type": "string"
@@ -78323,6 +78651,167 @@
}
]
},
+ "/presets/{slug}/restore": {
+ "post": {
+ "description": "Re-activates an archived preset so it resolves for inference again. No version is created and the designated version is unchanged. Restoring an active preset returns it unchanged. A disabled preset returns 409. Requires a read-write [management key](/docs/guides/overview/auth/management-api-keys); inference API keys are rejected. `workspace_id` may be sent as a query parameter or a JSON body field.",
+ "operationId": "restorePreset",
+ "parameters": [
+ {
+ "description": "URL-safe slug identifying the preset.",
+ "in": "path",
+ "name": "slug",
+ "required": true,
+ "schema": {
+ "description": "URL-safe slug identifying the preset.",
+ "example": "my-preset",
+ "minLength": 1,
+ "type": "string"
+ }
+ },
+ {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "in": "query",
+ "name": "workspace_id",
+ "required": false,
+ "schema": {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "example": "750e8400-e29b-41d4-a716-446655440002",
+ "format": "uuid",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetPresetResponse"
+ }
+ }
+ },
+ "description": "The restored preset with its designated version."
+ },
+ "400": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 400,
+ "message": "Invalid request parameters"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestResponse"
+ }
+ }
+ },
+ "description": "Bad Request - Invalid request parameters or malformed input"
+ },
+ "401": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 401,
+ "message": "Missing Authentication header"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedResponse"
+ }
+ }
+ },
+ "description": "Unauthorized - Authentication required or invalid credentials"
+ },
+ "403": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 403,
+ "message": "Only management keys can perform this operation"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenResponse"
+ }
+ }
+ },
+ "description": "Forbidden - Authentication successful but insufficient permissions"
+ },
+ "404": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 404,
+ "message": "Resource not found"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundResponse"
+ }
+ }
+ },
+ "description": "Not Found - Resource does not exist"
+ },
+ "409": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 409,
+ "message": "Resource conflict. Please try again later."
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/ConflictResponse"
+ }
+ }
+ },
+ "description": "Conflict - Resource conflict or concurrent modification"
+ },
+ "500": {
+ "content": {
+ "application/json": {
+ "example": {
+ "error": {
+ "code": 500,
+ "message": "Internal Server Error"
+ }
+ },
+ "schema": {
+ "$ref": "#/components/schemas/InternalServerResponse"
+ }
+ }
+ },
+ "description": "Internal Server Error - Unexpected server error"
+ }
+ },
+ "security": [
+ {
+ "apiKey": []
+ }
+ ],
+ "summary": "Restore a preset",
+ "tags": [
+ "Presets"
+ ],
+ "x-speakeasy-name-override": "restore"
+ },
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/AppIdentifier"
+ },
+ {
+ "$ref": "#/components/parameters/AppDisplayName"
+ },
+ {
+ "$ref": "#/components/parameters/AppCategories"
+ }
+ ]
+ },
"/presets/{slug}/versions": {
"get": {
"description": "Lists all versions of a preset, ordered by version number ascending (oldest first).",
@@ -78369,6 +78858,18 @@
"minimum": 1,
"type": "integer"
}
+ },
+ {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "in": "query",
+ "name": "workspace_id",
+ "required": false,
+ "schema": {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "example": "750e8400-e29b-41d4-a716-446655440002",
+ "format": "uuid",
+ "type": "string"
+ }
}
],
"responses": {
@@ -78566,6 +79067,18 @@
"minLength": 1,
"type": "string"
}
+ },
+ {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "in": "query",
+ "name": "workspace_id",
+ "required": false,
+ "schema": {
+ "description": "Workspace to act in. Also accepted as a `workspace_id` field in a JSON request body. Defaults to the key's workspace for a key limited to one workspace, otherwise to the account's default workspace.",
+ "example": "750e8400-e29b-41d4-a716-446655440002",
+ "format": "uuid",
+ "type": "string"
+ }
}
],
"responses": {