Why an API Request With Fallback Still Returns model_not_found

Use the same key and endpoint to check the model ID and group. Understand when Modelflare can switch groups and which usage row confirms the route that served the request.

Why an API Request With Fallback Still Returns model_not_found

Modelflare's group fallback looks for another eligible route for the requested model and API contract. A fallback group can help when the primary group cannot serve that model. If the model is unavailable at model resolution or all permitted groups lack a route, you may still see model_not_found. Compare the exact model ID and HTTP status first, then check the endpoint and groups allowed for this key. Modelflare group failover · Modelflare errors

Read the status and error code together

Modelflare observation What to investigate
404 with model_not_found Check whether the ID is available at model resolution. A retired model can be rejected before the gateway selects a group.
503 with model_not_found Check whether an eligible channel can serve the requested model in any group the request can use.
403 Read the JSON error. Model or group permissions and insufficient quota can both produce this status.
404 with an HTML or plain-text body Compare the final URL and API path. An endpoint mismatch needs a path fix.

Save the status, response error.code or error.type, and X-ModelFlare-Request-Id if present. Trim sensitive request content from shared records. Modelflare errors

Check the live model list with the same API key

Use the same host and key as the failing application. GET /v1/models reads model metadata. Compare the exact id your app sends with the list, then check the required API contract on the model's pricing page.

curl -fsS https://modelflare.dev/v1/models \
  -H "Authorization: Bearer $MODELFLARE_API_KEY" |
  jq -r '.data[].id'

Open the key's configuration and check the primary group, the ordered fallback groups and whether the account may use them. A Smart API Key uses its routing strategy to evaluate the account's eligible groups. A model can appear in the list while a particular endpoint, group or channel still fails to serve the request. Modelflare authentication · Models and Pricing · Modelflare group failover

Run two bounded checks on the matching endpoint

Use a test key. For a text model that supports Chat Completions, the command below captures status, headers and the response. Set MODEL_ID first to the ID the application sent, then to a model this key can use on the same endpoint. Keep the rest of the request unchanged. If you're diagnosing another protocol, use its documented minimal request. A successful generation can incur charges. Endpoint selection

jq -n --arg model "$MODEL_ID" '{
  model: $model,
  messages: [{role: "user", content: "Return READY."}],
  max_tokens: 32,
  stream: false
}' | curl -sS -i https://modelflare.dev/v1/chat/completions \
  -H "Authorization: Bearer $MODELFLARE_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @-

A direct success with the second ID establishes a working comparison on the same key and API contract. To verify group fallback for the original model, run a separate comparison with that same model and a permitted backup group known to serve it. Then look for the actual serving group in the completed request's usage record. Distinguish a successful alternate model you invoked explicitly from an observed group failover.

Verify the route and what was billed

Evidence Keep
Request Timestamp, model ID, endpoint and key label
Result HTTP status, JSON error code when present and request ID
Routing Configured group order and the actual serving group when the request completes
Billing Usage and settled charge, plus any matching refund if present

If the gateway rejects the request before any model call, the documented charge for that request is zero. A request that succeeds through a fallback group is billed once at the group that served it. Use those rules to interpret the record for the exact request ID. The cases above describe documented routing behavior and over-the-wire checks you can run. Modelflare usage and cost · AI API fallback strategy