API Client Generator

中级development最低上下文:64K

Generates type-safe API client SDKs from OpenAPI specs, API documentation, or example requests. Produces clean, well-typed client code with error handling, retry logic, pagination helpers, and authentication setup. Supports TypeScript, Python, Go, and Rust.

使用场景

  • Generating a TypeScript SDK from an OpenAPI 3.1 spec
  • Creating a Python client for a REST API with auth and pagination
  • Building a Go client with context support and retry logic
  • Wrapping a third-party API with a clean typed interface
  • Adding request/response validation to an existing client

示例提示词

Generate a TypeScript API client for this OpenAPI spec:

```yaml
openapi: 3.1.0
info:
  title: Tasks API
  version: 1.0.0
paths:
  /tasks:
    get:
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum: [pending, done]
        - name: page
          in: query
          schema:
            type: integer
      responses:
        200:
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Task'
                  total:
                    type: integer
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTask'
      responses:
        201:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
```

Requirements:
- Full TypeScript types for all request/response shapes
- Bearer token auth with configurable base URL
- Automatic pagination helper
- Proper error handling with typed errors
- Zero external dependencies (use native fetch)

推荐模型

兼容工具

claude-codecursorkiroany

模态

输入: text, code
输出: code, text

相关 Skills

作者

OpenModels Community

@openmodelsrun