MUSCLE Flex

Quickstart

Quickstart

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.

Four steps

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.

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.

Send a request with your SDK.

Use the OpenAI SDK against /v1 or the Anthropic SDK against the host. Each response carries an X-Request-Id header; save it for support.

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.

Shell
# scheme and host from your invitation
export FLEX_BASE_URL="https://api.adhibita.com"
# from the API keys page of the portal
export MUSCLE_FLEX_API_KEY="<FLEX_API_KEY>"
curl -i "$FLEX_BASE_URL/v1/account" \
  -H "Authorization: Bearer $MUSCLE_FLEX_API_KEY"
Reference

The request, in two SDKs.

Illustrative example
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: `${process.env.FLEX_BASE_URL}/v1`,
  apiKey: process.env.MUSCLE_FLEX_API_KEY,
});

const res = await client.chat.completions.create({
  model: "muscle/auto",
  messages: [
    { role: "user", content: "Summarize this test failure." },
  ],
});
import Anthropic from "@anthropic-ai/sdk";

// Host only: the SDK adds /v1 itself
const client = new Anthropic({
  baseURL: process.env.FLEX_BASE_URL,
  apiKey: process.env.MUSCLE_FLEX_API_KEY,
});

const msg = await client.messages.create({
  model: "muscle/auto",
  max_tokens: 1024,
  messages: [
    { role: "user", content: "Summarize this test failure." },
  ],
});

Two variables

FLEX_BASE_URL
Flex endpoint
MUSCLE_FLEX_API_KEY
Your key
Model
muscle/auto
Base URLs

Mind the /v1.

OpenAI-shaped clients take the base URL with /v1. The Anthropic SDK and Claude Code take the host alone.

Endpoints

POST /v1/chat/completions
Chat Completions
POST /v1/responses
Responses
POST /v1/messages
Messages
POST /v1/messages/count_tokens
Token count · free
GET /v1/models
Models · free
GET /v1/account
Balance · free
Tools

You run the tools.

Flex returns tool calls. Your application executes them and sends the results back.

Before you rely on it

The examples are illustrative.

The SDK request surfaces are still Pending in the compatibility matrix. The four coding-agent setups have passed on the builds recorded there.

Before you build

Check compatibility

Tested agents and excluded fields.

Before you start

What you need.

Invitation

An accepted invitation.

MUSCLE Flex access and a funded service balance.

Key

A Flex API key.

Created on the API keys page of the portal.

Base URL

The base URL from your invitation.

The scheme and host only, without a trailing /v1.

Model id

Use muscle/auto.

Flex chooses the route for each request, so the model field does not select a model.

Agents

Tested coding agents.

Anthropic Messages

Claude Code

Setup page for Claude Code.

Responses

Codex CLI

Setup page for Codex CLI.

Chat Completions

opencode

Setup page for opencode.

Chat Completions

Crush

Setup page for Crush.

API reference

Streaming, tools and every field.

Docs

Open the full quickstart.

Portal

Sign in to create a key.

Quickstart | MUSCLE Flex