Complete API documentation for integrating a9x11 ai into your applications. RESTful endpoints, SDKs, and code examples.
Save code changes with AI analysis
Get code preview with syntax highlighting
Restore code to previous version
Get AI-powered code suggestions
Refactor code using AI
Get Git repository status
Create automated Git commit
List all projects
Save your code with AI analysis and automatic optimization suggestions.
curl -X POST https://api.a9x11 ai/v1/save \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "proj_123",
"file_path": "src/components/Button.tsx",
"content": "export const Button = ({ children, onClick }) => {\n return (\n <button onClick={onClick} className=\"btn\">\n {children}\n </button>\n );\n};",
"language": "typescript",
"ai_analysis": true
}'{
"success": true,
"data": {
"save_id": "save_456",
"ai_suggestions": [
{
"type": "optimization",
"message": "Consider adding PropTypes or TypeScript interfaces for better type safety",
"line": 1,
"severity": "info"
}
],
"optimized_content": "export interface ButtonProps {\n children: React.ReactNode;\n onClick: () => void;\n}\n\nexport const Button: React.FC<ButtonProps> = ({ children, onClick }) => {\n return (\n <button onClick={onClick} className=\"btn\">\n {children}\n </button>\n );\n};"
}
}Install: npm install @a9x11/sdk
import { A9X11Client } from '@a9x11/sdk';
const client = new A9X11Client({
apiKey: process.env.A9X11_API_KEY
});
// Save code
const result = await client.save({
projectId: 'proj_123',
filePath: 'src/App.js',
content: codeContent,
language: 'javascript'
});Install: pip install a9x11-sdk
from a9x11 import A9X11Client
client = A9X11Client(api_key="your_api_key")
# Save code
result = client.save(
project_id="proj_123",
file_path="src/app.py",
content=code_content,
language="python"
)Install: go get github.com/a9x11/go-sdk
package main
import "github.com/a9x11/go-sdk"
func main() {
client := a9x11.NewClient("your_api_key")
result, err := client.Save(a9x11.SaveRequest{
ProjectID: "proj_123",
FilePath: "src/main.go",
Content: codeContent,
Language: "go",
})
}Get your API key and start integrating a9x11 ai into your applications today.