Manage API keys
Get your LastMile API key
- Log in or sign up for free at https://lastmileai.dev
- Navigate to API Keys console
- Click
+ New Key
Export the API key you generated as an environment variable. Alternatively, you can also pass it directly into the Lastmile
client.
- bash
- python
- node.js
export LASTMILE_API_TOKEN="your_api_key"
from lastmile import Lastmile
from lastmile.lib.auto_eval import AutoEval
# Recommended: AutoEval client SDK (higher-level APIs)
client = AutoEval(api_token="api_token_if_LASTMILE_API_TOKEN_not_set")
# Lastmile client (REST API wrappers)
client = Lastmile(
bearer_token="api_token_if_LASTMILE_API_TOKEN_not_set",
)
import { Lastmile } from 'lastmile';
import { AutoEval } from "lastmile/lib/auto_eval";
// Recommended: AutoEval client SDK (higher-level APIs)
const client = new AutoEval({
apiKey: "api_token_if_LASTMILE_API_TOKEN_not_set"
});
// Lastmile client (REST API wrappers)
const restClient = new Lastmile({
bearerToken: "api_token_if_LASTMILE_API_TOKEN_not_set",
});
Configure Weights & Biases API token
AutoEval allows you to track detailed training runs in your own Weights & Biases account. To do so, navigate to the API Keys console, and save your W&B API key. Subsequent fine-tuning runs will be tracked in your account.