Skip to main content

API v1

Use SlideDrift from your code.

The JSON API exposes the same operation catalog as SlideDrift MCP. Create and edit carousels, generate Covers, export, share, and schedule through one typed, OAuth-protected interface.

Start with discovery

These endpoints are public. Read the OpenAPI document for the current operation, input, output, permission, and error schemas.

Authenticate with OAuth

API v1 uses OAuth bearer tokens only. It does not issue static API keys. This keeps connection approval, selected permissions, revocation, and account ownership consistent with MCP.

  1. 1. Discover. Fetch the protected-resource metadata, then the advertised authorization-server metadata.
  2. 2. Register. Use the advertised dynamic client registration endpoint and a secure redirect URI.
  3. 3. Authorize. Use the authorization-code flow with S256 PKCE. Request the protected resourcehttps://slidedrift.com/mcpand only the permissions your integration needs.
  4. 4. Call. Send the access token asAuthorization: Bearer …to API v1.

During authorization, SlideDrift shows selectable permission bundles. Agent access is included on every plan, with 1 active connection on Free.

Make a request

POST the operation's input object to its tool endpoint. Successful responses return the typed result indataplus the operation name, request ID, and API version inmeta.

async function callSlideDrift(tool, input, accessToken) {
  const response = await fetch(
    `https://slidedrift.com/api/v1/tools/${tool}`,
    {
      method: "POST",
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify(input),
    },
  );

  const body = await response.json();
  if (!response.ok) throw new Error(`${body.code}: ${body.detail}`);
  return body;
}

const result = await callSlideDrift(
  "list_carousels",
  { limit: 10 },
  accessToken,
);

Confirm consequential actions

Paid generation, exports, public sharing, and social changes use a two-step confirmation flow. Call once withoutconfirmed: true. Show the returned effects and credit quote. After the user explicitly approves, repeat the call by combining the original input with the server-providedretryWithobject.

Never turn confirmation on automatically. Confirmation tokens are short-lived and bound to the previewed action.

Retry safely

For operations that acceptidempotencyKey, reuse the same UUID when retrying the same action. You may also send it through theIdempotency-Keyheader. Do not reuse it for different inputs.

Keep the returnedX-Request-Idwhen logging or reporting a failed request.

Generate Covers as durable jobs

Setexecution: "async"on both the preview and confirmed request. The API returns a durable job instead of holding the connection open while the image is generated. Pollget_jobuntil it completes or fails.

// First call: request a preview. Do not set confirmed yet.
const coverInput = {
  source: "library_cover",
  mode: "initial",
  coverAssetId,
  instruction: "Use this headline and my brand colours",
  execution: "async",
  idempotencyKey: crypto.randomUUID(),
};
const preview = await callSlideDrift(
  "generate_cover",
  coverInput,
  accessToken,
);

// Show preview.data.effects and preview.data.creditsQuoted to the user.
// Only after explicit approval, repeat with the server-provided retry shape.
const started = await callSlideDrift(
  "generate_cover",
  { ...coverInput, ...preview.data.retryWith },
  accessToken,
);

const job = await callSlideDrift(
  "get_job",
  { jobId: started.data.job.id },
  accessToken,
);

Choose the smallest permission set

Read your workspace
Find templates, brand kits, source images, carousels, Covers, jobs, and credit balances you own.
Create and edit carousels
Plan, generate, edit, and upload source images for carousels, and import brand kits from websites, after the required approvals.
Generate Covers
Search, generate, and re-edit private Covers after a credit quote and confirmation.
Export and share
Create paid PDF, PNG or image-link exports and manage public carousel share links after confirmation.
Schedule LinkedIn posts
Create drafts or schedule owned carousels and Covers after reviewing the account, copy, and time.

Handle errors by code

Non-success responses useapplication/problem+jsonwith a stablecode, readable detail, resolution, and request ID. Rate limits includeretryAfterSecondsand a Retry-After header.