Public API

Public API (v1)

A v1 REST API to read your project, generate content, schedule posts, and receive signed webhooks : reserved for Pro, Agency and Enterprise plans.

Status: stable v1. The routes below cover reads, generation, scheduling, and outgoing webhooks. They live at a path today (/api/public/v1/…) and will also be reachable from api.gliiz.com once that subdomain is wired up — same routes, same keys.
5-Minute API Quickstart
01
Create the key

In the target project, open Settings → API, create a key, then copy it immediately. The full secret is only shown once.

02
Test /me

Call /me to confirm the project, remaining AI credits and connected social accounts. This is your smoke test.

03
Connect a webhook

Create an HTTPS webhook before long generations: finished jobs arrive without aggressive polling.

04
Generate, then schedule

Generate copy/flyer, retrieve the asset from /assets or a webhook, then schedule it with /posts.

bash
export GLIIZ_API_BASE="https://gliiz.com/api/public/v1"
export GLIIZ_API_KEY="gliiz_your_secret_key"

curl "$GLIIZ_API_BASE/me" \
  -H "Authorization: Bearer $GLIIZ_API_KEY"
Authentication

Generate a key from Account Settings → API (Owner or Admin, Pro/Agency/Enterprise plan on the chosen project). A key is scoped to exactly one project and shown in full only once at creation. Send it as a Bearer token on every request:

bash
curl https://gliiz.com/api/public/v1/me \
  -H "Authorization: Bearer gliiz_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

All v1 routes use JSON, and webhooks deliver signed JSON to you. Keep the key server-side only: never expose it in a browser, public mobile app, or embedded script.

ts
const GLIIZ_API_BASE = "https://gliiz.com/api/public/v1";

async function gliiz(path: string, init: RequestInit = {}) {
  const res = await fetch(`${GLIIZ_API_BASE}${path}`, {
    ...init,
    headers: {
      "Authorization": `Bearer ${process.env.GLIIZ_API_KEY}`,
      "Content-Type": "application/json",
      ...init.headers,
    },
  });

  const json = await res.json().catch(() => ({}));
  if (!res.ok) throw new Error(json.error ?? `Gliiz API error ${res.status}`);
  return json;
}
Security baseline. An API key acts as server-side access to the project. Store it in a secret manager or environment variable, rotate it when a teammate leaves, and use signed webhooks instead of exposing the key to an end-user client.
Integration Recipes

The easiest path is deliberately linear: verify the project, generate copy, generate or reuse a visual, then schedule. Webhooks let you receive long-running generations without keeping a connection open.

ts
// 1) Vérifier le projet et les crédits
const me = await gliiz("/me");
console.log(me.project.name, me.credits?.remaining);

// 2) Générer des légendes adaptées à la marque du projet
const copy = await gliiz("/generate/copy", {
  method: "POST",
  body: JSON.stringify({
    prompt: "Annonce le lancement de notre nouvelle offre premium",
    platforms: ["instagram", "linkedin"],
    contentKind: "image"
  }),
});

// 3) Générer un visuel IA. La réponse est souvent async: gardez le jobId.
const flyer = await gliiz("/generate/flyer", {
  method: "POST",
  body: JSON.stringify({
    prompt: "Flyer premium pour le lancement d'une offre marketing IA",
    format: "portrait",
    outputQuality: "2k",
    modelTier: "standard",
    variantCount: 1
  }),
});

// 4) Quand l'asset est disponible (via webhook ou /assets), planifier le post
await gliiz("/posts", {
  method: "POST",
  body: JSON.stringify({
    content_item_id: "content-item-uuid",
    caption: copy.copy.instagram.caption,
    platforms: ["instagram"],
    scheduled_at: "2026-09-01T09:00:00.000Z"
  }),
});

VIBE & Turbo

The API is not a second conversational brain: it triggers the same engines as Studio/VIBE, but without a chat thread. Use VIBE or Turbo for conversation; use the API for system integrations.

Team

A key is created by an Owner/Admin and remains bound to one project. It uses the project owner's credit pool, not the human user calling your server.

Video

Video generation exists in Studio/VIBE/Turbo. It is not yet exposed in public v1 API keys; fetch already-created videos through /assets.

Route Reference
Method & pathWhat it does
GET /api/public/v1/meProject name, AI credit balance, connected social accounts.
GET /api/public/v1/assetsList generated assets (flyers, copy, video), newest first. ?limit, ?before for pagination.
GET /api/public/v1/analyticsLatest per-platform stats (followers, reach, engagement). ?period=<days>.
POST /api/public/v1/generate/copyGenerate AI captions/hashtags for one or more platforms.
POST /api/public/v1/generate/flyerGenerate an AI flyer/visual. Runs the same engine as Studio.
POST /api/public/v1/postsSchedule a post from an existing asset or a media URL.
GET/POST /api/public/v1/webhooksList or create HMAC-signed webhook subscriptions.
DELETE /api/public/v1/webhooks/:idDisable a webhook without deleting its delivery history.
POST /api/public/v1/webhooks/testSend a webhook.test event to your active subscriptions.
GET/api/public/v1/meVerify the key, project and credits

Call this route when your integration starts. It confirms that the key is valid, points to the right project, and still has usable credits.

AuthorizationheaderBearer gliiz_...
projectresponseid, name and creation date for the key-scoped project.
creditsresponsemonthly_limit, used, purchased_balance, remaining.
connected_accountsresponseplatform, name, type and active state for connected social accounts.
json
{
  "project": { "id": "uuid", "name": "Acme", "created_at": "2026-08-12T10:00:00Z" },
  "credits": { "monthly_limit": 200, "used": 42, "purchased_balance": 25, "remaining": 183 },
  "connected_accounts": [
    { "platform": "instagram", "account_name": "acme", "account_type": "business", "active": true }
  ]
}
GET/api/public/v1/assets?limit=20&before=2026-08-12T10:00:00ZList generated assets

Use /assets to fetch visuals, videos and content already created in the project. Pagination uses next_cursor: send it back as before to request the next page.

limitquery, 1-100Number of assets returned. Default: 20.
beforequery ISO dateTime cursor returned by next_cursor.
asset_kindresponseimage | video | flyer | copy
asset_url / flyer_png_urlresponseMedia URL to display, download or schedule.
bash
curl "$GLIIZ_API_BASE/assets?limit=10" \
  -H "Authorization: Bearer $GLIIZ_API_KEY"
GET/api/public/v1/analytics?period=30Read social analytics

Returns the latest available analytics snapshot per platform over the requested period. Values depend on permissions granted by each social network.

periodquery, 1-365Number of days analyzed. Default: 30.
followers_countresponseKnown follower count at snapshot date.
reachresponseAvailable reach for the platform.
engagement_rateresponseEngagement rate stored by Gliiz.
POST/api/public/v1/generate/copyGenerate captions and hashtags

This route is synchronous: it responds directly with generated text. It automatically loads brand identity, tone, contact details and strategic hashtags from the key-scoped project.

promptstring, requisExact subject of the content to publish.
platformsarrayinstagram | facebook | linkedin | tiktok | youtube
contentKindimage | videoHelps the AI avoid video wording for an image, or the reverse.
brandName/toneOfVoice/sector/pillarsoptionalLight overrides if you call without full context; the project remains authoritative.
json
{
  "prompt": "Présente notre nouvelle offre premium pour PME",
  "platforms": ["instagram", "linkedin"],
  "contentKind": "image"
}
POST/api/public/v1/generate/flyerGenerate an AI visual

This route creates a generation job. The normal response is 202 with jobId; receive completion through generation.completed, or list /assets later. Credits are checked before enqueueing.

promptstring, requisVisual brief. Be concrete: subject, offer, mood, audience.
formatoptionalsquare | portrait | story | landscape
outputQualityoptional2k | 4k
modelTieroptionalstandard | premium
visualTypeoptionaltypography | hybrid
variantCountoptional1 | 2 | 3
subjectUrlsoptionalPublic HTTPS reference images.
generationRequestIdoptionalClient idempotency key to avoid duplicates.
json
{
  "prompt": "Flyer premium pour annoncer une offre marketing IA pour restaurants",
  "format": "portrait",
  "outputQuality": "2k",
  "modelTier": "standard",
  "visualType": "hybrid",
  "variantCount": 1,
  "generationRequestId": "launch-offer-2026-09-01"
}
POST/api/public/v1/postsSchedule a post

Schedules an existing asset or media URL to one or more networks. If multiple accounts for a platform are connected, send account_by_platform to select the right account.

content_item_iduuidExisting Gliiz asset. Recommended after generation.
media_urlurlAlternative: public URL when the asset does not exist in Gliiz yet.
captionstring, requisPublished text. Use copy.<platform>.caption for ready-to-publish output.
platformsarray, requisinstagram | facebook | linkedin | tiktok | youtube
scheduled_atISO datetimeUTC date. Default: now + 30 seconds.
account_by_platformobjectMap platform → social_account_id when needed.
json
{
  "content_item_id": "2f67a5b0-6b0b-47fb-84f0-a077e0d2dd9e",
  "caption": "Votre légende prête à publier...",
  "platforms": ["instagram", "facebook"],
  "scheduled_at": "2026-09-01T09:00:00.000Z",
  "account_by_platform": {
    "instagram": "social-account-uuid"
  }
}
GET / POST / DELETE/api/public/v1/webhooksManage outgoing webhooks

Webhooks are the simplest way to integrate Gliiz with a CRM, CMS, ERP, e-commerce backend or internal tool. Create a subscription, store the secret, verify signatures, then process events.

GET /webhookslistLists active and disabled subscriptions for the project.
POST /webhookscreateCreates an HTTPS subscription and returns secret once.
DELETE /webhooks/:iddisableDisables without deleting delivery history.
POST /webhooks/testtestSends webhook.test to active subscriptions.
Project scoping. A key always acts on the one project it was created for : any project_idsent in a request body is ignored in favor of the key's own project. Generation requests count against that project owner's normal plan limits and rate limits, same as using the app itself.
Signed Webhooks

When you create a webhook, Gliiz returns a whsec_… secret shown once. Every POST delivery includes X-Gliiz-Timestamp and X-Gliiz-Signature. Verify the HMAC-SHA256 signature over `${timestamp}.${body}` before processing the event.

bash
curl "$GLIIZ_API_BASE/webhooks" \
  -X POST \
  -H "Authorization: Bearer $GLIIZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production backend",
    "url": "https://example.com/webhooks/gliiz",
    "events": ["generation.completed", "generation.failed", "post.scheduled"]
  }'
json
{
  "webhook": {
    "id": "webhook-subscription-uuid",
    "name": "Production backend",
    "url": "https://example.com/webhooks/gliiz",
    "events": ["generation.completed", "generation.failed", "post.scheduled"],
    "created_at": "2026-08-12T10:00:00.000Z",
    "secret": "whsec_copy_this_once"
  }
}
ts
import crypto from "crypto";

const timestamp = request.headers["x-gliiz-timestamp"];
const signature = request.headers["x-gliiz-signature"];
const expected = "sha256=" + crypto
  .createHmac("sha256", process.env.GLIIZ_WEBHOOK_SECRET!)
  .update(`${timestamp}.${rawBody}`)
  .digest("hex");

if (!crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))) {
  throw new Error("Invalid Gliiz webhook signature");
}
json
{
  "id": "evt_01J...",
  "event": "generation.completed",
  "created_at": "2026-08-12T10:02:14.000Z",
  "project_id": "project-uuid",
  "data": {
    "api_key_id": "api-key-uuid",
    "job_id": "generation-job-uuid",
    "workflow": "flyer.v1",
    "status": "completed",
    "result": {
      "contentItemId": "content-item-uuid",
      "imageUrl": "https://..."
    }
  }
}

Available events: generation.copy.completed, generation.flyer.queued, generation.completed, generation.failed, post.scheduled, webhook.test.

generation.copy.completedsyncA caption generation completed.
generation.flyer.queuedasyncA visual generation job was accepted into the queue.
generation.completedasyncA generation job finished successfully.
generation.failedasyncA job failed or was canceled.
post.scheduledsyncOne or more posts were scheduled.
webhook.testmanualEvent sent by /webhooks/test.
Return 2xx quickly after signature verification. If processing is slow, put the event in your own queue and respond immediately. Gliiz logs the HTTP status, response snippet and delivery errors.
Errors, Limits & Collaboration

API errors are deliberately simple: an HTTP status, a readable error field, and sometimes details/code for validation. Handle at least the statuses below.

400Bad RequestInvalid JSON payload or missing field.
401UnauthorizedMissing, malformed, revoked or unknown key.
402Payment RequiredNot enough credits to start the generation.
403ForbiddenPlan without API access, plan quota, or unauthorized action.
404Not FoundProject, asset or webhook not found in the key scope.
422Unprocessable EntityValid JSON but invalid business parameters.
429Rate LimitedToo many requests or too many active jobs.
500/503Server ErrorServer incident or AI provider temporarily unavailable.
json
{
  "error": "Invalid post payload",
  "details": {
    "fieldErrors": {
      "platforms": ["Array must contain at least 1 element(s)"]
    }
  }
}
Team work. API keys are created at project level by an Owner or Admin. They do not replace human roles: invitations, roles, editor/publish/inbox scopes and revocations remain managed in the app so external scripts cannot silently rewrite the team.
Public v1 surface. Public v1 covers reads, assets, analytics, copy, visuals, scheduling and webhooks. Direct video generation and team management are not exposed in public v1; use Studio/VIBE/Turbo to generate videos, then fetch them through /assets.
Social Networks

Platforms & Networks

What you can do on each connected social network (publishing, comment replies, and DM replies), so you know what to expect before connecting an account.

PlatformPublishingComment auto-replyDM auto-reply
Facebook✅ Messenger
Instagram✅ DM
TikTok✅ Publishing
LinkedIn⚠️ Limited
YouTube✅ Video only
WhatsAppN/AN/A
Need something beyond the v1 API? For deeper integrations (MCP, Slack, Notion, dedicated business sync), reach out from the Contact page. The v1 routes above are the stable contract for your external systems.
Good to Know

Capabilities above depend on the permissions each platform grants Gliiz at connection time and can change if a platform updates its policies. If a feature you expect is missing on a connected account, try reconnecting it from Settings → Accounts.

Documentation Feedback

Was this documentation helpful?