FAQ & Troubleshooting

Most issues come down to a wrong base URL, an expired key, or a model that doesn't exist on our gateway. Skim this page first — the fix is usually a 30-second change.

Troubleshooting

My key returns 401 "unauthorized"

Almost always one of three things:

Claude Code opens but doesn't see my key

Claude Code reads ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL from environment or ~/.claude.json. After you export the vars, restart your shell — Claude Code caches config at startup.

Requests work but credits drop way faster than expected

Check two things:

  1. You may be on a non-cached path. Enable prompt caching and the same workload typically costs 60–80% less.
  2. Check max_tokens on your request. Setting it to 4096 when you only need 200 makes the output 20× more expensive.

I paid but no key showed up in my dashboard

Webhook delivery can take 5–30 seconds. Refresh the dashboard. If after 5 minutes there's still nothing:

"model_not_found" but the model exists on Anthropic's site

We don't proxy every model — only the 12 listed in the Models page plus the full *-codex family. If it's not in the catalog, it won't resolve. Pick a similar model from the list and update the model field.

Streaming stops mid-response

This is usually a client-side timeout, not us. Bump the request timeout to at least 120 seconds. If you still see it on short replies, email support with the request ID from x-request-id in the response headers.

FAQ

Do credits expire?

No. Credits stay on your account until you spend them. Buy $15 today, use $0.50 a month — works fine.

Can I get a refund?

Yes, within 7 days of purchase, as long as you've used less than 10% of the credits. See the refund policy for details.

Is my data used to train models?

No. SparkAPI is a stateless proxy — requests go to the upstream provider, responses come back, nothing is logged beyond billing counters.

Can I share my key across team members?

You can, but the credit balance is shared too — there's no per-user accounting. For team plans, contact support.

Do you support function calling / tool use / vision?

Yes. Anything the upstream model supports, we pass through. Send the same tools, tool_choice, images arrays you'd send to Anthropic / OpenAI / Gemini directly.

How do I switch from the official API to SparkAPI?

Change two things: the base URL and the API key. The request body, headers, and response format stay identical. See the Quickstart for a copy-paste example.

Can I use SparkAPI in a commercial product?

Yes. The terms of service allow commercial use. You're responsible for the output of the model in your product, same as if you were calling the upstream API directly.

What happens if SparkAPI goes down?

Requests fail fast with a 5xx and a clear error. Your client should treat it like any other transient API failure: retry with backoff. The dashboard status indicator shows live availability.

Question not answered here? Email support@sparkapi.cc. We reply within 12 hours on weekdays.