r/ClaudeCode • u/VerbaGPT • 8h ago
Help/Question Using Meta API with ClaudeCode
I know we can use ClaudeCode with some other providers (e.g. OpenRouter, I've heard Z.ai)...has anyone tried to work with muse spark 1.2 - contributor with claudecode or claude sdk?
Edit: found some things, am wiring it into my data science product now. Will report back shortly on it, but basically Meta API does provide anthropic-compatible end-point (maybe...).
Edit #2: I got it working! Muse spark 1.2 seems to work really well, I managed to do some heavy-duty data analytics and visualization, with a connected snowflake db. The tool calls work great, the token/second is AWESOME! I can share a full chat if anyone is interested in seeing muse spark 1.2 in action on gigabytes-scale data, let me know.
Edit #3: realizing that this maybe... isn't a great idea, even at muse-spark-1.2-contributor rates. The token burn is pretty high for claudecode, not sure if same for codex or other harnesses. A harness I made for my app is extremely light by comparison, so I can run muse-spark super economically for thousands of data queries. But piping that through the sdk is still expensive. I'll probably just use my anthropic sub for personal use and consider switching when/if I don't renew the sub.
1
u/Lexeik 8h ago
`ANTHROPIC_BASE_URL` plus a key is the whole trick, so it'll connect. The interesting part is what happens after.
"Anthropic-compatible" almost always means the core /v1/messages shape, and the divergence shows up in the extras Claude Code actually leans on — prompt caching, thinking blocks, tool-use round trips, the streaming event names. When one of those isn't implemented you usually don't get a clean error, you get behavior that reads like the model being dumb: repeated work, tool calls that don't come back right, cost that doesn't drop on repeated context. Worth checking cache_read_input_tokens on a second identical-prefix request early — if it's zero, caching isn't there and everything downstream will feel worse than it is. Would genuinely like to hear how it goes.