Keep your agent. Change one endpoint.
Keep the first request small: confirm authentication, a non-streamed reply and its request ID. Then test streaming, and add one tool call once the basic path works.
Before you start
- An accepted MUSCLE Flex invitation and a funded service balance.
- A Flex API key, created on the API keys page of the portal.
- The Flex base URL from your invitation: the scheme and host only, without a trailing /v1.
- Configure
muscle/autoas the model id. Flex chooses the route for each request, so the model field does not select a model.
Connect in four steps.
- Step 1
Set the base URL and key
Keep both in your shell or secret store. Send the key in a header, never in the request body.
shell export FLEX_BASE_URL="https://api.adhibita.com" # scheme and host from your invitation export MUSCLE_FLEX_API_KEY="<FLEX_API_KEY>" # from the API keys page of the portal - Step 2
Check the key without spending credits
The account endpoint is never charged. It returns your available credits and the last four characters of the key.
bash curl -i "$FLEX_BASE_URL/v1/account" \ -H "Authorization: Bearer $MUSCLE_FLEX_API_KEY" - Step 3
Send a request with your SDK
Use the OpenAI SDK against
/v1or the Anthropic SDK against the host. Each response carries anX-Request-Idheader; save it for support.openai-sdk.ts import OpenAI from "openai"; const flex = new OpenAI({ apiKey: process.env.MUSCLE_FLEX_API_KEY, baseURL: `${process.env.FLEX_BASE_URL}/v1`, }); const completion = await flex.chat.completions.create({ model: "muscle/auto", messages: [ { role: "user", content: "Summarize the failure mode in this test output." }, ], }); console.log(completion.choices[0]?.message.content);anthropic-sdk.ts import Anthropic from "@anthropic-ai/sdk"; const flex = new Anthropic({ apiKey: process.env.MUSCLE_FLEX_API_KEY, baseURL: process.env.FLEX_BASE_URL, // host only; the SDK adds /v1 }); const message = await flex.messages.create({ model: "muscle/auto", max_tokens: 1024, messages: [ { role: "user", content: "Summarize the failure mode in this test output." }, ], }); console.log(message.content); - Step 4
Or configure a tested coding agent
Each agent has a setup page with the exact configuration, a key check and one tool call to verify it. These configurations passed on the Flex build recorded for each one in the compatibility matrix.
The SDK examples are illustrative. The SDK request surfaces are still Pending in the compatibility matrix; the four coding-agent setups above have passed on the builds recorded there. Streaming, tools and every field Flex accepts or rejects are covered in the API reference.