Function: customHostConfiguration()
function customHostConfiguration(options): {
provider_auth_type: "apiKey";
custom_host: string;
custom_headers: Record<string, string>;
};
Defined in: src/ai-gateway/integrations-client.ts:68
Build the configurations object that points a provider integration at a self-hosted or
OpenAI-compatible endpoint. Live-verified 2026-09-12 on open-ai and x-ai: the gateway
accepts custom_host only together with provider_auth_type: 'apiKey', on both create and
update; custom_headers may be empty.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | CustomHostConfigurationOptions | Host and optional headers. |
Returns
{
provider_auth_type: "apiKey";
custom_host: string;
custom_headers: Record<string, string>;
}
A configuration object for integrations.create() or integrations.update().
provider_auth_type
provider_auth_type: "apiKey";
custom_host
custom_host: string;
custom_headers
custom_headers: Record<string, string>;
Throws
When the host is not an absolute http(s) URL.
Example
import { AIGatewayClient, customHostConfiguration } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
await gw.integrations.create({
organisation_id: '1001464285',
ai_provider_id: await gw.integrations.resolveProviderId('open-ai'),
name: 'talos7',
slug: 'talos7',
key: process.env.QWEN_API_KEY,
configurations: customHostConfiguration({
host: 'http://qwen38-talos7.ai-inference.svc.cluster.local:8000/v1',
}),
});