OpenAI Custom Endpoint Account
Overview
You can use this account to connectOpenAI LLM Snaps to services that support the OpenAI API specification, such as an SnapLogic APIM 3.0 service, or proxy for AI apps in OpenRouter or Hugging Face.
By using this account instead of directly sending requests to the OpenAI endpoint, you can replace the base part (such as a schema, host, and port) of the original URL with your configured endpoint, while keeping the path and other segments unchanged. This base URL can be an APIM service URL with an authentication policy rule like the Callout Authenticator or a URL of another other service that uses the OpenAI API.
For example, if you set the endpoint to https://www.example.com
,
then a request originally destined for https://api.openai.com/v1/chat/completions
will instead be sent to https://www.example.com/chat/completions
.
Prerequisites
- A proxy or service to connect to that complies with the OpenAI API specification and doesn't require any authentication. Learn more about the Account setup
Usage Guidelines
You can download this YAML file to start your APIM service in APIM 3.0.
You can download this YAML file to create an API service on SnapLogic API Manager 3.0. This will allow you to centralize the management of requests sent to OpenAI. After creation, you can use this account to send requests to the API service.
Known Issues
When using the OpenAI Upload File Snap with this account and setting the endpoint to a service on API Manager, an HTTP 500
error is returned. This is due to the Transfer-Encoding
header.
Workaround: Add a transform policy in APIM to remove this header.
Account settings
- Expression icon (
): Allows using JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
Field / Field set | Type | Description |
---|---|---|
Label | String |
Required. Specify a unique label for the account. Default value: N/A Example: devOrg_toolkit |
Endpoint | String/Expression |
Required. Specify the endpoint to send the request to. The endpoint can also end with a '/'. Default value: N/A Example:https://fm-cloud-snaplogic-apim.labs.snaplogicdev.com/service/OpenAI_API_4/2.3.0 http://localhost:8090/service/OpenAI_API_21/2.3.0/ |