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.
| Property | Value |
|---|---|
| Provider | together (alias: togetherai) |
| Auth | TOGETHER_API_KEY |
| API | OpenAI-compatible |
| Base URL | https://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.2is configured as the default chat model.
Built-in catalog
Prices are listed in USD per million tokens.
| Model ref | Name | Input | Context | Max output | Cost (in/out) | Notes |
|---|---|---|---|---|---|---|
together/meta-llama/Llama-3.3-70B-Instruct-Turbo | Llama 3.3 70B Instruct Turbo | text | 131,072 | 8,192 | 1.04 / 1.04 | General model |
together/zai-org/GLM-5.2 | GLM 5.2 FP4 | text | 262,144 | 131,072 | 1.40 / 4.40 | Default model |
Video generation
Video generation is also registered by the bundled together plugin, which works through the shared video_generate tool.
| Property | Value |
|---|---|
| Default video model | Wan-AI/wan2.7-t2v |
| Other models | Wan-AI/wan2.7-i2v, minimax/hailuo-02 |
| Modes | text-to-video; image-to-video only with Wan-AI/wan2.7-i2v (single first-frame image) |
| Duration | Wan 2.7: 2-10 seconds in OpenClaw; Hailuo duration support is model-specific |
| Supported parameters | size (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 ratio | 720P size | 1080P size |
|---|---|---|
| 16:9 | 1280x720 | 1920x1080 |
| 9:16 | 720x1280 | 1080x1920 |
| 1:1 | 960x960 | 1440x1440 |
| 4:3 | 1104x832 | 1648x1248 |
| 3:4 | 832x1104 | 1248x1648 |
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/.envor theenv.shellEnvconfig.
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>.
Related
-
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.