Skip to the main content

Reference conventions

Rules that hold for every endpoint. Learn them once, then read the reference as tables.

Envelope

Base URL https://looptake.com/api/v1. Every response is one of two shapes. pagination appears only on lists.

Success

{
  "success": true,
  "data": [{ "id": "973821cf-5cc7-44f7-8795-e68da31c59ef" }],
  "pagination": { "total": 128, "page": 1, "limit": 20, "pages": 7 }
}

Failure

{
  "success": false,
  "error": { "type": "not_found", "message": "No post with that id." }
}

Pagination

Query page and limit (max 100). The response gives total, page, limit and pages.

Ids and time

  • Ids are lower-case UUIDs. Store them as strings. A malformed id is 400 invalid_input.
  • Timestamps are ISO 8601 UTC. Schedules also take an IANA timezone.
  • Most calls take workspaceId; without it the key's default workspace is used.
  • Credits are integers. The API never sends money amounts.

202 and polling

Renders, deck posts, brand analysis and automation generation return 202 with a statusUrl. Poll it with backoff until the status is final, or use webhooks.

Poll with backoff

delay=2
while : ; do
  status=$(curl -sS "https://looptake.com/api/v1/content/c02119cb-ed7a-40ed-87fe-c18edc1fa1a2" \
    -H "Authorization: Bearer $LOOPTAKE_API_KEY" | jq -r '.data.renderStatus')
  case "$status" in ready|failed) echo "$status"; break ;; esac
  sleep "$delay"; delay=$((delay * 2))
done

Idempotency

28 endpoints read Idempotency-Key: every call that publishes or spends credits. Same key and body: the stored response is replayed. Same key, other body: 409 conflict.

Resources

120 endpoints in 17 groups.

  • Identity (1): What this key can do, which team it belongs to, and how many credits that team has left.
  • Credits (5): The balance and every movement in it, including the automatic refunds for failed generations.
  • Workspaces (10): A workspace is a brand. Everything with content in it is workspace-scoped.
  • Social accounts (1): The TikTok, Instagram and YouTube accounts connected over OAuth, and whether their tokens are still good.
  • Generations (11): Suggestions: a caption, a post body, hashtags, a rationale and a deck. Accepting one turns it into content.
  • Posts and calendar (12): Scheduling and publishing, with one result row per platform account and the analytics that came back.
  • Automations (11): A cadence that fills a calendar. Draft, generate, review, launch, and the posts it produced.
  • Influencers (9): AI presenters you create once and reuse, and the talking-head videos rendered from them.
  • Assets (9): The workspace library: clips, images, audio and fonts a deck can draw on.
  • Content (2): Render status and the finished media for an accepted suggestion or a studio job.
  • Content studio (14): The content studio renders, one endpoint per named render. All accept a job and return 202; none blocks.
  • Analytics (5): Performance by window and by post, from the platforms’ own reporting APIs.
  • Trends (1): The daily trend library: sounds, formats, topics and hashtags, per platform.
  • Webhooks (4): Five events sent to a URL you own.
  • Brand context (2): Re-read the website and rebuild the brand context every generation is written from.
  • Lab (15): Every image, video and audio model: the catalog, quotes, runs across up to six models, Language swap, Lipsync, Captions, Remix, Face swap, Draft and Finish, the Model Advisor and the Director.
  • Looks and references (8): Saved styles added to every prompt, and the cast, sets, props and voices a run attaches.

Describe it. Looptake writes, renders, scores and posts it to TikTok, Reels and Shorts.

Credits never expire. Top up from $5.