Genspark RouterTry Now
Genspark Router
What is Genspark Router?
Genspark Router is a model API for developers. One API key lets your own code, or a tool you connect, call text, image, video, speech, music and 3D models. You pay by usage from a separate API wallet.
You manage keys, credits and usage in the API portal. The portal also lists every model with its price.
Router differs from the rest of Genspark in three ways:
- You use it from code or from other tools. Plans and Free Quota apply inside the Genspark web and mobile apps.
- It has its own balance. Plan credits can't pay for API calls. API wallet credits can't pay for anything else in Genspark, and they can't be moved back.
- It signs in with an API key. A key can only call models. It can't reach any other Genspark product or the data in your account.
Quick start
- Open the API portal and sign in with your Genspark account. You can also open it from All Agents › Apps › For Developers, on the Genspark Router card. That card shows only if the portal lets you in, so members of a Team or Enterprise organization that isn't switched on don't see it.
- Add credits to the API wallet. See Add credits.
- Go to Settings › API Keys and create a key. Copy the secret right away, because it's shown once.
- Open a model page and run the model in the Playground.
- Copy a code sample from the model page into your own program.
Text models follow the OpenAI format. If your code already uses the OpenAI SDK, change only the key and the base URL. The base URL is https://www.genspark.ai/api/v1.
from openai import OpenAI
client = OpenAI(
api_key="<your Genspark API key>",
base_url="https://www.genspark.ai/api/v1",
)
r = client.chat.completions.create(
model="<model ID from the model page>",
messages=[{"role": "user", "content": "Hello"}],
)
Each model page shows the exact model ID. Copy it from there.
Who can use it
If you're signed in to Genspark and not in an organization, you can open the portal and browse models and prices. Calling a model needs credits in an API wallet. How you get a wallet depends on whether you're in an organization.
If you're not in an organization
Your first top-up creates an organization for you and puts the payment in its API wallet. On the Create an API organization form, you can type a name under Organization name (optional), then choose Continue to payment.
- The first top-up can be any whole-dollar amount from $5 to $10,000.
- You're the only member and the admin. You top up, set auto-recharge and create keys yourself.
- The organization is named "
's Team" unless you type another name. A name can be up to 80 characters. - If you don't finish the payment, no organization is created. If you join another organization before the payment completes, the payment is refunded.
- The organization only holds the API wallet. It has no seats, no Team plan, no Team credits and no organization policies. Your own plan stays as it is.
- Nobody can join it until you buy a Team plan for the organization. The wallet and its credits stay, and then you can invite members. If the Team plan ends, the organization goes back to holding only the API wallet.
If you're in a Team or Enterprise organization
Members share the organization's API wallet once API access is turned on for the organization. You don't send a request yourself.
- Each member creates their own keys, makes calls and sees their own requests. Admins can also create organization keys.
- Every charge comes from the organization's wallet.
- Only organization admins see the top-up form and auto-recharge. Other members ask an admin to add credits.
If the portal sends you back to the Genspark home page, API access isn't turned on for your organization yet.
See Team & Enterprise Plans for how organizations and admins work in general.
Models
The portal's Explore page lists every model with its price. The list changes, so Explore is the place to check what's available today. Filter chips on Explore: All, Text / chat, Text to image, Image editing, Text to video, Image to video, Speech, Audio and 3D.
- Speech holds text to speech, voice cloning, voice design and voice changing.
- Audio holds music, sound effects and audio clean-up.
- Video-to-video tools, such as upscaling and lip-sync, appear only under All.
Text models answer through an OpenAI-compatible endpoint. Genspark's own models are in the list too. Some text models show Coming soon.
Enterprise-only models
Some models are open only to Enterprise organizations. Explore shows them with an Enterprise only badge, and the model page says "This model is open to enterprise customers only. Contact sales". Explore also links to Contact sales for enterprise access.
- Text: every model from three of the providers listed on Explore.
- Media: every image, video and audio model except those from one provider, marked on Explore.
If your organization isn't an Enterprise organization with API access turned on, you see these models and their prices, but a call to one returns a 403 error. The check is on the organization that pays for the call. For a call made with an organization key, that's the key's organization. Otherwise it's your own organization. The list of models the API returns leaves them out.
The Create an API organization and Top up forms tell you this before you pay. Credits you buy there can't be used on Enterprise-only models.
To use every model, contact sales.
The API portal
The portal's top bar has Home, Explore, Settings, Top up and Wallet.
| Page | What it's for |
|---|---|
| Home | Available credits, this month's spend and request counts, a getting-started guide and your latest generations |
| Explore | Search and filter models and see their prices |
| Model page | Description, Playground, Pricing, Requests and code samples in cURL, Python and JavaScript. Media models also have Schema and Examples |
| Settings › Account | Your profile, number of keys, this month's spend, the base URL and your tokens-per-minute limit |
| Settings › Usage | Spend and requests by model or by key, compared with the previous period, with CSV export |
| Settings › Credits & billing | Available credits, top-up, auto-recharge, this month's spend and the expiry of purchased credits |
| Settings › API Keys | Create and manage keys |
| Settings › Log privacy | Whether your request content is stored |
| Settings › Request history | Status, usage and cost of every request. Download the loaded rows as CSV exports the rows already loaded |
| Settings › Errors | Failed and refused requests, grouped by cause |
The Playground runs models in your browser with one of your own keys. A Playground run is billed like an API call, and it appears in Request history under the app name Playground.
API keys
A key looks like gmk_live_ followed by 16 characters. One key calls both text and media models. Each person can hold up to 50 active keys.
The secret is shown once, when you create the key. The key dialog says "Copy it now. It will not be shown again." A lost secret can't be recovered. Rotate the key instead.
Create a key
The create form has these settings:
| Setting | What it does |
|---|---|
| Name | Your label for the key |
| Expires | No expiration, 24 hours, 30 days, 90 days, 180 days, 1 year or Custom…. The default is 90 days and the longest is 365 days |
| Spend cap | A limit in credits: Total, Daily, Weekly or Monthly |
| Access | Inference (the default), Read-only, Billing, Full or Custom |
| Models | All models, or Custom lists with Allowed and Denied models, up to 32 in each list |
A key's own page adds Tags (key=value pairs, up to 16 per key), Requests per minute, Tokens per minute and Max concurrency. Max concurrency is set per model, from 1 to 1,000, and blank means automatic. Changing a key's access, models or expiry asks you to sign in again first.
Rotate or revoke a key
- Rotate secret keeps the key ID and issues a new secret. The old secret keeps working for one hour. Only the admin who created an organization key can rotate it.
- Revoke takes effect at once and can't be undone.
Organization admins can list the keys members have created, each marked member key, and revoke them.
The API Keys item on the Team dashboard is a different kind of key. See Team & Enterprise Plans for those.
Rate limits
Text models allow up to 5 million tokens per minute for each key, and up to 5 million tokens per minute for the whole account. Keys that belong to an organization share one organization budget. There's no default cap on requests per minute. Some Genspark models also share a lower limit across all callers.
You can change the limits on a key from its own page. You can't change the account limit.
A call over a limit returns 429 with a Retry-After header. See Troubleshooting.
Call the API
Send your key as a bearer token. The base URL is https://www.genspark.ai/api/v1, and the Account page shows it too.
Text models
Text models support POST /chat/completions and POST /responses, both with streaming. A tool that accepts a custom OpenAI-compatible base URL can use your key. Enter the base URL and your key in the tool's settings.
Image, video, audio and 3D models
Media models run on an asynchronous queue. You submit a job, check its status, then fetch the result. Use this flow for video and 3D.
| Step | Request |
|---|---|
| Submit | POST /queue/{endpoint_id}. Add ?webhook=<url> to get a webhook when the job finishes |
| Check status | GET /queue/{endpoint_id}/requests/{id}/status, or follow live updates from /status/stream |
| Get the result | GET /queue/{endpoint_id}/requests/{id} |
| Submit and wait | POST /run/{endpoint_id} |
Each webhook carries a signature in the X-Genspark-Webhook-Signature header, along with X-Genspark-Request-Id, X-Genspark-Timestamp, X-Genspark-User-Id and X-Genspark-Kid headers. The public keys to verify it are at /api/v1/webhooks/jwks.json.
The model page has a code sample for each model.
Credits, top-ups and billing
Balances show in credits with US dollars alongside. One credit is $0.002, so $1 is 500 credits. Available credits leaves out credits held for requests still in progress. The portal shows that amount as held by requests in progress.
Prices
- Text models are priced per million tokens, with input and output priced separately.
- Media models are priced per image, per second or per generation.
- Each model's price is on its model page. A text request that uses anything costs at least 1 credit.
- Charges are at list price. Plan discounts and promotions in other Genspark products don't apply.
How a charge works
Text requests hold their largest possible cost when they start and settle at actual usage when they end. The difference goes back to the wallet.
- A text request that errors before any output, or that Genspark refuses for capacity, isn't charged.
- A text request that streamed partial output is charged for what was used.
- Media jobs are charged only on success. A job that fails, times out, is refused by content moderation or is canceled while queued is refunded.
Add credits
Top up from Top up in the top bar or on Settings › Credits & billing. You pay by card through Stripe. Presets are $10, $50, $200 and $1,000. You can also enter any whole-dollar amount from $5 to $10,000.
- Purchased credits expire. The Credits & billing page has an Expires column and shows how many credits expire within 30 days.
- There are no free trial credits.
- In an organization with several members, only admins see the top-up form.
- Video and 3D models need a first paid top-up on the organization before they run.
Auto-recharge
An admin can set the card to charge when the balance falls below a threshold. The settings are When the balance falls below and Charge the card, then Turn on auto-recharge.
- The threshold is a whole-dollar amount from $5 to $9,999.
- The charge amount is from $10 to $10,000, and it must be more than the threshold.
- Up to 3 automatic charges happen per day, counted in UTC.
- If a charge is declined, the card has expired, the bank asks for confirmation or the daily limit is hit, auto-recharge turns off. Every organization admin gets an email and an in-app notice. A declined charge isn't retried.
Balance alerts
Every organization admin gets an email and an in-app notice at three levels. Each level is sent once per top-up.
| Level | When |
|---|---|
| Low | The balance falls below 20% of your last top-up or below 500 credits, whichever is higher |
| Critical | Below 500 credits |
| Empty | At 0 or below |
An empty wallet refuses calls with a 402 error and doesn't draw from another balance. Calls work again after a top-up.
Privacy and data
Settings › Log privacy has a switch, Do not use my data to improve AI models.
- When it's on, request content isn't stored. Genspark always keeps the model, token counts, cost, timestamp and key name.
- It's the same setting as Help improve Genspark, turned off, under Settings › Data Controls on the main site.
- Members of a paid Team or Enterprise organization can't change it. The switch shows "Managed by your organization: all members are opted out."
- Members of an organization that only holds an API wallet can change it themselves.
- The switch doesn't mean model providers keep nothing. Each provider's own retention terms still apply, and the Log privacy page notes which providers retain request data for a period.
Troubleshooting
| What you see | Cause and fix |
|---|---|
402 insufficient_credits |
The wallet doesn't cover the request. A text request is held at its largest possible cost, so add credits or lower max_tokens. |
402 purchase_required |
A video or 3D model needs the organization's first paid top-up. Top up, then try again. |
403 model_restricted |
The model is Enterprise only. The message reads "Model ' |
429 key_spend_cap_exceeded or spend_cap_reached |
The key reached its spend cap. Raise or clear the cap, or wait for its window to roll over. |
429 concurrent_requests_limit |
A media model hit the key's concurrency limit. Wait for a running job to finish or raise the limit on the key's page. |
429 rate_limit_exceeded |
A per-minute limit of the key, the account or the model was reached. Wait for the Retry-After time, slow your client down or lower max_tokens. |
| The portal sends you to the Genspark home page | API access isn't turned on for your organization. |
| You can't find a way to add credits | In an organization with several members, only admins can top up. Ask an admin. |
| The API says you're out of credits but you have a paid plan | Plan credits and the API wallet are separate. Add credits to the API wallet. |
| You lost a key's secret | It can't be shown again. Rotate the key on its page. |
FAQ
Can I use my plan credits for API calls?
No. The API wallet and plan credits don't mix. Plan credits can't pay for API calls, and API credits can't pay for plan features or be moved back. See the Credits Guide for plan credits.
Does a Playground run cost credits?
Yes. A Playground run is billed at the same price as an API call.
Am I charged for a media request that doesn't finish?
No. A media job that fails, times out, is refused by content moderation or is canceled while queued is refunded.
Can I share one wallet with my colleagues?
Yes, through a Team or Enterprise organization. A one-person organization can buy a Team plan and then invite members, and its wallet stays. See Who can use it.
Can a key reach my other Genspark data?
No. A key can only call models. It can't reach any other Genspark product or the data in your account.
Can organization admins see members' keys and usage?
Admins can list the keys members create and revoke them. Each member sees their own requests in Request history.
Is the portal available in my language?
Yes. The portal is available in 19 languages: Arabic, German, English, Spanish, French, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Malay, Dutch, Polish, Brazilian Portuguese, Russian, Thai, Simplified Chinese and Traditional Chinese.
Was this article helpful?