API Documentation
AI Magicx API Documentation
Overview
AI Magicx provides a comprehensive REST API platform that enables developers to integrate state-of-the-art AI capabilities into their applications. Our unified API offers access to leading AI models, image generation services, and advanced tools through a single, consistent interface.
Core Capabilities
Artificial Intelligence Models
Access industry-leading AI models through our unified interface:
- OpenAI: GPT-4o, GPT-4o-mini, O3 series
- Anthropic: Claude 4 Sonnet, Claude Opus 4
- Google: Gemini 2.5 Flash, Gemini 2.5 Pro
- Open Source: Llama 3.3, Mistral, and more
Image Generation Services
Create high-quality images and graphics programmatically:
- DALL-E 3: Advanced creative image generation
- Flux Models: High-performance image synthesis
- Stable Diffusion: Fine-grained control and customization
- Logo Generation: Specialized AI for professional logo design
Integrated Tools & Services
Enhance your applications with built-in capabilities:
- Data Visualization: Chart and graph generation
- Utility Services: Weather data, currency conversion, translations
- Web Search: Real-time information retrieval
- Code Execution: Sandboxed Python environment
Getting Started
Prerequisites
- Active AI Magicx account
- API-enabled subscription plan
- Valid API key from your dashboard
Initial Setup
-
Generate API Key
Code -
Test Connection
Code(bash) -
Verify Response Successful responses include usage tracking headers and structured JSON data.
API Architecture
Base URL
Code
Authentication
All requests require Bearer token authentication using your API key.
Response Format
Standardized JSON responses with consistent error handling and metadata.
Rate Limiting
Dynamic rate limits based on your subscription tier, with clear header indicators.
Billing & Usage
Credit System
Our API operates on a credit-based system where each request consumes credits based on the operation type and complexity.
Base Credit Consumption
- Chat Completions: 1 credit + 1 per tool/function used
- Image Generation: 1 credit per image
- Logo Generation: 1 credit per logo
- Model Listing: 1 credit per request
- Usage Queries: 1 credit per request
Pay-As-You-Go Overage
When your monthly credit allocation is exhausted, our pay-as-you-go overage system ensures uninterrupted service:
- Automatic Activation: Overage billing activates seamlessly when credits are depleted
- Transparent Pricing: Pay only for what you use beyond your plan limits
- Real-time Tracking: Monitor overage usage through API headers and endpoints
- Monthly Billing: Overage charges are consolidated and billed at the end of each billing period
- No Service Interruption: Your applications continue running without downtime
Subscription Plans
Plan | Monthly Credits | Overage Rate | Rate Limit | Use Case |
---|---|---|---|---|
API Starter | 1,000 | $0.04/credit | 30 req/min | Development & testing |
API Professional | 5,000 | $0.02/credit | 120 req/min | Production applications |
Professional | 500 | $0.03/credit | 60 req/min | Business integration |
Enterprise | Custom | Custom | Custom | Large-scale deployment |
Usage Monitoring
Track your API consumption in real-time through:
- Response Headers: Credit usage included in every API response
- Usage Endpoints: Dedicated APIs for detailed usage analytics
- Dashboard: Visual monitoring at beta.aimagicx.com
- Webhooks: Configure alerts for usage thresholds
Documentation Guide
Essential Resources
- API Overview: Technical specifications and endpoints
- Authentication: Security implementation guide
- Chat API: Conversational AI integration
- Image Generation: Visual content creation
- Models & Tools: Available models and capabilities
- Usage & Billing: Credit tracking and billing details
- Code Examples: Production-ready implementations
OpenAPI Specification
Access our complete OpenAPI 3.0 specification for:
- Interactive API explorer
- Request/response schemas
- Code generation support
- Postman collection export
Best Practices
Security
- Store API keys securely using environment variables
- Implement key rotation policies
- Use least-privilege access principles
- Monitor for unusual usage patterns
Performance
- Implement exponential backoff for retries
- Cache responses when appropriate
- Use streaming for large responses
- Batch requests where possible
Error Handling
- Parse error codes and messages
- Implement graceful degradation
- Log errors for debugging
- Monitor error rates
Support
Technical Support
- Email: contact@aimagicx.com
- Response Time: < 24 hours for production issues
- Documentation: Continuously updated
Service Status
- API Status Page: status.aimagicx.com
- Planned Maintenance: Announced 72 hours in advance
- SLA: 99.9% uptime for Enterprise plans
Compliance & Security
- Data Protection: GDPR compliant
- Encryption: TLS 1.3 for all API communications
- Authentication: Industry-standard OAuth 2.0
- Audit Logs: Complete API activity tracking
- ISO Certification: ISO 27001 (in progress)
API Version: 1.0 | Last Updated: July 11, 2025