AI Magicx
Getting Started

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

  1. Generate API Key

    Code
    Navigate to: https://beta.aimagicx.com/home/[account]/api-keys Create a new API key with appropriate permissions
  2. Test Connection

    Code(bash)
    curl -X POST https://beta.aimagicx.com/api/v1/chat \ -H "Authorization: Bearer mgx-sk-your-api-key" \ -H "Content-Type: application/json" \ -d '{ "message": "Hello, AI!", "model": "4o-mini" }'
  3. Verify Response Successful responses include usage tracking headers and structured JSON data.

API Architecture

Base URL

Code
https://beta.aimagicx.com/api/v1

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

PlanMonthly CreditsOverage RateRate LimitUse Case
API Starter1,000$0.04/credit30 req/minDevelopment & testing
API Professional5,000$0.02/credit120 req/minProduction applications
Professional500$0.03/credit60 req/minBusiness integration
EnterpriseCustomCustomCustomLarge-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

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

Last modified on