API Integrator
Integrate third-party APIs/SDKs by researching docs, matching project patterns, and implementing based on user intent.
Workflow
- Gather Requirements
Collect from user:
-
API/service name (required)
-
Intent - what they want to accomplish (required)
-
Docs URL (optional - will search if not provided)
- Research
Search web for:
-
"[API name] API documentation"
-
"[API name] [project-language] SDK" (e.g., "Stripe TypeScript SDK")
-
"[API name] OpenAPI spec" (if available, helps identify endpoints)
SDK preference: Use SDK matching project language if available, otherwise raw API.
- Analyze Project
Find existing patterns:
-
Language/framework detection
-
Service location: src/services/ , lib/api/ , utils/
-
Naming: XxxService , XxxClient , XxxApi
-
HTTP client: axios, fetch, got (match existing usage)
-
Types: TypeScript interfaces, Zod schemas
-
Error handling: existing patterns
-
Env vars: .env structure
- Propose Implementation
Based on intent, propose:
-
Specific endpoints/methods to implement
-
Service structure
-
Types needed
Get user confirmation before implementing.
- Implement
Following project conventions:
-
Service/wrapper class
-
Types/interfaces for responses
-
Error handling matching project patterns
-
Requested functionality
- Output Next Steps
End with checklist:
Next Steps to Complete Integration
- Add
API_KEY_NAMEto.env - Get API key from [service dashboard URL]
- [Any other setup: domain verification, webhooks, etc.]
Example
User: "Connect to the Resend API to send welcome emails"
-
Research: Find Resend has TypeScript SDK (resend )
-
Project: TypeScript, services in src/services/ , uses interfaces
-
Propose: Create EmailService with sendWelcomeEmail() → user confirms
-
Implement: src/services/email.service.ts following patterns
-
Next Steps: Add RESEND_API_KEY , get key from resend.com, verify domain