provider.only on Sume image requests: why other slugs return 400

Porting an OpenRouter-style image call? On Sume, provider.only and order accept only sume; other slugs return 400 provider_not_available. Field rules.

4 min readSume
All posts

In v1, provider.only and provider.order accept only "sume". Any other provider slug returns 400 provider_not_available. Sume's Image API follows the OpenRouter Image API schema, so a request written for a multi-provider router parses, but Sume publishes a single sume endpoint for each model and does not disclose the upstream provider.

That makes most routing fields harmless to keep and a few of them wrong to send.

Field by field

provider routing fields on Sume image requests, from the Image API docs read 2026-10-06
FieldBehavior on SumeWhat to do in a port
provider.onlyAccepts only sumeSet to ["sume"] or remove
provider.orderAccepts only sumeSet to ["sume"] or remove
provider.ignoreAccepted, no effectRemove, it hides nothing
provider.sortAccepted, no effectRemove
provider.allow_fallbacksAccepted, no effectRemove
provider.optionsMust be omitted or {}Drop provider-specific keys
Any other slug in only / order400 provider_not_availableFix the slug

See the error for yourself

This sends one request that is valid and one with a different provider slug, so you can see the status codes before you port the rest. The second call should fail before anything is generated.

import os, requests

key = os.environ.get("SUME_API_KEY")
if not key:
    raise SystemExit("set SUME_API_KEY")
for slug in ("sume", "some-other-provider"):
    r = requests.post(
        "https://api.sume.com/v1/images",
        headers={"Authorization": f"Bearer {key}"},
        json={"model": "bytedance-seed/seedream-4.5", "mode": "async",
              "prompt": "A red panda astronaut",
              "provider": {"only": [slug]}},
        timeout=60,
    )
    print(slug, r.status_code, r.text[:160])

Why it is built this way

Keeping the schema lets a client library written for another router connect without edits. Rejecting unknown slugs keeps the client from believing a request went to a provider that it did not.

To get a particular family, choose the catalog model id. That is the lever Sume gives you. Routing within a model is not yours to set.

Related limits in the same table

  • stream: true returns 400 streaming_not_supported. Use async mode and read the job events instead.
  • seed and output_compression return 400 unsupported_parameter because no model advertises them.
  • mode: "subscribe" is an alias for sync, a single bounded wait.

A porting checklist

Before you switch a client over, strip the routing block to the one field you need, or to nothing. Then run a single low-cost call per model you use and read the status code. A clean 200 or 202 means the request shape is accepted. A 400 names the field to fix, and fixing it is usually a deletion.

Also re-read each model's descriptors with the catalog call. Routing is only one of the places a request written for another service can differ.

Sources

Related posts

More in Integrations

All Integrations posts

Written by Sume