OpenAI Custom Endpoint Header Auth Account

You can use this account for an endpoint where users enter a base URL and Auth headers to get access.

Using this account, requests originally sent to OpenAI endpoints are redirected to new ones that share the specified base URL. The path portion remains unchanged.

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.

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.

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

Legend:
  • 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.
Learn more about the icons in the Snap settings dialog.
Field / Field set Type Description
Label String

Required. Specify a unique label for the account.

Default value: N/A

Endpoint String/Expression

Required. Specify the endpoint to send the request to.

Default value: N/A

Example: https://fm-cloud-snaplogic-apim.labs.snaplogicdev.com/service/OpenAI_API_4/2.3.0
Authorization Represents the settings for the authorization header.
Scheme String/Expression
Specify or select the scheme for the authorization header. The available options are:
  • Basic
  • Bearer
  • Digest
  • Mutual
  • NTLM
  • Kerberos
  • AWS4-HMAC-SHA256

Default: None

Example: Bearer
Token String/Expression

Specify the token of the authorization header.

Default value: N/A

Example: a9Dvb5MhbGFAc23hcGxvZ7ljLmNvbTpZDk5QEBAQA8==
Additional Auth Headers Use this field set to apply additional authentication-related headers.
Header Name String/Expression

Specify the name of the HTTP header.

Default value: N/A

Example: Accept-Encoding
Header Value String/Expression

Specify the value that you want to assign to the HTTP header.

Default value: N/A

Example: gzip, deflate, br