Client integrations
Client integrations
Use Wavelike with Claude Code, OpenCode, and Pi through app-scoped model endpoints and Connect device-code auth.
Before you start
Create or select a Wavelike app, then create a model stack with the public stack ID you want the client to use as its model name.
For Claude Code, use an app-user runtime token or restricted API key because Claude Code talks directly to the Anthropic-compatible endpoint.
For OpenCode and Pi, create a public Connect client for the app. Choose your app's users plus CLI/local tool when a Wavelike dashboard user should approve access, or Enterprise SSO employees plus CLI/local tool when the browser should authenticate the terminal user through company SSO. The CLI prints a one-time code, opens the browser approval page, and polls until approval completes.
- API base URL: https://api.wavelike.ai for production, or https://api.wavelike.dev for staging.
- App ID: the Wavelike app public ID used in app-scoped API routes.
- Stack ID: the public model stack ID, passed as the client model name.
- Connect client ID: the public wkr_client_... ID from the app's Connected apps page.
- Access profile ID: optional Enterprise SSO profile selector for employee CLI flows.
Claude Code
Claude Code can call Wavelike through the app-scoped Anthropic-compatible Messages endpoint.
Set the Anthropic base URL to the app route without /v1. Claude Code appends /v1/messages, so Wavelike receives requests at /:appId/v1/messages.
Use the Wavelike stack ID as the Claude model. If your stack ID does not look like a Claude model slug, also set the custom model option so Claude Code shows it in model selection.
To list every stack in /model by name, add modelPicker to your user settings (~/.claude/settings.json; Claude Code 2.1.242 or later). wavelike setup claude-code writes it for you. behavesAs names the Claude model a stack runs, so thinking and effort work for a stack ID Claude Code doesn't know.
1export WAVELIKE_APP_ID="<app-id>"2export WAVELIKE_STACK_ID="support-chat"3export ANTHROPIC_BASE_URL="https://api.wavelike.ai/${WAVELIKE_APP_ID}"4export ANTHROPIC_AUTH_TOKEN="<wavelike-runtime-token-or-restricted-api-key>"5export ANTHROPIC_MODEL="${WAVELIKE_STACK_ID}"6export ANTHROPIC_CUSTOM_MODEL_OPTION="${WAVELIKE_STACK_ID}"7export ANTHROPIC_CUSTOM_MODEL_OPTION_NAME="Wavelike ${WAVELIKE_STACK_ID}"1{2 "modelPicker": {3 "options": [4 {5 "model": "support-chat",6 "label": "Support chat",7 "description": "claude-sonnet-5-5",8 "behavesAs": "claude-sonnet-5-5"9 }10 ],11 "replaceBuiltInOptions": true12 }13}1claude --model "$WAVELIKE_STACK_ID"1curl "https://api.wavelike.ai/$WAVELIKE_APP_ID/v1/messages" \2 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \3 -H "Content-Type: application/json" \4 -d '{5 "model": "support-chat",6 "max_tokens": 256,7 "messages": [8 { "role": "user", "content": "Say hello from Wavelike." }9 ]10 }'OpenCode
Use the Wavelike OpenCode plugin so OpenCode signs in with Wavelike Connect and uses your app's model stacks.
The plugin requires OpenCode 2 or later; OpenCode 1.x plugins are not supported. Install it from npm with opencode plugin add @wavelike/opencode-plugin, which adds it to the plugins array of opencode.jsonc.
Run opencode auth login and choose Wavelike. Wavelike Connect (device code) shows a one-time code to approve in the browser. Wavelike Connect (browser) opens the sign-in page directly and also asks for your organization slug or company domain (a domain works once your admin has verified it); on a remote machine, choose the paste option and paste the final redirect URL back into OpenCode. Both methods ask for your company domain and look up the Connect client from it once your admin has verified the domain and chosen the app for engineer tools; enter a Connect client ID instead to skip the lookup. They also ask, optionally, for the API URL (production by default) and an access profile ID. Use a Connect client configured with Enterprise SSO employees plus CLI/local tool when OpenCode should authenticate against employee SSO instead of Wavelike dashboard users.
OpenCode stores and refreshes the Connect credential itself, and the plugin lists the app's model stacks as wavelike/<stack-id>. Sign-ins made with the earlier OpenCode 1.x plugin do not carry over, so sign in again after upgrading.
1{2 "plugins": [3 "@wavelike/opencode-plugin"4 ],5 "model": "wavelike/support-chat"6}1opencode plugin add @wavelike/opencode-plugin2opencode auth login3# Select Wavelike, then a Wavelike Connect method.4# Enter your company domain, such as yourcompany.com, and approve access in the browser.Pi
Use the Wavelike Pi provider extension to register Wavelike as an OpenAI Responses-compatible provider.
Install it from npm with pi install npm:@wavelike/pi-extension. The extension registers provider ID wavelike, logs in with Connect device-code auth, loads models from /:appId/v1/models, and sends generation traffic to /:appId/v1/responses.
During /login wavelike, enter your company domain and the extension looks up the Connect client from it. Set WAVELIKE_COMPANY_DOMAIN to skip the question, or WAVELIKE_CONNECT_CLIENT_ID to use a specific client. Use a Connect client configured with Enterprise SSO employees plus CLI/local tool when Pi should authenticate against employee SSO rather than Wavelike dashboard users. WAVELIKE_API_BASE_URL defaults to production, and WAVELIKE_ACCESS_PROFILE_ID is optional.
1pi install npm:@wavelike/pi-extension1# All optional:2export WAVELIKE_COMPANY_DOMAIN="yourcompany.com"3export WAVELIKE_CONNECT_CLIENT_ID="wkr_client_..."4export WAVELIKE_API_BASE_URL="https://api.wavelike.ai"5export WAVELIKE_ACCESS_PROFILE_ID="<access-profile-id>"1/login wavelike2# Enter your company domain, copy the one-time code, approve it in the browser, then choose a Wavelike model stack.When a limit is reached
When a usage limit policy or the account balance blocks a request, coding agents stop and show why instead of retrying.
The agent shows Wavelike's message, which names the usage limit policy and says when it resets, for example: Wavelike usage limit reached: Free tier (Monthly tokens). Resets 2026-12-01 00:00 UTC. Claude Code, OpenCode, and Pi send the request once and don't retry it. Codex shows its usage-limit notice with the time to try again.
Responses governed by a usage limit policy also carry Codex's x-codex-primary-* usage headers, so Codex can show how much of the usage limit is used when Wavelike is its model provider.
To check usage from any client, call GET /:appId/v1/me/usage-limits with the same credential, or read the X-Wavelike-Usage-Limit-* response headers. See Errors in the API reference for the full response bodies.
Troubleshooting
- If model listing is empty, confirm the Connect client or token can access the selected app and stack.
- If Claude Code gets a 401, confirm ANTHROPIC_BASE_URL uses /<app-id> and ANTHROPIC_AUTH_TOKEN is a Wavelike runtime token or restricted API key.
- If a device code expires, rerun the login command and approve the new code before the countdown ends.
- If generation fails with unsupported_model, update the Wavelike stack so the requested route has a compatible text slot.