API Documentation
Integrate CodeMorph's powerful code transformation capabilities into your applications.
Getting Started
CodeMorph's REST API allows you to integrate our AI-powered code transformation capabilities directly into your applications. Follow these steps to get started:
1. Get Your API Key
Sign up for an account and generate an API key.
2. Authentication
Include your API key in the Authorization header.
3. Make Your First Request
Start transforming code using our simple API endpoints.
Base URL
Authentication
All API requests must include your API key in the Authorization header:
API Endpoints
Translate code between programming languages
Analyze code structure and complexity
Optimize code for performance
Process multiple files in a single request
Code Examples
curl -X POST "https://api.codemorph.ai/v1/translate" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "source": "python", "target": "javascript", "code": "def fibonacci(n):\n if n <= 1:\n return n\n return fibonacci(n-1) + fibonacci(n-2)" }'
Rate Limiting
Rate limits are applied on a per-API key basis. The following headers are included in all API responses:
X-RateLimit-Limit
The maximum number of requests allowed per time window
X-RateLimit-Remaining
The number of requests remaining in the current time window
X-RateLimit-Reset
The time when the current rate limit window resets
Need Help?
Our developer support team is here to help you integrate CodeMorph into your applications.