Skip to content
For developers

Mashahid, inside your stack

One request turns an idea into a motion video with voice, sound, captions, a cover and a post caption. REST for systems, MCP for AI assistants, webhooks the moment it is ready.

  • mashahid.pages.dev/api/v1Base URL
  • 10 minMax length
  • 30voices & accents

01Quick start

1Create a key

In the developer area of your account. It is shown once — copy it right away.

2Store it safely

In an environment variable MASHAHID_API_KEY on your server, never in browser code.

3Send your idea

With the header Authorization: Bearer … or X-API-Key. One word is enough.

02Models & top-ups

The same credits and model prices as the site. Subscribe, or top up with no subscription. Credits are reserved on request; a failed video is fully refunded, and on auto length only the real length is charged.

Flow"flow"

Pure motion

30credits / min
15 per 30 s · $1.00 per minute on top-ups
Lens"lens"

Cinematic film

60credits / min
30 per 30 s · $2.00 per minute on top-ups
Canvas"canvas"

Illustrated story

70credits / min
35 per 30 s · $2.33 per minute on top-ups
Top-up calculator$1 = 30 credits · minimum $10 · any amount above
$10+ no bonus$100+ +10%$200+ +15%$500+ +20%
3,300 credits +10%
Top up from your account

Production, rendering and storage are on us and included. Post images are free.

03Create a video

The reply is immediate with the id and reserved credits; the engine works in the background.

curl -X POST https://mashahid.pages.dev/api/v1/videos \
  -H "Authorization: Bearer $MASHAHID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "idea": "A new oud perfume for men",
    "model": "lens",
    "aspect": "9:16",
    "duration": 30,
    "voice": "en-amelia"
  }'
201 Created
{
  "id": "7c1e…",
  "status": "queued",
  "model": "lens",
  "duration_s": 30,
  "aspect": "9:16",
  "credits_cost": 30,
  "created_at": "2026-11-28T12:00:00Z"
}

04Track status

queuedIn queue
scriptingWriting the script
voicingRecording the voice
renderingRendering
readyReady to download
failedCredits refunded

Poll about every 10 seconds, or add a webhook and we will tell you. progress goes 0–100.

GET /videos/{id}
curl https://mashahid.pages.dev/api/v1/videos/VIDEO_ID \
  -H "Authorization: Bearer $MASHAHID_API_KEY"
200 OK
{
  "id": "7c1e…",
  "status": "ready",
  "progress": 100,
  "title": "Oud, your signature",
  "model": "lens",
  "duration_s": 31,
  "credits_cost": 60,
  "video_url": "https://…/video.mp4",
  "srt_url": "https://…/captions.srt",
  "cover_url": "https://…/cover.jpg",
  "post_text": "…post caption with hashtags",
  "post_images": {},
  "post_images_status": "none"
}

05Post images

From any ready video: 1:1, 4:5 and 16:9 images (plus 9:16 when the video is not vertical) and up to 5 carousel slides, with the headline or clean. Free, made only when you ask.

POST /videos/{id}/images
curl -X POST https://mashahid.pages.dev/api/v1/videos/VIDEO_ID/images \
  -H "Authorization: Bearer $MASHAHID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "with_text": false }'

# 202 → { "post_images_status": "queued", "with_text": false }
# then GET /videos/VIDEO_ID → post_images:
# { "post_1x1": "…", "post_4x5": "…", "post_16x9": "…", "slide_1": "…" }

06Create fields

FieldValuesDefault
idearequired1–2000 characters (optional with document_url)—
document_urlhttps link to a PDF up to 25 MB (profile, catalogue, menu, report). The video is built from its facts, numbers, pictures and contacts—
modelflow · lens · canvasflow
typeauto · questions · myths · story · manifesto · idea_to_product · info · promo · launch · how_to · before_after · tips · faq · comparison · announcementauto
duration"auto" or 10–600 sauto
aspect9:16 · 4:5 · 1:1 · 16:99:16
toneauto · confident · energetic · cinematic · warm · formalauto
languagear · enar
voiceauto or an id from GET /voicesauto
voice_settingsspeed 0.75–1.35 · pitch −4…4 · warmth −1…1 · energy 0…2 · pauses 0…2—
captionsboxed · bold · minimal · noneboxed
sound_effectstrue · falsetrue
brand_idA brand id from GET /meDefault brand

30 voices in Arabic and English with several accents — full list with samples from GET /voices. Examples: ar-faisal · ar-layla · ar-fahad · ar-tariq · ar-maryam …

Up to 5 minutes on Creator and up to 10 minutes on Business.

07All endpoints

POST/videosCreate a video
GET/videos/{id}Status, links and post images
GET/videos?limit=20Your latest videos
POST/videos/{id}/imagesPost images from a ready video (free)
GET/mePlan, credits (with USD value) and brands
GET/voicesVoice library with samplesno key
GET/typesEvery option, model and priceno key

08MCP server for AI assistants

Tell your assistant “make a video about my store’s Friday deal” and it does the rest. Streamable HTTP at:

MCP URL
https://mashahid.pages.dev/api/mcp
claude mcp add --transport http mashahid https://mashahid.pages.dev/api/mcp \
  --header "Authorization: Bearer msh_live_..."

Claude Desktop: put it in claude_desktop_config.json and restart (needs Node.js).

create_videoCreates a video from an idea
get_videoStatus, links and post images
create_post_imagesPost images from a ready video
list_videosLatest videos
list_typesModels, types and voices
accountPlan, credits and brands

09Webhooks

Add an HTTPS URL in the developer area (Business plan) to receive video.ready and video.failed. Each request is signed with the URL’s secret: HMAC-SHA256 of “timestamp + dot + body”. Without a 2xx we retry up to 3 times.

Request
POST https://your-server.com/hooks/mashahid
Content-Type: application/json
X-Mashahid-Event: video.ready
X-Mashahid-Delivery: 3f0c…            # unique per delivery
X-Mashahid-Timestamp: 1764331200
X-Mashahid-Signature: sha256=9b1d…

{ "id": "3f0c…", "event": "video.ready", "created": 1764331200,
  "video": { "id": "7c1e…", "status": "ready", "video_url": "…", … } }
import crypto from "node:crypto";

// raw = the request body as a Buffer, before JSON.parse
export function verify(raw, headers, secret) {
  const ts = headers["x-mashahid-timestamp"];
  const sig = headers["x-mashahid-signature"] || "";
  if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; // replay guard
  const mac = crypto.createHmac("sha256", secret)
    .update(`${ts}.`).update(raw).digest("hex");
  const a = Buffer.from(sig), b = Buffer.from(`sha256=${mac}`);
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

10Errors & limits

Every error comes back as { "error": "code", "message": "…" } with a human-readable message.

HTTPerrorMeaning
400invalid_jsonThe body is not valid JSON
401invalid_api_keyWrong or revoked key
402no_creditsNot enough credits for this length and model
403plan_requiredNot on your plan (e.g. a longer length)
404not_found · brand_not_foundNot found in your account
409video_not_readyPost images need a ready video
422invalid_requestInvalid value; the message lists the allowed ones
429rate_limitedOver 30 requests per minute per key
503maintenanceShort maintenance; retry
30requests / minute / key
10active keys / account
5webhook URLs
10minutes max length
Ready to build?

Create your key, top up, and your first video is one request away.

Developer area