LLM-provider compatible APIs

Prerequisites

To use Palantir-provided language models, AIP must first be enabled on your enrollment. You must also have permissions to use AIP builder capabilities.

Foundry provides proxy endpoints for popular LLM providers, accepting requests in the same format as the providers' native APIs. This enables use of open-source SDKs and tooling while benefiting from Foundry capabilities such as rate limiting, data governance, and usage tracking.

The currently supported provider APIs and corresponding Foundry endpoints are as follows:

Request shapes

Authentication is sent using the following bearer token header:

Authorization: Bearer {FOUNDRY_TOKEN}

Requests to these endpoints should have the same shape as the corresponding provider endpoint. Refer to the provider’s documentation for the expected request format.

Some providers, for example, Anthropic, use a non-standard authentication header. When using their SDKs, you may need to configure the authentication method to use a bearer token instead. Providers that already use bearer token authentication, such as OpenAI, require no special configuration.

AIP integration and data governance

These endpoints enforce the same zero data retention (ZDR) and georestriction requirements as other AIP usage. Any provider API features that are incompatible with these requirements will not be available through Foundry endpoints.

Only models and providers that have been enabled on your enrollment will be available through these endpoints. For models served by multiple providers, requests will only be routed to enabled providers. Endpoint usage is visible in the Resource Management application, and is subject to rate limiting.

Use Claude Code through AIP

These endpoints can be used to back tools such as Claude Code. To do so, set two environment variables in your terminal:

  • ANTHROPIC_AUTH_TOKEN: A valid Foundry token.
  • ANTHROPIC_BASE_URL: {FOUNDRY_URL}/api/v2/llm/proxy/anthropic, where {FOUNDRY_URL} is the enrollment URL.

With these environment variables set, start Claude Code as usual with the claude command. All requests will be routed through AIP with rate limiting, ZDR guarantees, and usage tracking.