Quick start
Follow these steps to generate your first Moo-AI response. Creating a plan selection does not charge you. Stripe will present the subscription amount before you authorize payment.
- Choose a subscription plan
Open Moo-AI API pricing and select Starter, Developer, Pro or Business.
- Create an account and verify your email
Register or sign in. Open your verification email before proceeding.
- Complete Stripe Checkout
After verification, select your plan and approve the recurring subscription on Stripe. A successful payment must be reflected in your billing dashboard before paid API access is available.
- Create an API key
In My dashboard, click Create API key when your subscription is active. Copy the
sk_moo_...key immediately — it is shown only once. You can maintain up to five active keys. - Send an authenticated request
Store the key in a server-side environment variable and run a cURL, Python, Node.js, or PHP example below.
GET /v1/models with your key to discover catalog models permitted for your plan. A model may be listed but not currently running on a GPU.Authentication & API keys
Authenticated endpoints use an HTTP Bearer token. Keys start with sk_moo_ and are managed through your billing dashboard. Use HTTPS for all requests.
Authorization: Bearer sk_moo_YOUR_SECRET_KEY- Keep the full secret in a backend environment variable or secrets manager, not in a frontend bundle, browser local storage, GitHub repository, or URL.
- Copy new keys immediately; only a key prefix is shown later.
- If compromised, revoke the key in your dashboard, then generate another.
- An inactive or unpaid subscription cannot access paid API endpoints even if a key exists.
Endpoints
Base URL https://www.moozonian.com/moo-ai-api
| Method | Path | Authentication | Purpose |
|---|---|---|---|
| GET | /health | Public | Basic service health |
| GET | /v1/plans | Public | Current plan metadata and allowances |
| GET | /v1/models | Bearer key | Models permitted for your subscription |
| GET | /v1/usage | Bearer key | Credits, reservations and token usage |
| POST | /v1/chat/completions | Bearer key | Text or entitled vision inference, optionally streaming |
Chat request properties
| Field | Type | Notes |
|---|---|---|
model | string | Required. Use an ID returned from /v1/models. |
messages | array | 1–40 messages; roles system, user, assistant. |
max_tokens | integer | Positive. Must fit your plan's maximum output limit. Default: 512. |
temperature | number | 0–2. Default: 0.7. |
stream | boolean | Default false. Set true for SSE. |
stream_options.include_usage | boolean | Optionally emit usage data in a streaming response. |
The response follows a core OpenAI-style chat completions structure with choices[0].message.content and token usage. This is not a full OpenAI API clone (no tool calling, embeddings, or structured-output enforcement).
Connect your application
Choose your server-side language. Replace the placeholder API key with your own key; for Python, Node.js and cURL environment-variable examples, set MOO_AI_KEY on your server first.
# Save your key on your backend — never embed it in public JavaScript.
export MOO_AI_KEY='sk_moo_YOUR_SECRET_KEY'
curl -sS https://www.moozonian.com/moo-ai-api/v1/chat/completions \
-H "Authorization: Bearer $MOO_AI_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"moo-ai:quickoverview","messages":[{"role":"user","content":"Explain the benefits of renewable energy."}],"max_tokens":256}'# Python 3 · standard library only. Run this on a trusted server.
import json, os, urllib.request
base = 'https://www.moozonian.com/moo-ai-api/v1'
key = os.environ['MOO_AI_KEY']
request = urllib.request.Request(
base + '/chat/completions',
data=json.dumps({
'model': 'moo-ai:quickoverview',
'messages': [{'role': 'user', 'content': 'Hello Moo-AI!'}],
'max_tokens': 256
}).encode('utf-8'),
headers={
'Authorization': f'Bearer {key}',
'Content-Type': 'application/json'
},
method='POST'
)
with urllib.request.urlopen(request, timeout=180) as response:
result = json.load(response)
print(result['choices'][0]['message']['content'])// Node.js 18+ (server-side). Never expose your API key in browser code.
const endpoint = 'https://www.moozonian.com/moo-ai-api/v1/chat/completions';
const response = await fetch(endpoint, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MOO_AI_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'moo-ai:quickoverview',
messages: [{ role: 'user', content: 'Write a welcome message.' }],
max_tokens: 256
})
});
const data = await response.json();
if (!response.ok) throw new Error(data.error?.message || `HTTP ${response.status}`);
console.log(data.choices[0].message.content);<?php
// PHP 8.1+ · server-side cURL example
$key = getenv('MOO_AI_KEY');
$ch = curl_init('https://www.moozonian.com/moo-ai-api/v1/chat/completions');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 180,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$key,
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'moo-ai:quickoverview',
'messages' => [['role' => 'user', 'content' => 'Hello from PHP!']],
'max_tokens' => 256
], JSON_THROW_ON_ERROR)
]);
$raw = curl_exec($ch);
$status = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$data = json_decode((string)$raw, true);
if ($status !== 200) throw new RuntimeException($data['error']['message'] ?? 'API request failed');
echo $data['choices'][0]['message']['content'];moo-ai:quickoverview requires plan entitlement and an available model backend. If the model is not listed for your key, use a model ID returned by GET /v1/models.List models and check your allowance
curl -sS https://www.moozonian.com/moo-ai-api/v1/models \
-H "Authorization: Bearer $MOO_AI_KEY"
curl -sS https://www.moozonian.com/moo-ai-api/v1/usage \
-H "Authorization: Bearer $MOO_AI_KEY"The usage response includes your subscription plan, paid-through date, UTC month, credits allowed, used, reserved and remaining, and completed request/token totals.
Model catalog
Catalog entries and their minimum tiers are loaded from Moozonian's API model configuration. Model availability depends on a reachable backend; inclusion below is not a live readiness claim.
| Model ID | Minimum plan | Credit weight | Category |
|---|---|---|---|
moo-ai:quickoverview-fast | Starter | 1× | overview |
moo-ai:quickoverview | Starter | 1× | overview |
moo-ai:quickoveriew | Starter | 1× | legacy alias |
qwen3:4b | Starter | 1× | general |
llama3.2:3b | Starter | 1× | general |
llama3.2:latest | Starter | 1× | general |
moo-ai:latest | Developer | 2× | general |
qwen3:8b-q4_K_M | Developer | 2× | general |
moo-ai:coder | Developer | 2× | code |
qwen2.5-coder:7b-instruct-q4_K_M | Developer | 2× | code |
moo-ai:coder-v6 | Pro | 3× | code |
moo-ai:coder-web | Pro | 3× | code + web-trained |
moo-ai:coder-web-v6 | Pro | 4× | code + web-trained |
moo-ai:coder-pro | Pro | 6× | L4 dedicated code |
moo-ai:vision | Pro | 3× | vision |
glm-5.3:cloud | Business | 12× | cloud (gated) |
mistral-large-4:cloud | Business | 12× | cloud (gated) |
Vision and cloud models may require additional entitlement, activation and available compute infrastructure. Cloud models are not enabled by default.
Plans, credits & limits
Monthly Moo credits measure weighted inference usage, not dollars or raw token counts. Usage is counted by UTC calendar month, and unused credits do not automatically carry forward.
| Plan | Monthly credits | Requests/min | Concurrent | Max output |
|---|---|---|---|---|
| Starter | 500,000 | 10 | 1 | 1,024 |
| Developer | 2,000,000 | 30 | 2 | 2,048 |
| Pro | 7,000,000 | 60 | 4 | 4,096 |
| Business | 25,000,000 | 120 | 8 | 8,192 |
max_tokens value.Rate limits apply per account. A 429 response means you reached a request/concurrency limit or do not have enough credits for the requested reservation. See error handling.
Streaming responses
Set stream: true to receive Server-Sent Events over one POST connection. Read each data: frame and append choices[0].delta.content to your UI until data: [DONE].
curl -N https://www.moozonian.com/moo-ai-api/v1/chat/completions \
-H "Authorization: Bearer $MOO_AI_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"moo-ai:quickoverview","messages":[{"role":"user","content":"Explain an API in three sentences."}],"max_tokens":200,"stream":true,"stream_options":{"include_usage":true}}'
# Server-Sent Events (SSE): read data: frames until data: [DONE]When streaming, an error may be emitted as an SSE frame if inference fails after the response has begun. Implement appropriate timeout and retry behavior in your backend.
Vision input (eligible plans)
When enabled and online for your plan, moo-ai:vision accepts image content as an inline data:image/png;base64,... URL, or JPEG/WebP equivalent, in a user message. External image URLs are not supported.
{
"model": "moo-ai:vision",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image."},
{"type": "image_url", "image_url": {
"url": "data:image/png;base64,REPLACE_WITH_YOUR_BASE64_DATA"
}}
]
}],
"max_tokens": 256
}- Maximum two images per request and 1.5 MB decoded per image.
- Image content must be used with
moo-ai:visionin ausermessage. - Check
GET /v1/modelsfirst; a listed vision entitlement does not guarantee that the model is currently running.
Errors & troubleshooting
| Status | What it means | Recommended action |
|---|---|---|
400 | Invalid model, JSON or request fields | Check your model ID, message shape and output limits. |
401 | Missing, invalid or revoked key | Send a correct Authorization: Bearer header. |
402 | Subscription inactive/expired | Check billing and paid-through date. |
403 | Model not included or disabled | Use a model returned by /v1/models. |
413 | Input payload too large | Shorten messages or reduce image size. |
429 | Credits, RPM or concurrency exceeded | Lower token reservation, reduce concurrency or retry later. |
503 | Backend busy or unavailable | Retry with exponential backoff; try an entitled lightweight model. |
Error shape
{"error":{"message":"Model backend unavailable.","type":"api_error","code":"upstream_unavailable"}}For 401, check that your hosting stack forwards the Authorization header through nginx and Apache to PHP. For 503, a basic health response alone cannot prove a specific GPU model is online.
Security & production integration
- Use a server-side proxy. Your browser or mobile app calls your backend; your backend calls Moo-AI with the secret key.
- Keep secrets private. Use environment variables or a secrets manager; do not send keys in URL query strings.
- Separate applications. Give each integration its own API key where practical, revoke unused keys, and rotate compromised keys.
- Limit request size. Apply timeouts, retry only safe failures, and handle
429/503without runaway loops. - Watch usage. Check
/v1/usageto monitor credit availability during the UTC billing month. - Verify billing. Subscription access and model entitlement are controlled by your Moo-AI account and successful payment state.
sk_moo_... key into chat messages, support tickets, public JavaScript or online API playgrounds.Frequently asked questions
How do I get an API key?
Sign up, verify your email, activate your subscription, then select Create API key in your dashboard. Save it immediately.
Can I use the OpenAI SDK?
Moo-AI supports the core /v1/chat/completions JSON format. Some SDKs can be configured to use a custom base URL, but unsupported features such as function calling, embeddings or JSON schema enforcement may fail. The direct HTTP examples above are the documented integration method.
How do I check my remaining monthly credits?
Call authenticated GET /v1/usage and read credits.remaining. The response also includes used and reserved credits.
Why does a model appear but fail to answer?
The model catalog indicates plan entitlement; it does not confirm that the specific model is loaded or available on an inference backend at request time.
Does selecting an API plan immediately charge my card?
No. Selecting a plan opens the account flow. If you proceed, Stripe presents the recurring price for approval before completing payment.
Can I embed my key in a website or Android app?
No. Keep the API key on a trusted backend and call Moo-AI through your own authenticated server endpoint.