Generate API client code from OpenAPI specs or API documentation.
---
name: api-client
description: Generate API client code
version: 1.0.0
---
# API Client Generator
Create type-safe API clients from specifications.
## Input Formats
- OpenAPI 3.0
- Swagger 2.0
- GraphQL Schema
- API documentation URL
## Output Languages
- TypeScript
- Python
- Go
## Features
- Full type definitions
- Error handling
- Request/response types
- Authentication helpers
- Retry logic
## Example Output
```typescript
export class UsersApi {
constructor(private client: ApiClient) {}
async getUsers(params?: GetUsersParams): Promise<User[]> {
return this.client.get('/users', { params });
}
async getUser(id: string): Promise<User> {
return this.client.get(`/users/${id}`);
}
async createUser(data: CreateUserInput): Promise<User> {
return this.client.post('/users', data);
}
async updateUser(id: string, data: UpdateUserInput): Promise<User> {
return this.client.patch(`/users/${id}`, data);
}
async deleteUser(id: string): Promise<void> {
return this.client.delete(`/users/${id}`);
}
}
```AI Agent Skills are reusable workflow packages that extend your AI coding assistant with multi-step capabilities. Install api-client by following these steps.
.cursor/skills/ or .codex/skills/ directory