Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    API Client Generator

    1

    Generate dependency-free, type-safe Python and TypeScript API clients from OpenAPI/Swagger specs.

    $1.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    API Client Generator

    API Client Generator

    Example session with this skill installed

    Generate a Python client for my petstore_api.yaml spec. Use PetStoreClient as the class name and include retries.

    • Read your context and instructions
    • Compiled the api client generator

    Generated a standalone Python client based on your OpenAPI spec. The code uses urllib.request and dataclasses for zero-dependency integration.

    Python API Client (petstore_client.py)

    import json
    import time
    import urllib.request
    import urllib.error
    from dataclasses import dataclass, asdict
    from typing import List, Optional, Dict, Any
    
    class APIError(Exception):
        def __init__(self, message, status_code=None):
            self.message = message
            self.status_code = status_code
            super().__init__(self.message)
    
    @dataclass
    class Pet:
        id: int
        name: str
        tag: Optional[str] = None
    
    class PetStoreClient:
        def __init__(self, base_url: str, token: str = None, timeout: int = 30):
            self.base_url = base_url.rstrip('/')
            self.token = token
            self.timeout = timeout
    
        def _request(self, method: str, path: str, params: Dict = None, data: Any = None):
            url = f"{self.base_url}{path}"
            if params:
                query = urllib.parse.urlencode(params)
                url += f"?{query}"
            
            req = urllib.request.Request(url, method=method)
            if self.token:
                req.add_header("Authorization", f"Bearer {self.token}")
            if data:
                req.add_header("Content-Type", "application/json")
                req_data = json.dumps(data).encode("utf-8")
            else:
                req_data = None
    
            retries = 3
            for attempt in range(retries):
                try:
                    with urllib.request.urlopen(req, data=req_data, timeout=self.timeout) as resp:
                        return json.loads(resp.read().decode("utf-8"))
                except urllib.error.HTTPError as e:
                    if (e.code == 429 or e.code >= 500) and attempt < retries - 1:
                        time.sleep(2 ** attempt)
                        continue
                    raise APIError(e.reason, e.code)
                except Exception as e:
                    raise APIError(str(e))
    
        def list_pets(self, limit: int = 10) -> List[Pet]:
            """List all pets"""
            res = self._request("GET", "/pets", params={"limit": limit})
            return [Pet(**item) for item in res]
    
        def get_pet(self, pet_id: str) -> Pet:
            """Find pet by ID"""
            res = self._request("GET", f"/pets/{pet_id}")
            return Pet(**res)
    

    Next steps

    1. Save the code to petstore_client.py.
    2. Initialize with client = PetStoreClient(base_url="https://api.petstore.com", token="YOUR_KEY").
    3. Call client.list_pets() to fetch data with full type hinting.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Hand-writing API request logic is repetitive and error-prone. This skill automates the creation of typed, dependency-free client SDKs directly from OpenAPI 3 or Swagger 2 specifications. It eliminates the overhead of managing third-party request libraries while ensuring full type safety for your API interactions.

    What it does

    • Python SDK Generation creates a standard library-only client using urllib, dataclasses, and TypedDict.
    • TypeScript SDK Generation builds a fetch-based client with full interface definitions for all schemas.
    • Resilient Networking implements automatic retries with exponential backoff for 429 and 5xx errors in Python.
    • Typed Method Mapping converts operationIds into idiomatic methods with proper path, query, and body parameters.
    • Built-in Timeouts supports native AbortController in TypeScript and timeout configurations in Python.

    How it works

    1. Provide the Spec by pointing the agent to a local openapi.yaml or swagger.json file.
    2. Select Language by specifying either --lang python or --lang typescript.
    3. Configure Output by naming the output file and optionally the main client class name.
    4. Initialize and Call the generated client using the provided constructor for base URLs and auth tokens.

    Frameworks & tools

    OpenAPI 3, Swagger 2, Python (urllib, dataclasses), TypeScript (Fetch API, AbortController).

    Why this beats prompting it yourself

    Generic prompts often miss edge cases like exponential backoff or complex nested schema mappings. This skill enforces a consistent, dependency-free architecture that follows best practices for both Python and TypeScript without the bloat of external HTTP libraries.

    Use cases

    • Generate a type-safe client for a new internal microservice.
    • Replace fragile, hand-written requests or axios boilerplate.
    • Update frontend API bindings instantly after a backend schema change.
    • Create lightweight SDKs for public APIs to distribute to users.

    Known limitations

    Does not support third-party libraries like requests or axios. Requires valid OpenAPI 3 or Swagger 2 specifications.

    Only generates code using Python's standard library or native TypeScript Fetch. Requires valid OpenAPI 3.0 or Swagger 2.0 specs.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Requires

    Python

    Permissions

    Terminal / Shell
    Listed1 month ago
    Updated1 month ago

    What's inside

    Frequently Asked Questions

    This skill generates code that relies exclusively on built-in language features like Python's `urllib` and TypeScript's `Fetch API`. This means your project remains lightweight, avoids 'dependency hell,' and eliminates the need to manage external libraries like `requests` or `axios`.

    The skill supports both OpenAPI 3.0+ and Swagger 2.0 specifications in either JSON or YAML formats. As long as your specification is valid, the agent can parse complex nested schemas and varied authentication methods.

    Yes, the generated clients include built-in resilient networking features, such as automatic retries with exponential backoff for Python and native timeout support for both languages. This ensures your API integrations are production-ready out of the box.

    When you purchase this skill, you receive the full AI agent logic for client generation, plus a quick-start guide and example outputs for both Python and TypeScript to help you verify your first build.

    This skill is designed to work with any AI agent platform that supports file I/O and command-line style instructions. It is optimized for environments where the agent can read a local spec file and output a complete source code file to your workspace.

    Absolutely—the generator maps `operationIds` to idiomatic methods, so you can simply re-run the skill whenever your `openapi.yaml` changes to instantly update your frontend or backend bindings with full type safety.

    New in APIs & Backend