--- title: AJ STUDIOZ API emoji: 🤖 colorFrom: blue colorTo: purple sdk: docker pinned: false license: mit --- # AJ STUDIOZ API - Enterprise AI Platform **AJ-Mini v1.0** - Your AI assistant powered by Qwen 2.5 Coder 7B with AJ STUDIOZ branding, Claude API compatibility, and powerful coding abilities. ## 🚀 Features - **AJ-Mini Model** - Based on Qwen 2.5 Coder 7B (Best for coding & all tasks) - **Anthropic Claude Compatible** - Drop-in replacement for Claude API - **OpenAI Compatible API** - Also works with OpenAI format - **Advanced Code Generation** - Excellent at programming in all languages - **Multi-language Support** - Python, JavaScript, Java, C++, and more - **Streaming Support** - Real-time response streaming - **Enterprise Security** - API key authentication - **24/7 Availability** - Always online on Hugging Face Spaces - **🆓 LIFETIME FREE** - No rate limits, no usage caps, free forever - **Unlimited Requests** - Use as much as you need ## 🔑 Authentication ### Anthropic Claude Format (Recommended for Claude users) ```bash x-api-key: sk-ant-your_secret_key_here ``` ### OpenAI Format (For OpenAI users) ```bash Authorization: Bearer aj_your_secret_key_here ``` **Both formats work!** Use whichever you prefer. ## 📡 API Endpoints ### 1. Anthropic Claude Messages (NEW! 🎉) **Exact same format as Claude API:** ```bash curl https://YOUR-SPACE.hf.space/v1/messages \ --header "x-api-key: sk-ant-api03-YourKeyHere" \ --header "anthropic-version: 2023-06-01" \ --header "content-type: application/json" \ --data '{ "model": "claude-sonnet-4-20250514", "max_tokens": 1024, "messages": [ {"role": "user", "content": "Write a Python function to sort a list"} ] }' ``` **Response format (Claude-compatible):** ```json { "id": "msg_abc123...", "type": "message", "role": "assistant", "content": [ { "type": "text", "text": "Here's a Python function..." } ], "model": "claude-sonnet-4-20250514", "stop_reason": "end_turn", "usage": { "input_tokens": 15, "output_tokens": 50 } } ``` ### 2. OpenAI Chat Completions ```bash curl https://YOUR-SPACE.hf.space/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer aj_your_key" \ -d '{ "model": "aj-mini", "messages": [{"role": "user", "content": "Hello AJ!"}], "stream": false }' ``` ### 2. OpenAI Chat Completions ```bash curl https://YOUR-SPACE.hf.space/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer aj_your_key" \ -d '{ "model": "aj-mini", "messages": [{"role": "user", "content": "Explain async/await in JavaScript"}], "stream": false }' ``` ### 3. Text Completions ```bash curl https://YOUR-SPACE.hf.space/v1/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer aj_your_key" \ -d '{ "model": "aj-mini", "prompt": "Write a poem about AI", "max_tokens": 500 }' ``` ### 3. Text Completions ```bash curl https://YOUR-SPACE.hf.space/v1/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer aj_your_key" \ -d '{ "model": "aj-mini", "prompt": "Write a REST API in Node.js", "max_tokens": 500 }' ``` ### 4. Simple Chat Interface ```bash curl https://YOUR-SPACE.hf.space/chat \ -H "Content-Type: application/json" \ -d '{"message": "Hello AJ!"}' ``` ### 4. Simple Chat Interface ```bash curl https://YOUR-SPACE.hf.space/chat \ -H "Content-Type: application/json" \ -d '{"message": "Create a React component for a login form"}' ``` ### 5. Direct Generation ```bash curl https://YOUR-SPACE.hf.space/api/generate \ -H "Content-Type: application/json" \ -d '{ "prompt": "Explain quantum computing", "max_tokens": 1000, "temperature": 0.3 }' ``` ## 🎯 Model Information - **Name**: AJ-Mini v1.0 - **Base**: Qwen 2.5 Coder 7B Instruct - **Size**: 7 Billion parameters - **Context**: 32K tokens - **Specialties**: - 🔥 Advanced code generation (Python, JS, Java, C++, Go, Rust, etc.) - 💡 Algorithm design and optimization - 🐛 Bug fixing and code review - 📝 Technical documentation - 🎓 Teaching and explanations - 🌍 Multi-language support - **Temperature**: 1.0 (default, configurable) - **Developer**: AJ STUDIOZ - **Website**: https://ajstudioz.co.in ## 🛠️ Integration Examples ### Python with Anthropic SDK ```python import anthropic client = anthropic.Anthropic( api_key="sk-ant-your-key-here", base_url="https://YOUR-SPACE.hf.space" ) message = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[ {"role": "user", "content": "Write a binary search function in Python"} ] ) print(message.content[0].text) ``` ### Python with OpenAI SDK ```python from openai import OpenAI client = OpenAI( base_url="https://YOUR-SPACE.hf.space/v1", api_key="aj_your_key_here" ) response = client.chat.completions.create( model="aj-mini", messages=[{"role": "user", "content": "Hello!"}] ) print(response.choices[0].message.content) ``` ### Python with OpenAI SDK ```python from openai import OpenAI client = OpenAI( base_url="https://YOUR-SPACE.hf.space/v1", api_key="aj_your_key_here" ) response = client.chat.completions.create( model="aj-mini", messages=[{"role": "user", "content": "Explain decorators in Python"}] ) print(response.choices[0].message.content) ``` ### cURL with Anthropic Format ```bash curl https://YOUR-SPACE.hf.space/v1/messages \ --header "x-api-key: sk-ant-your-key" \ --header "anthropic-version: 2023-06-01" \ --header "content-type: application/json" \ --data '{ "model": "claude-sonnet-4-20250514", "max_tokens": 2048, "messages": [ { "role": "user", "content": "Write a function to calculate Fibonacci numbers with memoization" } ] }' ``` ### JavaScript/Node.js ```javascript const response = await fetch('https://YOUR-SPACE.hf.space/chat', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ message: 'Hello AJ!' }) }); const data = await response.json(); console.log(data.reply); ``` ## 📊 Response Format All responses include AJ STUDIOZ branding: ```json { "reply": "Response content...", "model": "AJ-Mini v1.0", "provider": "AJ STUDIOZ" } ``` ## 🔒 Security Features - API key validation (must start with `aj_`) - CORS enabled for web applications - **NO rate limiting** - Unlimited requests forever - **100% FREE** - No hidden costs or premium tiers - Secure token handling ## 💎 Pricing **LIFETIME FREE** - ✅ Unlimited API calls - ✅ No rate limits - ✅ No usage caps - ✅ No credit card required - ✅ 24/7 availability - ✅ Full OpenAI compatibility - ✅ Enterprise features included *Forever free. Always available. Built by AJ STUDIOZ.* ## 📈 Status & Health Check API health: ```bash curl https://YOUR-SPACE.hf.space/health ``` Get model information: ```bash curl https://YOUR-SPACE.hf.space/ ``` --- **Developed by AJ STUDIOZ** 🚀 Enterprise-grade AI solutions with professional support