What happens if…

Failures, refunds, limits and going live with AI tools: what Gemmein does and what you do.

If…What happensWhat you do
The provider fails before its first byte, with an error or no answerThe person gets the tool's full price back. The response carries x-gemmein-credit: refunded and the provider's own statusNothing; the person can retry
A stream stops mid-answer, or the person hangs upNo refund: the request is already on your provider billNothing
The person has fewer credits than the tool costs402 credits_exhausted, naming the tool, its price and their balance. The provider is never calledShow the credit pack
One person makes more than 20 calls in a minuteThe next call answers 429 ai_capped with resetAt and spends nothing. The limit is per person; other people are unaffectedWait for resetAt
You create a tool before pasting its provider keyThe tool saves, and the AI page shows it waiting on a key. Calls answer ai_not_configured until the key is therePaste the key on the AI page
A tool requires a plan the person lacks403 entitlement_required, naming the plan. If that plan was deleted, the person reads a neutral sentence and your Logs row keeps the detailSell or grant the plan
You delete a toolCalls naming it answer 404 unknown_tool and spend nothing. Runs already open still end, failed, with their holds returnedNothing
A call is refused in LiveThe person reads a neutral sentence. Your Logs row names who, which tool and why, and Errors groups itRead the Logs row
A provider meters more than the tool's ceilingThe run is charged its hold, never moreRaise bounds.maxUnits if the ceiling is too low
The provider is busy (429) or down (5xx) while a run is in progressGemmein checks again later, until the run's deadline. A job is never submitted twiceNothing
The provider refuses or fails the submit itselfThe run fails, says why and returns its hold. It is not sent againStart a new run
A run is still open 60 minutes after it started (or its own deadlineMinutes)It ends expired, its hold returned, and the provider is told to stopNothing
The person cancels a runIt ends cancelled, its hold returned, and the provider is told. A second cancel answers 409 run_endedNothing
Your pipeline answers the hand-off with a 4xx other than 408 or 429The run fails and its hold is returned. Any other failure is retried, with the same run.id, until the deadlineFix the URL or the pipeline
A person hands a tool a kind of file it does not tick400 input_not_accepted, naming the kinds it takes. Nothing is spentSend a kind it takes, or tick the kind on the AI page
The tool's model does not read that kind (an alias was repointed)409 input_not_supported. Nothing is spentPick a model that reads it, or untick the kind
The file is bigger than the tool's, the provider's or the platform's limit413 input_too_large, naming the limit. Nothing is spentSend a smaller file
The file is sealed and belongs to someone else, or was deleted400 invalid_inputs: file not found. Nothing is spentSend a ref of a file this person uploaded
A person sends a second large file while their first is still streaming to the providerA chat tool answers 429 input_busy and spends nothing. A run waits and tries againRetry when the first finishes
A tool that takes files costs more than the person holds402 credits_exhausted, before any file is readShow the credit pack
A tool charged per token ticks a file kindRefused at gemmein dev, gemmein sync and on the AI page: a tool that takes files is priced per runSet a credit price per call
Your app's storage is full (on Live, past its tier's grace: the lesser of 10% over or 7 days; in Development, past twice its cap)Uploads are refused with 429 usage_limit_exceeded and a clear message. Files already stored stay, and runs on them keep workingDelete files, add a 50 GB storage pack under Usage, or move the app up a tier
The provider refuses the fileA chat tool answers 502 input_rejected and spends nothing. A run fails with the provider's sentence and returns its holdCheck the file, then retry
A hand-off reaches g.pipelines.handle with the wrong secret, an altered body or an old timestampRefused before your function runs. The same run.id delivered twice runs your function once; a function that throws fails the run and returns its holdCheck the pipeline secret
Was this page helpful?

Last updated