Model providers

Using Synthetic with OpenClaw

3 min read

Browse more in Model providers.

All model providers guides →

This guide shows you how to configure Synthetic as a model provider in OpenClaw using its Anthropic-compatible API. 5.

By the end, your agents will call Synthetic models through OpenClaw with the correct base URL and model references.

Setup flow

Prerequisites

  • An active Synthetic account with access to the Synthetic dashboard to obtain a SYNTHETIC_API_KEY.
  • An existing OpenClaw project where you can edit the config and run the openclaw CLI.
  • Network access from your OpenClaw environment to https://api.synthetic.new/anthropic.

Steps

  1. 1

    Get a Synthetic API key

    Start by getting credentials from Synthetic so OpenClaw can authenticate requests. You either grab the SYNTHETIC_API_KEY from your Synthetic account or let the OpenClaw onboarding wizard prompt you for it during setup.

    text
    Obtain a `SYNTHETIC_API_KEY` from your Synthetic account, or let the onboarding wizard prompt you for one.
  2. 2

    Run OpenClaw onboarding for Synthetic

    Run the OpenClaw onboarding flow with the Synthetic auth choice so it wires the provider into your config. This command tells OpenClaw to expect a Synthetic API key and sets up the provider as `synthetic` using the Anthropic Messages API.

    bash
    openclaw onboard --auth-choice synthetic-api-key
  3. 3

    Verify the default Synthetic model

    After onboarding, confirm that OpenClaw points your agents at a valid Synthetic model. 5, which you can then use in your agents and allowlists.

    text
    synthetic/hf:MiniMaxAI/MiniMax-M2.5
  4. 4

    Configure Synthetic provider and models in OpenClaw

    Add the Synthetic provider block to your OpenClaw config so the gateway knows the base URL, API type, and available models. 5 as the primary model, and exposes it with a friendly alias.

    json
    {
      env: { SYNTHETIC_API_KEY: "sk-..." },
      agents: {
        defaults: {
          model: { primary: "synthetic/hf:MiniMaxAI/MiniMax-M2.5" },
          models: { "synthetic/hf:MiniMaxAI/MiniMax-M2.5": { alias: "MiniMax M2.5" } },
        },
      },
      models: {
        mode: "merge",
        providers: {
          synthetic: {
            baseUrl: "https://api.synthetic.new/anthropic",
            apiKey: "${SYNTHETIC_API_KEY}",
            api: "anthropic-messages",
            models: [
              {
                id: "hf:MiniMaxAI/MiniMax-M2.5",
                name: "MiniMax M2.5",
                reasoning: false,
                input: ["text"],
                cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
                contextWindow: 192000,
                maxTokens: 65536,
              },
            ],
          },
        },
      },
    }
  5. 5

    List available Synthetic models in your account

    Once the provider is configured, list the Synthetic models OpenClaw can see for your account. This helps you confirm access and grab the exact model IDs you want to add to your config or allowlist.

    bash
    openclaw models list --provider synthetic
  6. 6

    Override the Synthetic base URL if it changes

    synthetic config instead of changing your code. OpenClaw appends /v1 automatically, so you only update the root URL and keep the Anthropic Messages integration working.

    json
    {
      models: {
        providers: {
          synthetic: {
            baseUrl: "https://new-api.synthetic.new/anthropic",
          },
        },
      },
    }
    
    Remember that OpenClaw appends `/v1` automatically.

Configuration

OptionDescriptionExample
SYNTHETIC_API_KEYAPI key used by OpenClaw to authenticate with the Synthetic Anthropic-compatible endpoints.sk-...
env.SYNTHETIC_API_KEYEnv mapping in your OpenClaw config that exposes the Synthetic API key to the provider block.sk-...
agents.defaults.model.primarySets the primary model your agents use by default, here pointing to a Synthetic model reference.synthetic/hf:MiniMaxAI/MiniMax-M2.5
agents.defaults.modelsOptional model allowlist; add each Synthetic model you want agents to see, or it will be hidden.{ "synthetic/hf:MiniMaxAI/MiniMax-M2.5": { alias: "MiniMax M2.5" } }
models.modeControls how model definitions merge with other config; the example uses merge.merge
models.providers.synthetic.baseUrlBase URL for the Synthetic Anthropic-compatible API; OpenClaw appends /v1 automatically.https://api.synthetic.new/anthropic
models.providers.synthetic.apiKeyReferences the Synthetic API key from env so the provider can authenticate.${SYNTHETIC_API_KEY}
models.providers.synthetic.apiSpecifies that this provider uses the Anthropic Messages API.anthropic-messages
models.providers.synthetic.models[0].idThe Synthetic model ID as exposed by the provider, without the synthetic/ prefix.hf:MiniMaxAI/MiniMax-M2.5
models.providers.synthetic.models[0].nameHuman-readable name for the Synthetic model.MiniMax M2.5
models.providers.synthetic.models[0].reasoningWhether the model supports reasoning features according to the Synthetic catalog.false
models.providers.synthetic.models[0].inputThe input modalities supported by the model, such as text or text + image.["text"]
models.providers.synthetic.models[0].costCost configuration for the model; Synthetic models use 0 for input/output/cache.{ input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
models.providers.synthetic.models[0].contextWindowMaximum context window size for the model in tokens.192000
models.providers.synthetic.models[0].maxTokensMaximum number of output tokens the model can generate.65536

Troubleshooting

Synthetic requests fail after you set the base URL to https://api.synthetic.new/anthropic/v1

OpenClaw’s Anthropic client appends /v1 automatically, so using /anthropic/v1 causes a double /v1 and breaks requests. baseUrl so OpenClaw can build the correct endpoint.

bash
baseUrl: "https://api.synthetic.new/anthropic"

Your agent cannot see a Synthetic model you expect to use

models, OpenClaw hides any model not explicitly listed. 5) to the allowlist so the agent can access it.

bash
"synthetic/hf:MiniMaxAI/MiniMax-M2.5": { alias: "MiniMax M2.5" }

You are unsure which Synthetic models are available to your OpenClaw project

Your Synthetic account may not expose every catalog model, so you need to query what OpenClaw can actually see. Run the models list command filtered by provider synthetic to inspect the available IDs before adding them to your config.

bash
openclaw models list --provider synthetic

Frequently asked questions

Powered by Mem0

Add persistent memory to OpenClaw

Official Mem0 plugin for OpenClaw keeps context across chats and tools. Smaller prompts, lower cost, better continuity for your agents.

More in Model providers