api-client

Makes authenticated HTTP requests to REST APIs with retry logic, rate limiting, and pagination.

4|2|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/Arete-Consortium/ai-skills --skill api-client-arete-consortium
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-client
Source: https://github.com/Arete-Consortium/ai-skills/tree/main/agents/integrations/api-client
Command: npx skills add https://github.com/Arete-Consortium/ai-skills --skill api-client-arete-consortium

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, urllib3.

What problem does it solve? Integrating with external REST APIs requires repetitive boilerplate for authentication, retries, rate limit handling, and pagination, and mistakes like hardcoded credentials or ignored 429 responses cause security incidents and account bans. ## Core Features & Use Cases - Authenticated Requests: Supports bearer token, API key (header or query), OAuth2 client credentials, and basic auth, with credentials loaded only from environment variables. - Pagination & Batch Operations: Aggregates paginated collections with a max_pages safety cap and executes concurrent batch requests with configurable concurrency limits. - Structured Error Handling: Returns typed responses with status codes, durations, and retry counts, following an escalation ladder that retries 429 and 5xx errors but never retries 4xx client errors. - Use Case: Fetch all open issues from the GitHub API using a bearer token, automatically paginating through results while respecting X-RateLimit headers, then receive a structured list ready for downstream processing. ## Quick Start Ask the agent to fetch all issues from the GitHub API endpoint repos/owner/repo/issues using bearer token authentication with pagination enabled.

Frequently Asked Questions about api-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make authenticated API requests in Python with retry logic?▼

Use the requests library with a Session configured with HTTPAdapter and Retry from urllib3, setting status_forcelist to [500, 502, 503, 504] and a backoff_factor for exponential delays. Load tokens from environment variables and attach them as Authorization headers.

How to handle API rate limiting and 429 responses?▼

Track X-RateLimit-Remaining and X-RateLimit-Reset headers on every response and pause requests when the remaining count approaches zero. On a 429 response, read the Retry-After header, wait that duration, then retry up to three times.

What authentication methods does this API client support?▼

It supports bearer token, API key in header or query parameter, OAuth2 client credentials flow, and HTTP basic auth. All credentials are read exclusively from environment variables such as API_BEARER_TOKEN, API_KEY, and OAUTH_CLIENT_SECRET.

Should I retry failed HTTP requests on 4xx errors?▼

No, 4xx client errors like 400, 403, and 404 indicate bad requests that will not succeed on retry, so return the error immediately. The only exceptions are 401, where an OAuth2 token refresh may help, and 429, which requires waiting for the rate limit window.

When should I not use an API client skill for HTTP requests?▼

Avoid it for scraping HTML pages, which needs DOM extraction rather than JSON parsing, and for web search, which needs query formulation. For simple unauthenticated requests to local services, calling curl directly through Bash has less overhead.

How do I fetch all pages from a paginated REST API endpoint?▼

Loop through pages by incrementing the page parameter with a fixed per_page value, aggregating results until an empty page is returned. Always set a max_pages cap, such as 100, to prevent unbounded fetching that exhausts memory and API quotas.