Together AI Provider Setup and Model Selection

Configure the Together AI provider in OpenClaw with an API key and default model. Covers onboarding, non-interactive setup, and the built-in model catalog with pricing.

Read this when

  • You want to use Together AI with OpenClaw
  • You need the API key env var or CLI auth choice

Together AI offers a unified API for reaching popular open-source models such as Llama, DeepSeek, Kimi, and others. OpenClaw ships it as the together provider.

PropertyValue
Providertogether (alias: togetherai)
AuthTOGETHER_API_KEY
APIOpenAI-compatible
Base URLhttps://api.together.xyz/v1

Getting started

Get an API key

Generate an API key from api.together.ai/settings/api-keys.

Run onboarding

openclaw onboard --auth-choice together-api-key

Set a default model

{
  agents: {
    defaults: {
      model: {
        primary: "together/zai-org/GLM-5.2",
      },
    },
  },
}

Non-interactive example

openclaw onboard --non-interactive --accept-risk --skip-health \
  --mode local \
  --auth-choice together-api-key \
  --together-api-key "$TOGETHER_API_KEY"

Note

During onboarding, together/zai-org/GLM-5.2 is configured as the default chat model.

Built-in catalog

Prices are listed in USD per million tokens.

Model refNameInputContextMax outputCost (in/out)Notes
together/meta-llama/Llama-3.3-70B-Instruct-TurboLlama 3.3 70B Instruct Turbotext131,0728,1921.04 / 1.04General model
together/zai-org/GLM-5.2GLM 5.2 FP4text262,144131,0721.40 / 4.40Default model

Video generation

Video generation is also registered by the bundled together plugin, which works through the shared video_generate tool.

PropertyValue
Default video modelWan-AI/wan2.7-t2v
Other modelsWan-AI/wan2.7-i2v, minimax/hailuo-02
Modestext-to-video; image-to-video only with Wan-AI/wan2.7-i2v (single first-frame image)
DurationWan 2.7: 2-10 seconds in OpenClaw; Hailuo duration support is model-specific
Supported parameterssize (see below); aspectRatio/resolution are not read

When Wan 2.7 is used, OpenClaw maps size onto Together's resolution and ratio fields. The sizes that are accepted are documented in Together's Wan 2.7 guide:

Aspect ratio720P size1080P size
16:91280x7201920x1080
9:16720x12801080x1920
1:1960x9601440x1440
4:31104x8321648x1248
3:4832x11041248x1648

Any other Wan size is rejected before the request is submitted. Leaving out size lets Together apply its defaults. For Hailuo, pixel width and height are still passed through from size. Wan image input travels as media.frame_images together with frame: "first", rather than as a style reference in media.reference_images.

To make Together your default video provider:

{
  agents: {
    defaults: {
      mediaModels: {
        video: {
          primary: "together/Wan-AI/wan2.7-t2v",
        },
      },
    },
  },
}

Tip

Shared tool parameters, how providers are selected, and failover behavior are covered in Video generation.

Prompt caching

Matching prompt prefixes are reused automatically by Together. To improve routing between turns, OpenClaw includes a stable prompt_cache_key on native Together requests. Depending on the model's response format, cache usage is read from usage.prompt_tokens_details.cached_tokens and usage.cached_tokens. Reuse works best when the model, tool definitions, reasoning settings, and earlier messages stay unchanged. See Together prompt caching.

Environment note

When the Gateway is run as a daemon (launchd/systemd), confirm that TOGETHER_API_KEY can be seen by that process (set it in ~/.openclaw/.env, for instance, or through env.shellEnv).

Warning

A key exported only in your interactive shell will not be visible to gateway processes managed by a daemon. For persistent availability, use ~/.openclaw/.env or the env.shellEnv config.

Troubleshooting

  • Check that your key works: openclaw models list --provider together
  • When models fail to show up, make sure the API key is set in the environment your Gateway process actually reads.
  • Model refs take the form together/<model-id>.
  • Model providers, Rules for providers, model refs, and how failover works.

  • Video generation, Parameters shared by the video generation tool, plus how a provider is chosen.

  • Configuration reference, The complete config schema, provider settings included.

  • Together AI, The Together AI dashboard, API documentation, and pricing.

687 words · updated Oct 26, 2026