Skip to content
Docs menu

API reference

AI

Plan grounded post concepts from a brief (research, then concepts you can open as designs), generate captions, hashtags, scripts and ideas, and generate images into the media library. Text generations route automatically (your own key, else platform models with fallbacks); list models with GET /v1/ai/models and pass a ref as model to pick one. Images route the same way, with their own model list under images.

POST/v1/ai/generate

Generate content

Generate captions, hashtags, ideas, scripts, rewrites or image prompts. content_type (see GET /v1/reference/content_type) sets the caption length, hashtag count, structure and call to action; a template's category is used when it's omitted. Without persona_id the voice is picked automatically: the workspace's voice for the content type, else the platform voice for it, else the workspace default (see GET /v1/personas/voices); persona_id: null writes without a persona. Every generation uses the brand's saved details (brand kit, then the workspace profile: name, Instagram username, website, description, industry); campaign_id adds that campaign's objective, category, landing page and description. The response says which voice wrote it (persona.source) and whether a rule-fixing pass ran (repaired). Uses the workspace's BYOK key when set (no credits), otherwise AI credits per variation at the platform's current rates (credits_charged).

Scopeai:generateMCP toolgenerate_content
Body
kindrequired
"caption" | "hashtags" | "ideas" | "script" | "rewrite" | "image_prompt"caption | hashtags | ideas | script | rewrite | image_prompt
brief
stringWhat you want, in a sentence or two
content_type
string | nullContent type key, e.g. education, promo, ugc
persona_id
anyPersona or platform voice ID. Omit for Auto (voice for the content type); null for no persona
template_id
anyStart from a template; brief may then be empty
format
anyTarget format key, e.g. ig_reel
campaign_id
string | nullCampaign the copy is for: its objective, category, landing page and description are added to the prompt (404 when outside your workspace or team)
variables
objectTemplate variables. Only the ones the template names are used; a request with more than the platform allows is refused (422)
variations
integerHow many alternatives to write. Credits are charged for the ones returned
provider
stringForce a provider (see GET /v1/ai/providers); your key for it when you have one, else the platform's
model
string | objectA specific model: "provider:model" (e.g. "openrouter:anthropic/claude-haiku-5.5") or { provider, model }. Must be listed by GET /v1/ai/models; credits use that model's multiplier
Request
curl -X POST "https://sqa.coboost.ai/api/v1/ai/generate" \
  -H "Authorization: Bearer $COBOOST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"caption","brief":"Launch post for our vitamin C serum, 20% off this week","content_type":"product_launch","format":"ig_reel","variations":2,"model":"openrouter:anthropic/claude-haiku-5.5"}'
Response · 201
{
  "object": "ai_generation_result",
  "id": "cmf0gen001",
  "outputs": [
    {
      "text": "Glow season starts now. Our vitamin C serum is 20% off this week.",
      "hashtags": [
        "skincare",
        "vitaminc"
      ],
      "cta": "Shop now"
    }
  ],
  "provider": "anthropic",
  "model": "claude-sonnet-5-5",
  "used_byok": false,
  "credits_charged": 2,
  "persona": {
    "id": "cmf0prs101",
    "name": "Launch insider",
    "source": "platform_type"
  },
  "content_type": "product_launch",
  "repaired": false,
  "fallback_used": false
}
POST/v1/ai/images

Generate images

Generate images from a prompt and save them to the media library (source: "ai"). Routes like text generations: when your plan includes bring your own key and you have an active key for a provider that makes images, it runs on that key with no credits (used_byok: true, credits_charged: 0) and the provider bills you; otherwise it runs on the platform's image models, paid with AI credits per image saved at the model's credit multiplier. A key whose provider has no enabled image model is refused (403 feature_unavailable, nothing charged) unless the workspace allows platform credits when its key fails. When fewer images come back than asked for, only those are charged. Pass a ref from images in GET /v1/ai/models as model to pick one; a model not allowed for your plan or workspace is refused. A provider's safety system can refuse a prompt (422, nothing charged). Designs and creatives that use these images are marked AI-generated. Needs the ai:generate and creatives:write scopes. Returns 403 feature_unavailable when image generation is turned off for the platform.

Scopeai:generate and creatives:writeMCP toolgenerate_image
Body
promptrequired
stringWhat the image shows, its style and mood
count
integerImages to make (the platform may allow fewer)
aspect_ratio
"1:1" | "4:5" | "2:3" | "9:16" | "16:9"1:1 | 4:5 | 2:3 | 9:16 | 16:9
folder
string | nullMedia library folder
model
stringAn image model as "provider:modelId" (images in GET /v1/ai/models). Default: your own key, else the platform's order
Request
curl -X POST "https://sqa.coboost.ai/api/v1/ai/images" \
  -H "Authorization: Bearer $COBOOST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A glass serum bottle on a linen cloth in soft morning light, minimal, warm tones","count":2,"aspect_ratio":"4:5"}'
Response · 201
{
  "object": "ai_image_result",
  "id": "cmf0gen009",
  "images": [
    {
      "id": "cmf0med003",
      "object": "media",
      "url": "https://coboost.ai/uploads/ws/ai-a-glass-serum-bottle-1.png",
      "display_url": "https://coboost.ai/uploads/ws/ai-a-glass-serum-bottle-1.png",
      "filename": "ai-a-glass-serum-bottle-on-a-linen-cloth-1.png",
      "type": "image",
      "mime_type": "image/png",
      "size_bytes": 248120,
      "width": 2160,
      "height": 2700,
      "duration_sec": null,
      "folder": null,
      "source": "ai",
      "attribution": {
        "provider": "openrouter",
        "model": "google/gemini-2.5-flash-image",
        "generation_id": "cmf0gen009",
        "prompt": "A glass serum bottle on a linen cloth in soft morning light, minimal, warm tones",
        "text": "Generated with AI"
      },
      "created_at": "2026-10-20T10:00:00.000Z"
    }
  ],
  "requested": 2,
  "credits_charged": 10,
  "provider": "openrouter",
  "model": "google/gemini-2.5-flash-image",
  "fallback_used": false,
  "used_byok": false
}
GET/v1/ai/models

List AI models

Models this workspace can generate with. platform models are paid with AI credits: credits is what one generation of each kind costs with that model (the kind's credits × the model's multiplier); available: false means the model is visible but not included in your plan. byok lists models reachable through your own provider keys (no credits). Pass a model's ref as model to POST /v1/ai/generate. current is where generations go when no model is given. images lists the image models for POST /v1/ai/images the same way, with credits_per_image; it's null while image generation is turned off.

Scopeai:generateMCP toollist_ai_models
Request
curl "https://sqa.coboost.ai/api/v1/ai/models" \
  -H "Authorization: Bearer $COBOOST_API_KEY"
Response · 200
{
  "object": "list",
  "data": [
    {
      "object": "ai_model",
      "ref": "openrouter:anthropic/claude-haiku-5.5",
      "provider": "openrouter",
      "provider_name": "OpenRouter",
      "model": "anthropic/claude-haiku-5.5",
      "label": "Claude Haiku 5.5",
      "description": "Anthropic via OpenRouter. Fast and inexpensive.",
      "tier": "standard",
      "context_length": 1000000,
      "credit_multiplier": 1,
      "credits": {
        "caption": 1,
        "design": 8,
        "research": 8
      },
      "available": true,
      "reason": null,
      "billing": "credits"
    }
  ],
  "byok": [
    {
      "key_id": "cmf0key001",
      "key_label": "Our OpenAI key",
      "provider": "openai",
      "provider_name": "OpenAI",
      "is_default": true,
      "default_model": "gpt-5.6-terra",
      "models": [
        {
          "ref": "openai:gpt-5.6-terra",
          "model": "gpt-5.6-terra",
          "label": "GPT-5.6 Terra",
          "tier": "standard"
        }
      ]
    }
  ],
  "current": {
    "mode": "platform",
    "provider": "openrouter",
    "model": "anthropic/claude-haiku-5.5",
    "label": "Claude Haiku 5.5"
  },
  "images": {
    "data": [
      {
        "object": "ai_image_model",
        "ref": "openrouter:google/gemini-2.5-flash-image",
        "provider": "openrouter",
        "provider_name": "OpenRouter",
        "model": "google/gemini-2.5-flash-image",
        "label": "Gemini 2.5 Flash Image",
        "description": "Google via OpenRouter. Fast, follows the aspect ratio.",
        "credit_multiplier": 1,
        "credits_per_image": 5,
        "available": true,
        "reason": null,
        "billing": "credits"
      }
    ],
    "byok": []
  }
}
GET/v1/ai/providers

List AI providers

Providers you can bring your own key for (Settings → AI provider keys), with where to create a key, the key format and the models offered. requires_base_url providers (Azure OpenAI) also need your resource URL; free_text_models providers accept any model id their model list contains (checked when the key is saved). images says whether a key from that provider also makes images. byok_enabled says whether your plan includes your own keys.

Scopeai:generateMCP toollist_ai_providers
Request
curl "https://sqa.coboost.ai/api/v1/ai/providers" \
  -H "Authorization: Bearer $COBOOST_API_KEY"
Response · 200
{
  "object": "list",
  "byok_enabled": true,
  "data": [
    {
      "object": "ai_provider",
      "key": "openrouter",
      "name": "OpenRouter",
      "description": "One key for hundreds of models from Anthropic, OpenAI, Google, Meta and more.",
      "key_prefix": "sk-or-",
      "key_placeholder": "sk-or-v1-…",
      "docs_url": "https://openrouter.ai/docs/quickstart",
      "dashboard_url": "https://openrouter.ai/settings/keys",
      "requires_base_url": false,
      "supports_model_list": true,
      "free_text_models": true,
      "default_model": "anthropic/claude-haiku-5.5",
      "images": true,
      "models": [
        {
          "id": "anthropic/claude-haiku-5.5",
          "label": "Claude Haiku 5.5",
          "tier": "standard"
        }
      ]
    }
  ]
}
GET/v1/ai/generations

List generations

AI generation history for the workspace, newest first.

Scopeai:generateMCP toollist_generations
Query parameters
limit
integerPage size, 1–100 (default 25)
cursor
stringnext_cursor from the previous page
kind
"caption" | "hashtags" | "ideas" | "script" | "rewrite" | "image_prompt" | "variant" | "design" | "design_edit" | "research" | "content_plan" | "image"
persona_id
string
content_type
stringContent type key (see GET /v1/reference/content_type)
status
"succeeded" | "failed"
Request
curl "https://sqa.coboost.ai/api/v1/ai/generations" \
  -H "Authorization: Bearer $COBOOST_API_KEY"
Response · 200
{
  "object": "list",
  "data": [
    {
      "id": "cmf0gen001",
      "object": "ai_generation",
      "kind": "caption",
      "status": "succeeded",
      "error": null,
      "persona": {
        "id": "cmf0prs001",
        "name": "Lumen voice"
      },
      "content_type": "promo",
      "template_id": null,
      "outputs": [
        {
          "text": "Glow season starts now.",
          "hashtags": [
            "skincare"
          ],
          "cta": "Shop now"
        }
      ],
      "provider": "anthropic",
      "model": "claude-sonnet-5-5",
      "used_byok": false,
      "credits_charged": 1,
      "source": "api",
      "created_at": "2026-10-28T10:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
GET/v1/ai/generations/{id}

Get a generation

One AI generation with its outputs.

Scopeai:generate
Path parameters
idrequired
stringGeneration ID
Request
curl "https://sqa.coboost.ai/api/v1/ai/generations/id_123" \
  -H "Authorization: Bearer $COBOOST_API_KEY"
Response · 200
{
  "id": "cmf0gen001",
  "object": "ai_generation",
  "kind": "caption",
  "status": "succeeded",
  "error": null,
  "persona": null,
  "content_type": null,
  "template_id": null,
  "outputs": [],
  "provider": "anthropic",
  "model": "claude-sonnet-5-5",
  "used_byok": false,
  "credits_charged": 1,
  "source": "api",
  "created_at": "2026-10-28T10:00:00.000Z"
}
POST/v1/ai/plans

Plan content

Turns a brief into 3–6 distinct Instagram post concepts grounded in facts. With research (default true) it first reads the brand's website, the campaign's landing page and urls, and searches the web when the routed model supports it; every concept cites the facts it uses (fact_ids, indices into research.facts) and uses [placeholders] for anything research couldn't confirm. Concepts carry a format (carousel or single), a content type, a hook, a slide outline, a caption, hashtags and a CTA. Open one as a design with POST /v1/ai/plans/{id}/concepts/{index}/design. Uses the workspace's BYOK key when set, otherwise AI credits for the research and for the plan (a model's credits.research and credits.content_plan in GET /v1/ai/models). Credits are checked before research runs: without enough for the plan the request fails with insufficient_credits, and with enough for the plan but not research too the plan is written without research (research.status failed with a message).

Scopeai:generateMCP toolplan_content
Body
briefrequired
stringWhat you're promoting: product, offer, audience, anything that must be said
campaign_id
string | nullPlan for this campaign's objective, landing page and brand kit
urls
string[]Pages to read besides the brand's website and links in the brief (up to 5)
posts
integerHow many concepts
content_type
string | nullContent type every concept uses (see GET /v1/reference/content_type); omit for a mix
persona_id
anyPersona or platform voice ID. Omit for Auto; null for no persona
research
booleanResearch the brand's pages and the web first; false = the brief and saved brand details only
model
string | objectA specific model: "provider:model" or { provider, model } (see GET /v1/ai/models)
Request
curl -X POST "https://sqa.coboost.ai/api/v1/ai/plans" \
  -H "Authorization: Bearer $COBOOST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"brief":"Launch posts for Barrier Repair Serum, $34, 20% off with BARRIER20 until Nov 15.","posts":4,"research":true}'
Response · 201
{
  "object": "content_plan",
  "id": "cmf0gen009",
  "created_at": "2026-11-05T10:00:00.000Z",
  "brief": "Launch posts for Barrier Repair Serum, $34, 20% off with BARRIER20 until Nov 15.",
  "summary": "Four launch posts: the benefit, a routine, the offer and how it's made.",
  "concepts": [
    {
      "title": "Barrier reset in four steps",
      "angle": "Education",
      "format": "carousel",
      "content_type": "education",
      "hook": "Your skin barrier needs a reset after summer",
      "slides": [
        {
          "headline": "Your skin barrier needs a reset",
          "body": ""
        },
        {
          "headline": "Cleanse gently",
          "body": "Skip foaming cleansers for a week."
        },
        {
          "headline": "Layer niacinamide and ceramides",
          "body": "Barrier Repair Serum, on damp skin."
        },
        {
          "headline": "Save this routine",
          "body": "lumen.example/serum"
        }
      ],
      "caption": "Your skin barrier needs a reset after summer. Four steps, one serum, no fragrance...",
      "hashtags": [
        "skinbarrier",
        "niacinamide",
        "sensitiveskin"
      ],
      "cta": "Save this routine",
      "fact_ids": [
        0,
        2
      ],
      "why": "A useful routine earns saves, which suits a launch that needs reach."
    }
  ],
  "research": {
    "status": "ok",
    "credits_charged": 2,
    "summary": "Lumen sells Barrier Repair Serum, a fragrance-free niacinamide and ceramide serum.",
    "facts": [
      {
        "claim": "Barrier Repair Serum costs $34 for 30 ml.",
        "topic": "product",
        "source": {
          "kind": "page",
          "url": "https://lumen.example/serum",
          "title": "Barrier Repair Serum"
        }
      }
    ],
    "gaps": [
      "Customer reviews"
    ],
    "pages": [
      {
        "url": "https://lumen.example/serum",
        "title": "Barrier Repair Serum",
        "ok": true
      }
    ],
    "web_search": true
  },
  "campaign_id": null,
  "content_type": null,
  "persona": {
    "id": "cmf0prs101",
    "name": "Practical teacher",
    "source": "platform_type"
  },
  "provider": "anthropic",
  "model": "claude-sonnet-5-5",
  "used_byok": false,
  "credits_charged": 4,
  "designs": {}
}
GET/v1/ai/plans/{id}

Get a content plan

A content plan with its concepts, the research it used and the designs already created from it (designs: concept index → design ID).

Scopeai:generateMCP toolget_content_plan
Path parameters
idrequired
stringContent plan (generation) ID
Request
curl "https://sqa.coboost.ai/api/v1/ai/plans/id_123" \
  -H "Authorization: Bearer $COBOOST_API_KEY"
Response · 200
{
  "object": "content_plan",
  "id": "cmf0gen009",
  "created_at": "2026-11-05T10:00:00.000Z",
  "brief": "Launch posts for Barrier Repair Serum, $34, 20% off with BARRIER20 until Nov 15.",
  "summary": "Four launch posts: the benefit, a routine, the offer and how it's made.",
  "concepts": [
    {
      "title": "Barrier reset in four steps",
      "angle": "Education",
      "format": "carousel",
      "content_type": "education",
      "hook": "Your skin barrier needs a reset after summer",
      "slides": [
        {
          "headline": "Your skin barrier needs a reset",
          "body": ""
        },
        {
          "headline": "Cleanse gently",
          "body": "Skip foaming cleansers for a week."
        },
        {
          "headline": "Layer niacinamide and ceramides",
          "body": "Barrier Repair Serum, on damp skin."
        },
        {
          "headline": "Save this routine",
          "body": "lumen.example/serum"
        }
      ],
      "caption": "Your skin barrier needs a reset after summer. Four steps, one serum, no fragrance...",
      "hashtags": [
        "skinbarrier",
        "niacinamide",
        "sensitiveskin"
      ],
      "cta": "Save this routine",
      "fact_ids": [
        0,
        2
      ],
      "why": "A useful routine earns saves, which suits a launch that needs reach."
    }
  ],
  "research": {
    "status": "ok",
    "credits_charged": 2,
    "summary": "Lumen sells Barrier Repair Serum, a fragrance-free niacinamide and ceramide serum.",
    "facts": [
      {
        "claim": "Barrier Repair Serum costs $34 for 30 ml.",
        "topic": "product",
        "source": {
          "kind": "page",
          "url": "https://lumen.example/serum",
          "title": "Barrier Repair Serum"
        }
      }
    ],
    "gaps": [
      "Customer reviews"
    ],
    "pages": [
      {
        "url": "https://lumen.example/serum",
        "title": "Barrier Repair Serum",
        "ok": true
      }
    ],
    "web_search": true
  },
  "campaign_id": null,
  "content_type": null,
  "persona": {
    "id": "cmf0prs101",
    "name": "Practical teacher",
    "source": "platform_type"
  },
  "provider": "anthropic",
  "model": "claude-sonnet-5-5",
  "used_byok": false,
  "credits_charged": 4,
  "designs": {}
}
POST/v1/ai/plans/{id}/concepts/{index}/design

Create a design from a concept

Opens one concept of a content plan as a design: a template recommended for its content type and format (blank when none fits), the concept's hook, slide outline, caption direction and CTA as the brief, the plan's voice and campaign, and the plan's research (not researched or charged again). AI writes the slides, caption and hashtags; uses the design-copy credits unless it runs on your own key. Limited by the plan's designs.

Scopecreatives:write and ai:generateMCP toolcreate_design_from_concept
Path parameters
idrequired
stringContent plan (generation) ID
indexrequired
integerConcept index (0-based)
Request
curl -X POST "https://sqa.coboost.ai/api/v1/ai/plans/id_123/concepts/index/design" \
  -H "Authorization: Bearer $COBOOST_API_KEY"
Response · 201
{
  "object": "design_from_concept",
  "plan_id": "cmf0gen009",
  "index": 0,
  "design_id": "cmf0dsn001",
  "template_id": "cmf0dt0001",
  "credits_charged": 8,
  "used_byok": false,
  "provider": "anthropic",
  "model": "claude-sonnet-5-5"
}