Palantir Foundry API Rate Limits

VerifiedSafe

Implement rate limiting, exponential backoff, and request queuing for Palantir Foundry API calls, handling 429 errors and optimizing throughput.

Sby Skills Guide Bot
DevelopmentIntermediate
8/20/2026
Claude Code
#palantir#rate-limiting#retry-logic#api-reliability#python

Recommended for

Automated summary

Implements rate limiting, exponential backoff, and request queuing for Palantir Foundry API calls, focusing on handling 429 errors.

Strengths

  • Provides a concrete table of limits per endpoint category (Ontology reads, Actions, datasets, search)
  • Offers a retry decorator with exponential jitter that honors the Retry-After header
  • Includes a reusable token bucket to smooth batch operations
  • Distinguishes retryable (429, 500, 502, 503) from non-retryable errors

Limitations

  • The code is tied to the foundry-platform-sdk Python library and doesn't cover other languages
  • The stated limits are indicative and vary by enrollment tier, which isn't detailed
  • The batch example is cut off and doesn't show results handling
When to use it

Use it when you hit 429 errors or throttling on the Foundry API and want retry logic and controlled throughput in a Python script.

When not to use it

Avoid it if you're not using the Foundry Python SDK or want general rate-limiting guidance unrelated to Palantir.

Security analysis

Safe
Quality score88/100

The skill only provides documentation and Python code snippets for implementing API rate limiting, retries, and queuing with the Palantir Foundry SDK. It does not instruct or execute destructive, exfiltration, or obfuscated actions, and its allowed tools are limited to Read, Write, and Edit.

No concerns found

How this analysis is made

Examples

Add retry to a Foundry call
My Foundry ontology reads keep failing with 429 errors. Help me wrap them with exponential backoff and Retry-After support.
Throttle a batch write
I need to apply 500 Actions against Palantir Foundry without hitting rate limits — set up a token bucket and rate-limited batch loop.
Diagnose throttling
Foundry is throttling my dataset reads, show me the typical rate limits per endpoint and how to read the X-RateLimit headers.

name: palantir-rate-limits description: 'Implement Palantir Foundry API rate limiting, backoff, and request queuing.

Use when handling 429 errors, implementing retry logic,

or optimizing API request throughput for Foundry.

Trigger with phrases like "palantir rate limit", "foundry throttling",

"palantir 429", "foundry retry", "palantir backoff".

' allowed-tools: Read, Write, Edit version: 1.5.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:

  • saas
  • palantir
  • foundry
  • rate-limits
  • reliability compatibility: Designed for Claude Code

Palantir Rate Limits

Overview

Handle Foundry API rate limits with exponential backoff, request queuing, and monitoring. Foundry rate limits vary by endpoint and enrollment tier.

Prerequisites

  • foundry-platform-sdk installed
  • Understanding of HTTP 429 responses

Instructions

Step 1: Understand Foundry Rate Limits

Foundry rate limits are per-user and per-endpoint. Key limits:

| Endpoint Category | Typical Limit | Burst | |-------------------|---------------|-------| | Ontology reads | 100 req/s | 200 | | Ontology writes (Actions) | 50 req/s | 100 | | Dataset reads | 50 req/s | 100 | | Search queries | 20 req/s | 50 |

Rate limit headers returned:

  • X-RateLimit-Limit — max requests per window
  • X-RateLimit-Remaining — requests left in window
  • Retry-After — seconds to wait (on 429)

Step 2: Implement Retry with Backoff (Python)

import time
import random
import foundry

def retry_foundry_call(fn, *args, max_retries=5, base_delay=1.0, **kwargs):
    """Retry Foundry API calls with jittered exponential backoff."""
    for attempt in range(max_retries + 1):
        try:
            return fn(*args, **kwargs)
        except foundry.ApiError as e:
            if attempt == max_retries:
                raise
            if e.status_code not in (429, 500, 502, 503):
                raise  # Non-retryable error
            delay = base_delay * (2 ** attempt) + random.uniform(0, 0.5)
            retry_after = getattr(e, "retry_after", None)
            if retry_after:
                delay = max(delay, float(retry_after))
            print(f"  Retry {attempt+1}/{max_retries} in {delay:.1f}s (HTTP {e.status_code})")
            time.sleep(delay)

# Usage
employees = retry_foundry_call(
    client.ontologies.OntologyObject.list,
    ontology="my-company", object_type="Employee", page_size=100,
)

Step 3: Request Queue for Batch Operations

import asyncio
from collections import deque

class FoundryRateLimiter:
    """Token bucket rate limiter for batch Foundry operations."""
    def __init__(self, max_per_second: int = 50):
        self.max_per_second = max_per_second
        self.tokens = max_per_second
        self._last_refill = time.monotonic()

    def _refill(self):
        now = time.monotonic()
        elapsed = now - self._last_refill
        self.tokens = min(self.max_per_second, self.tokens + elapsed * self.max_per_second)
        self._last_refill = now

    def acquire(self):
        self._refill()
        if self.tokens < 1:
            wait = (1 - self.tokens) / self.max_per_second
            time.sleep(wait)
            self._refill()
        self.tokens -= 1

limiter = FoundryRateLimiter(max_per_second=40)  # 80% of limit

def rate_limited_call(fn, *args, **kwargs):
    limiter.acquire()
    return retry_foundry_call(fn, *args, **kwargs)

Step 4: Batch Operations with Rate Limiting

def batch_update_objects(client, ontology, action_type, items, batch_size=10):
    """Apply actions in rate-limited batches."""
    results = []
    for i in range(0, len(items), batch_size):
        batch = items[i:i+batch_size]
        for item in batch:
            result = rate_limited_call(
                client.ontologies.Action.apply,
                ontology=ontology,
                action_type=action_type,
                parameters=item,
            )
            results.append({"item": item, "status": result.validation})
        print(f"  Processed {min(i+batch_size, len(items))}/{len(items)}")
    return results

Output

  • Automatic retry on 429/5xx with exponential backoff
  • Token bucket rate limiter for batch operations
  • Rate-limited batch processing for bulk updates

Error Handling

| HTTP Code | Meaning | Action | |-----------|---------|--------| | 429 | Rate limited | Wait Retry-After seconds, then retry | | 500 | Server error | Retry with backoff | | 502/503 | Gateway error | Retry with backoff | | 400/403/404 | Client error | Do not retry — fix the request |

Resources

Next Steps

For security best practices, see palantir-security-basics.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/palantir-foundry-api-rate-limits-mt11k8me/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/palantir-foundry-api-rate-limits-mt11k8me' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/palantir-foundry-api-rate-limits-mt11k8me/download' --output '.skill-downloads/palantir-foundry-api-rate-limits-mt11k8me/SKILL.md.part' && mv '.skill-downloads/palantir-foundry-api-rate-limits-mt11k8me/SKILL.md.part' '.skill-downloads/palantir-foundry-api-rate-limits-mt11k8me/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Environment declared by the author: Designed for Claude Code

Tools declared by the author (check availability in your agent): Read, Write, Edit

Original excerpt: Prerequisites
  • foundry-platform-sdk installed
  • Understanding of HTTP 429 responses

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/palantir-foundry-api-rate-limits-mt11k8me/SKILL.md' && test -s '.skill-downloads/palantir-foundry-api-rate-limits-mt11k8me/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/palantir-rate-limits' && cp -R '.skill-downloads/palantir-foundry-api-rate-limits-mt11k8me' '.claude/skills/palantir-rate-limits'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/palantir-foundry-api-rate-limits-mt11k8me'

openskills read 'palantir-foundry-api-rate-limits-mt11k8me'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/palantir-foundry-api-rate-limits-mt11k8me/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills