Este documento técnico está disponible en inglés. La interfaz sigue el idioma que seleccionaste.

MotionGit API

Templates supply movement and timing; the API supplies assets for your content. When a video needs an image from copy or an animated sticker, the template or assistant calls the API and places the result in the current project.

Authentication

Supply your Key with authenticated requests:

curl https://motiongit.com/api/v1/me -H "Authorization: Bearer mgk_YOUR_KEY"
TypeSourcePurpose
Template-specific KeyWritten to motiongit.key.json during downloadCalls for this template; can be disabled separately
General-purpose KeyCreated in API & creditsYour scripts, Claude Code and other tools

Keep your Key private. A downloaded .motion package may contain a Key belonging to you and spending your credits. Recommend a template by sharing its site link. If a Key leaks, disable or revoke it in settings; another download issues a new Key.

Credits

  • No monthly, signup, email-verification or visit gifts. Spendable credits come from purchased credits and released payment rewards.
  • Paid top-ups and template purchases reward the buyer and eligible inviter 5% each, using 10 credits per CNY 1, rounded down. Rewards appear as locked after payment and release after 14 days, verified email and successful provider verification without refunds or exceptions. Refunds reverse rewards.
  • Keys can have per-request, daily and monthly limits. Insufficient credits return 402.

Endpoints

MethodPathPurposeCost
GET/api/v1/meCurrent Key and balanceFree
GET/api/v1/capabilitiesCapabilities and status; no Key neededFree
GET/api/v1/stickers/search?q=growth&limit=12Search animated Lottie stickersFree
POST/api/v1/stickers/matchMatch stickers to full copy or keywords, with match explanationsFree
GET/api/v1/stickers/{preset}Download Lottie JSON1 credit
POST/api/v1/imagesGenerate an image from text; beta10 credits
GET/api/v1/usageEffective credits, Key cap and possible calls per capabilityFree
POST/api/v1/productionsRegister production; returns updates, issues and author tips; Key optionalFree

Search stickers

curl "https://motiongit.com/api/v1/stickers/search?q=growth%20data&limit=5" \
  -H "Authorization: Bearer $MOTIONGIT_KEY"

Each result includes preset, Chinese title, keywords, duration, aspect ratio, primary color and download URL. Search, choose, then download only the items you need.

Match stickers to copy or keywords

curl -X POST https://motiongit.com/api/v1/stickers/match \
  -H "Authorization: Bearer $MOTIONGIT_KEY" -H "Content-Type: application/json" \
  -d '{"text":"It is my birthday. Let us celebrate!","keywords":["birthday","celebration"],"limit":5}'

Supply text, keywords, or both. text accepts up to 2,000 characters. keywords accepts up to 20 entries of at most 64 characters each. limit defaults to 12 and accepts 1–50. The request body is limited to 16 KiB; unknown fields are rejected.

The response contains extracted_keywords, the number of available matches in total, and results. Each result includes its preset, title, ranking score, match reasons, dimensions, duration, and an authenticated download URL in file. Reasons identify the matched keyword, metadata field, and direct or synonym source. Explicit keywords take priority; scores determine ranking and are not semantic probabilities. Matching depends on the library metadata and returns an empty list when nothing matches.

Matching is free. Downloading a selected sticker is charged separately. Submitted copy and keywords are not stored in usage records.

Generate an image (beta)

curl -X POST https://motiongit.com/api/v1/images \
  -H "Authorization: Bearer $MOTIONGIT_KEY" -H "Content-Type: application/json" \
  -d '{"prompt":"A city skyline at dawn, soft blue tones, room for a title on the left","size":"1536x1024"}'

503 not_enabled means generation is not publicly enabled. It spends no credits. Upstream failures also spend no credits.

Successful image responses report the actual encoded size, width and height. requested_size retains your requested size. If the proxy returns another size, notices explains the difference; MotionGit does not crop or repeat generation. Use the actual dimensions for layout.

Check effective credits

curl https://motiongit.com/api/v1/usage -H "Authorization: Bearer $MOTIONGIT_KEY"

effective_credits_remaining is the smaller of the account balance and remaining monthly Key allowance. capabilities[].possible_count is calculated from that amount; planned capabilities return null.

Register production

Call before proposing the plan (stage: "plan") and after export (stage: "done"). Only these seven fields are accepted; additional fields return 400:

curl -X POST https://motiongit.com/api/v1/productions -H "Content-Type: application/json" \
  -d '{"template":"continuous-performance@1.0.0","package_sha256":"<SHA256 of integrity.json>","host":"codex-cli","layout":"landscape","duration_s":34,"materials":["video.presenter","text.subtitles"],"stage":"plan"}'

The response includes production_id, latest_version, notices and tips. Anonymous calls are allowed without account association. If a Key is supplied, it must be valid. Send no files, text, paths or usernames. Skip when offline or when the user declines; production can continue.

Declare capabilities in the template

Declare the capabilities in motion.json so the template page can display them:

"motiongit": {
  "capabilities": ["images.generate", "stickers.file"]
}

Read MOTIONGIT_API_KEY, then motiongit.key.json field key. If missing or out of credits, use default assets and continue rendering.

Planned capabilities

CapabilityPurpose
Video generationShort footage or background clips
Music matchingCommercially usable music by mood and duration
Speech synthesisVoiceover from text and caption alignment
Caption alignmentWord-level narration and subtitle alignment
Font matchingSuitable commercially usable fonts and acquisition instructions
Cloud renderingExport when a local runtime is unavailable

Error codes

HTTPcodeMeaning
401invalid_keyMissing or invalid Key
402insufficient_creditsInsufficient credits
403key_disabledKey disabled by its owner
429rate_limitedUp to 120 requests per Key per minute
503not_enabledCapability unavailable; no credits spent

Creator API: durable generations

Capabilities & live status · Quote/task/asset guide · Playground · Async Node example. New providers are disabled until configuration, rights, price and real verification are approved. The existing synchronous image endpoint uses the same durable task and receipt pipeline.