Enterprise API Documentation

Generate high-quality AI content programmatically with our Enterprise API

Quick Start

1. Purchase Enterprise API Credits

Visit your Settings page and purchase Enterprise API credits. Choose from Starter (1,000 credits) or Professional (2,000 credits) plans.

2. Generate Your API Key

In your Settings page, scroll to the "Enterprise API" section and click "Generate API Key". Store it securely - you won't be able to see it again!

3. Start Making API Calls

Use your API key in the Authorization header to start generating content. Each generation costs 1 credit.

Authentication

All API requests must include your API key in the Authorization header using the Bearer token format:

Authorization: Bearer mk_your_api_key_here

API Endpoints

Generate Post

POSTenterpriseGeneratePost
Cost
1 credit

Generate high-quality blog posts, articles, or any written content using AI.

Request Body

prompt
string required
The content you want to generate
tone
string optional
Writing tone (e.g., "professional", "casual", "friendly")
length
number optional
Target word count

cURL Example

curl -X POST https://us-central1-make-it-write-5c378.cloudfunctions.net/enterpriseGeneratePost \
  -H "Authorization: Bearer mk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Write a blog post about the future of AI",
    "tone": "professional",
    "length": 500
  }'

JavaScript Example

const response = await fetch(
  'https://us-central1-make-it-write-5c378.cloudfunctions.net/enterpriseGeneratePost',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer mk_your_api_key_here',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      prompt: 'Write a blog post about the future of AI',
      tone: 'professional',
      length: 500
    })
  }
);

const data = await response.json();
console.log(data.content);
console.log('Credits remaining:', data.creditsRemaining);

Python Example

import requests

url = "https://us-central1-make-it-write-5c378.cloudfunctions.net/enterpriseGeneratePost"
headers = {
    "Authorization": "Bearer mk_your_api_key_here",
    "Content-Type": "application/json"
}
data = {
    "prompt": "Write a blog post about the future of AI",
    "tone": "professional",
    "length": 500
}

response = requests.post(url, headers=headers, json=data)
result = response.json()

print(result['content'])
print(f"Credits remaining: {result['creditsRemaining']}")

Success Response

{
  "success": true,
  "content": "The Future of AI: A Transformative Journey\n\nArtificial Intelligence...",
  "creditsRemaining": 999,
  "responseTime": 1234
}

Error Response (402 - Insufficient Credits)

{
  "error": "Insufficient credits. Need 1, have 0",
  "message": "Please purchase more Enterprise API credits to continue."
}

Check Credits

GETenterpriseCheckCredits
Cost
FREE

Check your remaining API credits without consuming any.

cURL Example

curl -X GET https://us-central1-make-it-write-5c378.cloudfunctions.net/enterpriseCheckCredits \ -H "Authorization: Bearer mk_your_api_key_here"

Response

{
  "success": true,
  "credits": 1000,
  "plan": "Enterprise Starter"
}

Error Codes

401Unauthorized

Invalid or missing API key

402Payment Required

Insufficient credits. Purchase more to continue.

500Internal Server Error

Something went wrong on our end. Please try again.

Best Practices

🔒 Keep Your API Key Secure

Never expose your API key in client-side code, public repositories, or logs. Use environment variables and keep keys server-side only.

âš¡ Monitor Your Credits

Use the Check Credits endpoint to monitor your balance. Set up alerts when credits drop below a threshold.

🎯 Be Specific with Prompts

The more specific your prompt, the better the output. Include tone, length, and any specific requirements.

📊 Track Your Usage

Check your API usage history in the Settings page to understand your consumption patterns.

Need Help?

Have questions or need support? We're here to help!