BUILD SOMETHING LOVELY

API docsv1.0

Turn text and images into the next SVG in your app.

YOUR FIRST REQUEST

Quick start

Create a key, submit a job, wait for completion, and download your SVG. Documentation is public; API calls require a key.

Base URLhttps://momovector.com/api/v1
  1. 01On the API management page create a key and save it as a server environment variable MOMOVECTOR_API_KEY。
  2. 02Set the base URL MOMOVECTOR_BASE_URL; for each new job, generate one MOMOVECTOR_REQUEST_IDand reuse it for retries.
  3. 03After submitting, save job.idand poll every 2–3 seconds. Download with your key once complete.
Set environment variables (configure MOMOVECTOR_API_KEY first)
export MOMOVECTOR_BASE_URL='https://momovector.com'
# Generate once per new job; do not rerun this line for network retries
export MOMOVECTOR_REQUEST_ID="$(python3 -c 'import uuid; print(uuid.uuid4())')"
Submit → Poll → Download
curl 'https://momovector.com/api/v1/generations' \
  -H "Authorization: Bearer $MOMOVECTOR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $MOMOVECTOR_REQUEST_ID" \
  -d '{"mode":"text","prompt":"A cute little orange cat","style":"playful"}'

# Set JOB_ID to job.id from the response
export JOB_ID='YOUR_JOB_ID'
curl "$MOMOVECTOR_BASE_URL/api/v1/generations/$JOB_ID" \
  -H "Authorization: Bearer $MOMOVECTOR_API_KEY"

# Download once status is completed
curl "$MOMOVECTOR_BASE_URL/api/v1/generations/$JOB_ID/file" \
  -H "Authorization: Bearer $MOMOVECTOR_API_KEY" \
  --output artwork.svg
Example responses and image Base64 are illustrative. Local demo mode returns demo: true and uses built-in artwork. Live generation requires a configured model service.

Authentication and keys

Send X-App-Language: zh-CN for Chinese or en for English. Otherwise, browser language preferences are used, with English as the fallback. Fields, error codes, and user content stay unchanged.

All data endpoints require the header Authorization: Bearer <API_KEY>. Keys are shown only once on creation. Set an expiration and revoke them at any time.

Request headers
Authorization: Bearer mv_sk_...
Content-Type: application/json
Idempotency-Key: required only when submitting a new job
  • Keys expire after 90 days by default. Choose 30, 90, 365 days, or no expiration. Each account supports up to 10 active keys.
  • Keys can generate, query, and download your artwork. They cannot buy credits, delete artwork, or manage other keys.
  • The public API requires a Bearer key, not cookies or URL parameters. It is intended for servers and scripts.
  • Use HTTPS in production. Keep keys in server environment variables, never in frontend code.
  • Revoking a key blocks future authentication. Submitted jobs still finish, and artwork stays in the original account.

Create a generation

POST/generationsBearer

Text and image generation use the same endpoint. Send JSON; a successful request returns 202 Accepted, charges credits, and creates an asynchronous job.

FieldType / requirementsDescription
modestring · requiredtext: text generation; image: image generation.
purposestring · optionalDefaults to illustration. logo accepts text, a subject image, or a sketch, with an optional style.
inputSourcestring · optionaltext: text only (mode=text); image: subject image; sketch: drawing (mode=image).
primaryColorsstring[] · optionalUp to 12 #RRGGBB primary color references. Defaults to [] with no color requirements. Complementary colors are allowed.
promptstring · mode-dependentRequired in text mode, 1–1280 characters; optional in image mode, up to 1280 characters.
imagestring · required for imagesBase64 data URL for PNG, JPEG, or WebP, up to 8 MiB decoded. Remote image URLs are not accepted.
styleReferencesstring[] · optionalUp to 8 (subject to the model’s total image limit) image data URLs (8 MiB each) or public HTTPS image URLs. Supported for text, image, and logo generation.
stylestring | null · optionalOmit, use null, or use none for no preset style. Options:business(Refined business)、tech(Future tech)、playful(Cute stickers)、flat(Flat illustration)、minimal(Minimal lines)、retro(Retro poster)、3d(3D forms)、fluid(Artistic flow)、lettermark(Lettermark)、mascot-logo(Mascot badge)
Idempotency-Key Required header: 16–80 letters, digits, underscores, or hyphens. UUID recommended. Retrying identical content with the same key returns the original job without another charge.
JSON request body
{
  "mode": "text",
  "prompt": "A cute little orange cat",
  "style": "playful"
}
202 · Job acceptedJSON +
202 · Job accepted
{
  "job": {
    "id": "2a357e9c-a431-42c4-9d73-bfb2b265712a",
    "mode": "text",
    "prompt": "A cute little orange cat",
    "style": "playful",
    "status": "queued",
    "cost": 9,
    "source": "api",
    "demo": false,
    "error": null,
    "createdAt": "2026-09-26T20:00:00.000Z",
    "url": null
  }
}

Response headers Location is the job status URL;Retry-After: 2 recommends polling after two seconds.202 means the job was accepted, not completed.

Style reference images

POST/generationsBearer

Use styleReferences for palette, line work, and visual style references. The text description or image still determines the subject. Selected primary colors guide the palette. Reference images cost no extra credits.

Text generation with style references
{
  "mode": "text",
  "prompt": "A fox sitting on the moon",
  "style": "flat",
  "styleReferences": [
    "https://images.example.com/style.png",
    "data:image/webp;base64,..."
  ]
}
  • Up to 8 (subject to the model’s total image limit) references, mixing files and URLs. Uploaded files support PNG, JPG, and WebP, up to 8 MiB each when decoded.
  • URLs must point directly to public HTTPS images, not webpages, local addresses, or redirects. Images are downloaded to private storage before charging, with the same 8 MiB limit. If saving fails, generation does not begin.
  • Changing reference content or order requires a new Idempotency-Key. Retrying identical content does not charge again.
  • In the response, styleReferences URLs with kind=upload require the same account's Bearer key. Read them via GET /api/v1/generations/{id}/references/{index} . New URL references also return an archived URL; sourceUrl retains the original link. Older kind=url records may link externally. Never send a MomoVector API key to external addresses.
  • References are stored privately with the artwork and deleted with it. The Python example supports repeated --reference style.png or --reference https://…。

Enhance prompt

POST/prompt-enhancementsBearer

Expand a brief idea with composition, subject, hierarchy, and relevant visual details. Keep the original language and requirements, with the option to undo.

Returns enhanced text without creating a generation. Credits are charged separately by usage; see your credit history for charges. No hourly attempt limit; one request at a time. Identical content is cached for one hour without another charge. Input and output are limited to 1280 characters.

Enhancement request
{
  "prompt": "A mountain coffee shop logo that retains the mountain outline"
}

The response is {prompt: "Enhanced description", cached: false}. Returns 503 if the text model is not configured. The original prompt can still be used to generate.

Check job status

GET/generations/{id}Bearer

id Use the submission response's job.id. You can only read jobs belonging to your account.

queuedWaiting to start
runningCreating
completedReady to download
failedFailed; credits refunded
FieldType / requirementsDescription
id / createdAtstringJob UUID / ISO 8601 creation time.
mode / prompt / stylestringRequest mode, prompt, and selected style.
statusstringqueued, running, completed, or failed.
costintegerCredits charged for this generation.
sourcestringweb or api: where the artwork was created.
demobooleantrue indicates demo artwork.
errorstring | nullA safe, user-facing failure message, including a recognized reason (such as content filtering) and refund information; otherwise null.
urlstring | nullAn authenticated relative SVG URL on success; null before completion.
200 · Generation completeJSON +
200 · Generation complete
{
  "job": {
    "id": "2a357e9c-a431-42c4-9d73-bfb2b265712a",
    "mode": "text",
    "prompt": "A cute little orange cat",
    "style": "playful",
    "status": "completed",
    "cost": 9,
    "source": "api",
    "demo": false,
    "error": null,
    "createdAt": "2026-09-26T20:00:00.000Z",
    "url": "/api/v1/generations/2a357e9c-a431-42c4-9d73-bfb2b265712a/file"
  }
}
Set an overall timeout. If it expires, keep querying the original job instead of creating another. A failed job requires a new request ID to try again.

Download SVG

GET/generations/{id}/fileBearer

Once the job is completed , the endpoint returns an SVG with content type image/svg+xml; charset=utf-8and a download filename. This is not a public sharing URL; every download requires a Bearer key.

Optional background parameter:transparent(default) or a six-digit HEX color. For example, ?background=%23F4EBDD downloads an SVG with a warm paper background, preserving vector paths at no extra charge. In URLs, # must be encoded as %23。

Download to a local file
curl "$MOMOVECTOR_BASE_URL/api/v1/generations/$JOB_ID/file" \
  -H "Authorization: Bearer $MOMOVECTOR_API_KEY" \
  --output artwork.svg

An incomplete job returns 409 result_not_ready; missing, deleted, or another account's artwork returns 404 not_found。

Get history

GET/generationsBearer

Returns web and API artwork for the account, newest first, 24 per page. The artwork's source identifies its source.

FieldType / requirementsDescription
offsetinteger · optionalDefaults to 0, range 0–100000. Use nextOffset from the response for the next page.
Paginated query
curl "$MOMOVECTOR_BASE_URL/api/v1/generations?offset=0" \
  -H "Authorization: Bearer $MOMOVECTOR_API_KEY"
200 · HistoryJSON +
200 · History
{
  "items": [
    {
      "id": "2a357e9c-a431-42c4-9d73-bfb2b265712a",
      "mode": "text",
      "prompt": "A cute little orange cat",
      "style": "playful",
      "status": "completed",
      "cost": 9,
      "source": "api",
      "demo": false,
      "error": null,
      "createdAt": "2026-09-26T20:00:00.000Z",
      "url": "/api/v1/generations/2a357e9c-a431-42c4-9d73-bfb2b265712a/file"
    }
  ],
  "hasMore": false,
  "nextOffset": 24
}

hasMore Stop paging when this is false.items Each entry uses the same job field format.

Check credits

GET/creditsBearer

Returns available credits, generation cost, demo status, and account limits. Credits purchased on the web work with the API.

Check balance
curl "$MOMOVECTOR_BASE_URL/api/v1/credits" \
  -H "Authorization: Bearer $MOMOVECTOR_API_KEY"
200 · Account creditsJSON +
200 · Account credits
{
  "balance": 60,
  "costs": {
    "text": 9,
    "image": 9
  },
  "demo": false,
  "limits": {
    "requestsPerMinute": 60,
    "activeKeys": 10,
    "concurrentJobs": 4
  }
}

Error codes and recovery

All public API errors include an HTTP status and consistent JSON. Keep the error.requestIdfor troubleshooting; it matches the response header X-Request-Id .

Example error response
{
  "error": {
    "code": "insufficient_credits",
    "message": "Not enough credits. Buy credits on the website and try again.",
    "requestId": "fdba965d-0c4c-439b-81d1-c2bc3db23ae0"
  }
}
HTTPcodeSuggested action
400invalid_request / invalid_image / invalid_referenceCorrect the request parameters, request ID, or image content.
401invalid_api_keyCheck that your Bearer key is valid, unexpired, and not revoked.
402insufficient_creditsAdd credits on the website and try again.
404not_foundCheck the endpoint, job ID, and account ownership.
405method_not_allowedUse the GET or POST method listed in the docs.
409idempotency_conflictThis request ID was used for different content or deleted artwork. Use a new ID for a new job.
409result_not_readyThe job is not complete yet. Keep checking its status.
413payload_too_largeReduce the image or request body size.
429rate_limited / concurrency_limitWait for the Retry-After interval and keep the same request ID when retrying.
500internal_errorKeep the request ID and use bounded retries.
503service_unavailableGeneration is not configured or temporarily unavailable. Try again later.

Billing, rate limits, and retries

Text generation9credits / generation
Image generation9credits / generation
Queries and downloads0credits

Each account allows up to 60 public API requests per UTC minute across all keys, including submissions, queries, and downloads. OpenAPI docs are excluded. Web and API share a limit of 4 concurrent generations.

FieldType / requirementsDescription
X-RateLimit-LimitintegerMaximum requests per minute.
X-RateLimit-RemainingintegerRequests remaining in the current window.
X-RateLimit-ResetintegerUnix timestamp in seconds when the window ends.
Retry-AfterintegerSuggested delay in seconds for 429; polling delay for 202.
  • For network retries of the same job, always reuse the original Idempotency-Key with identical content. All keys and web requests for an account share the idempotency scope.
  • Using the same key with different content, deleted artwork, or an older job without a fingerprint returns 409 idempotency_conflict。
  • For 429, follow Retry-After; for network or 5xx errors, use bounded retries with a delay.
  • After a job is accepted, retain job.id. Failed generations are refunded automatically. Use a new request ID to create again.
Ready to build?Create your first API key