/Developers
    REST API

    API Reference

    The iSocialize AI API lets you generate platform-optimized social media content — captions, posts, hooks, and images — programmatically. One endpoint. Any platform. Any content type.

    Single endpoint
    POST /api-generate handles all content types
    8 platforms
    Instagram, TikTok, LinkedIn, X, and more
    Text + Image
    1 credit for text, 2 credits for images
    Base URL: https://ufsovdkahowhttxisneo.supabase.co/functions/v1

    Authentication#

    All API requests require an X-API-Key header. Generate your key at ai.isocialize.me/api-keys.

    Header
    X-API-Key: isa_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Keep your API key secret. Never expose it in client-side JavaScript, public repos, or mobile app bundles. Use environment variables or a backend proxy.

    Quick Start#

    Make your first request in under 60 seconds.

    cURL — Text generation
    curl -X POST "https://ufsovdkahowhttxisneo.supabase.co/functions/v1/api-generate" \
      -H "Content-Type: application/json" \
      -H "X-API-Key: isa_your_key_here" \
      -d '{
        "prompt": "Create an engaging caption for a new coffee shop opening",
        "platform": "instagram",
        "mode": "marketing",
        "type": "text"
      }'
    Response
    {
      "success": true,
      "type": "text",
      "data": {
        "content": "☕ Your morning just got better! Grand opening this Saturday — come taste the difference. Fresh roasts, cozy vibes, and baristas who actually care. 📍 123 Main St\n\n#CoffeeShop #GrandOpening #LocalCoffee #MorningVibes",
        "platform": "instagram",
        "mode": "marketing"
      },
      "credits": {
        "used": 1,
        "remaining": 499
      }
    }

    API Reference#

    POST/api-generate

    Generate platform-optimized social media content. Either prompt or messages is required. All other fields are optional with sensible defaults.

    Text Generation

    Costs 1 credit per request. Returns polished text with platform-appropriate hashtags, emojis, and tone.

    ParameterTypeRequiredDefaultDescription
    promptstring
    required
    Your content request. Max 5,000 characters. Omit if using messages.
    platformstringoptionalinstagramTarget platform — affects tone, length, hashtag strategy, and formatting.
    modestringoptionalsocialContent style: social, marketing, personal, or business.
    typestringoptionaltextSet to "text" for this request type.

    Platform values

    instagramtwitterfacebooklinkedintiktokyoutubepinterestthreads

    Mode values

    socialEngagement-focused — hashtags, emojis, conversational hooks
    marketingConversion-focused — urgency, call to action, product-forward
    personalAuthentic, relatable, community-building voice
    businessProfessional, thought leadership, B2B tone

    Image Generation

    Costs 2 credits per request. Returns a base64-encoded PNG data URI, sized appropriately for the target platform.

    Image request
    curl -X POST "https://ufsovdkahowhttxisneo.supabase.co/functions/v1/api-generate" \
      -H "Content-Type: application/json" \
      -H "X-API-Key: isa_your_key_here" \
      -d '{
        "prompt": "A vibrant flat lay of workout gear — dumbbells, protein shaker, and running shoes on a clean white surface",
        "platform": "instagram",
        "type": "image"
      }'
    Response
    {
      "success": true,
      "type": "image",
      "data": {
        "image_url": "data:image/png;base64,iVBORw0KGgo...",
        "prompt": "A vibrant flat lay of workout gear...",
        "platform": "instagram"
      },
      "credits": {
        "used": 2,
        "remaining": 498
      }
    }

    The image_url value is a complete data URI — you can set it directly as an <img> src, or strip the prefix to get raw base64 for storage.

    Multi-Turn Conversations

    Use messages instead of prompt to iterate on content through conversation — the same way you'd refine a post in a chat interface. Supports up to 50 messages, 10,000 characters each.

    Multi-turn request
    {
      "messages": [
        {
          "role": "user",
          "content": "Create a caption for my bakery's new croissant flavor"
        },
        {
          "role": "assistant",
          "content": "🥐 Meet our newest obsession: Brown Butter Hazelnut Croissant. Layers of golden pastry, a nutty swirl inside, and a crunch that'll stop your scroll. Available starting Friday."
        },
        {
          "role": "user",
          "content": "Perfect — now make a shorter version for Twitter"
        }
      ],
      "platform": "twitter",
      "mode": "social",
      "type": "text"
    }

    Response Schemas

    All successful responses follow a consistent shape.

    Text response
    {
      "success": true,           // boolean — always true on 200
      "type": "text",            // echoes request type
      "data": {
        "content": "...",        // ready-to-post text
        "platform": "instagram", // echoed platform
        "mode": "marketing"      // echoed mode
      },
      "credits": {
        "used": 1,               // credits consumed by this request
        "remaining": 499         // your balance after this request
      }
    }
    Image response
    {
      "success": true,
      "type": "image",
      "data": {
        "image_url": "data:image/png;base64,...", // full data URI
        "prompt": "...",         // echoed prompt
        "platform": "instagram"  // echoed platform
      },
      "credits": {
        "used": 2,
        "remaining": 498
      }
    }

    Errors#

    The API uses standard HTTP status codes. All error bodies include an error string.

    CodeNameDescription
    200OKRequest succeeded.
    400Bad RequestMissing required field, invalid platform value, or malformed JSON.
    401UnauthorizedMissing or invalid X-API-Key header.
    402Payment RequiredInsufficient credits for this request.
    500Internal Server ErrorGeneration failed — retry with exponential backoff.
    400 — Invalid platform
    {
      "error": "Invalid platform",
      "valid_platforms": ["instagram","twitter","facebook","linkedin","tiktok","youtube","pinterest","threads"],
      "received": "snapchat"
    }
    401 — Bad key
    { "error": "Invalid API key" }
    402 — Out of credits
    {
      "error": "Insufficient credits",
      "message": "This request requires 2 credits, you have 1",
      "balance": 1,
      "required": 2
    }

    For 500 errors, wait at least 1 second and retry. If errors persist, check status.supabase.com or contact info@isocialize.me.

    Guides#

    n8n / Make.com

    Use the HTTP Request node in n8n or Make.com to call the API and pipe the output into your publishing or scheduling workflow.

    n8n — HTTP Request node body
    {
      "method": "POST",
      "url": "https://ufsovdkahowhttxisneo.supabase.co/functions/v1/api-generate",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "{{ $env.ISOCIALIZE_API_KEY }}"
      },
      "body": {
        "prompt": "{{ $json.prompt }}",
        "platform": "{{ $json.platform }}",
        "mode": "social",
        "type": "text"
      }
    }

    Python

    python
    import os
    import requests
    
    API_KEY = os.environ["ISOCIALIZE_API_KEY"]
    ENDPOINT = "https://ufsovdkahowhttxisneo.supabase.co/functions/v1/api-generate"
    
    def generate(prompt: str, platform: str = "instagram", mode: str = "social", content_type: str = "text") -> dict:
        response = requests.post(
            ENDPOINT,
            headers={
                "Content-Type": "application/json",
                "X-API-Key": API_KEY,
            },
            json={
                "prompt": prompt,
                "platform": platform,
                "mode": mode,
                "type": content_type,
            },
            timeout=30,
        )
        response.raise_for_status()
        return response.json()
    
    # Generate a caption
    result = generate(
        prompt="Coffee shop grand opening this Saturday",
        platform="instagram",
        mode="marketing",
    )
    print(result["data"]["content"])
    print(f"Credits remaining: {result['credits']['remaining']}")

    Node.js / TypeScript

    typescript
    const ENDPOINT = "https://ufsovdkahowhttxisneo.supabase.co/functions/v1/api-generate";
    
    interface GenerateOptions {
      prompt: string;
      platform?: "instagram" | "twitter" | "facebook" | "linkedin" | "tiktok" | "youtube" | "pinterest" | "threads";
      mode?: "social" | "marketing" | "personal" | "business";
      type?: "text" | "image";
    }
    
    async function generate(options: GenerateOptions) {
      const res = await fetch(ENDPOINT, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          "X-API-Key": process.env.ISOCIALIZE_API_KEY!,
        },
        body: JSON.stringify(options),
      });
    
      if (!res.ok) {
        const err = await res.json();
        throw new Error(err.error || `HTTP ${res.status}`);
      }
    
      return res.json();
    }
    
    // Usage
    const result = await generate({
      prompt: "Write a thought leadership post about remote work trends",
      platform: "linkedin",
      mode: "business",
    });
    
    console.log(result.data.content);
    console.log(`Credits remaining: ${result.credits.remaining}`);

    Rate Limits & Credits#

    PlanText / monthImages / monthPrice
    Free~150 (5/day)~60 (2/day)$0
    iSocialize Ai Creator30015$9.99/mo
    iSocialize Ai Pro1,000100$19.99/mo

    Each API call deducts credits from your account balance. Text generation costs 1 credit; image generation costs 2 credits. Credits are shared across the web app and API. Manage your API keys at ai.isocialize.me/api-keys.

    OpenAPI Schema#

    A complete OpenAPI 3.0 schema is available for use with Postman, Insomnia, code generators, or LLM tooling.

    Import into Postman / Insomnia
    https://ai.isocialize.me/openapi.json
    Ready to build?

    Get your API key and start generating content in minutes.