List all members of the organization associated with the authenticated management key. Management key required.
Example Usage
import { OpenRouter } from "@openrouter/sdk";const openRouter = new OpenRouter({ httpReferer: "<value>", appTitle: "<value>", appCategories: "<value>", apiKey: process.env["OPENROUTER_API_KEY"] ?? "",});async function run() { const result = await openRouter.organization.listMembers(); for await (const page of result) { console.log(page); }}run();
Standalone function
The standalone function version of this method:
import { OpenRouterCore } from "@openrouter/sdk/core.js";import { organizationListMembers } from "@openrouter/sdk/funcs/organizationListMembers.js";// Use `OpenRouterCore` for best tree-shaking performance.// You can create one instance of it to use across an application.const openRouter = new OpenRouterCore({ httpReferer: "<value>", appTitle: "<value>", appCategories: "<value>", apiKey: process.env["OPENROUTER_API_KEY"] ?? "",});async function run() { const res = await organizationListMembers(openRouter); if (res.ok) { const { value: result } = res; for await (const page of result) { console.log(page); } } else { console.log("organizationListMembers failed:", res.error); }}run();
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
Get the settings of the organization associated with the authenticated management key. Management key required.
Example Usage
import { OpenRouter } from "@openrouter/sdk";const openRouter = new OpenRouter({ httpReferer: "<value>", appTitle: "<value>", appCategories: "<value>", apiKey: process.env["OPENROUTER_API_KEY"] ?? "",});async function run() { const result = await openRouter.organization.getSettings(); console.log(result);}run();
Standalone function
The standalone function version of this method:
import { OpenRouterCore } from "@openrouter/sdk/core.js";import { organizationGetSettings } from "@openrouter/sdk/funcs/organizationGetSettings.js";// Use `OpenRouterCore` for best tree-shaking performance.// You can create one instance of it to use across an application.const openRouter = new OpenRouterCore({ httpReferer: "<value>", appTitle: "<value>", appCategories: "<value>", apiKey: process.env["OPENROUTER_API_KEY"] ?? "",});async function run() { const res = await organizationGetSettings(openRouter); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("organizationGetSettings failed:", res.error); }}run();
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
Update the settings of the organization associated with the authenticated management key. Management key required.
Example Usage
import { OpenRouter } from "@openrouter/sdk";const openRouter = new OpenRouter({ httpReferer: "<value>", appTitle: "<value>", appCategories: "<value>", apiKey: process.env["OPENROUTER_API_KEY"] ?? "",});async function run() { const result = await openRouter.organization.updateSettings({ updateOrganizationSettingsRequest: { isFilteredModelCatalogEnabled: true, }, }); console.log(result);}run();
Standalone function
The standalone function version of this method:
import { OpenRouterCore } from "@openrouter/sdk/core.js";import { organizationUpdateSettings } from "@openrouter/sdk/funcs/organizationUpdateSettings.js";// Use `OpenRouterCore` for best tree-shaking performance.// You can create one instance of it to use across an application.const openRouter = new OpenRouterCore({ httpReferer: "<value>", appTitle: "<value>", appCategories: "<value>", apiKey: process.env["OPENROUTER_API_KEY"] ?? "",});async function run() { const res = await organizationUpdateSettings(openRouter, { updateOrganizationSettingsRequest: { isFilteredModelCatalogEnabled: true, }, }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("organizationUpdateSettings failed:", res.error); }}run();
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.