Skip to main content

Setup

Get your Jetty environment ready in under 5 minutes.

Prerequisites

  • A Jetty account (sign up at jetty.io)
  • API keys for the models you want to use (OpenAI, Anthropic, Replicate, etc.)

Step 1: Get Your API Token

  1. Log in to dock.jetty.io
  2. Go to SettingsAPI Tokens
  3. Click Create Token
  4. Copy your token (format: mlc_xxxxxxxxxxxxx)
# Set your token as an environment variable
export JETTY_API_TOKEN="mlc_your_token_here"

Step 2: Configure Model API Keys

Jetty needs API keys to access AI models. Add them in the Jetty dashboard:

  1. Go to SettingsSecrets
  2. Add your API keys:
Secret NameProviderGet Key From
OPENAI_API_KEYOpenAI (GPT-4, DALL-E)platform.openai.com
ANTHROPIC_API_KEYAnthropic (Claude)console.anthropic.com
REPLICATE_API_TOKENReplicate (Flux, Stable Diffusion)replicate.com/account
GOOGLE_API_KEYGoogle (Gemini)aistudio.google.com

Step 3: Create Your First Collection

Collections organize your workflows, datasets, and models.

  1. Go to dock.jetty.io
  2. Click New Collection
  3. Name it (e.g., "my-workflows")
  4. Click Create

Step 4: Verify Your Setup

Test that everything works with this simple workflow:

curl -X POST "https://flows-api.jetty.io/api/v1/run-sync/your-collection/test" \
-H "Authorization: Bearer $JETTY_API_TOKEN" \
-F "bakery_host=https://dock.jetty.io" \
-F 'init_params={"text": "Hello, Jetty!"}'

If you see a response with workflow results, you're all set!


Quick Reference

Base URLs

ServiceURLPurpose
Dockhttps://dock.jetty.ioUI, task management, settings
Flows APIhttps://flows-api.jetty.ioRun workflows, view logs

Authentication

All API requests need the Authorization header:

curl -H "Authorization: Bearer $JETTY_API_TOKEN" ...

Common Environment Variables

# Required
export JETTY_API_TOKEN="mlc_your_token"

# Optional (for local development)
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export REPLICATE_API_TOKEN="r8_..."

Option C: Set Up with a Coding Agent

If you use Claude Code, Cursor, Windsurf, or another MCP-compatible editor, you can set up Jetty without leaving your terminal.

Claude Code (fastest):

claude plugin marketplace add jettyio/agent-skill
claude plugin install jetty@jetty

Then run /jetty-setup — the plugin walks you through account creation, token storage, API key configuration, and runs a demo workflow in about 3 minutes.

Other editors (Cursor, Windsurf, VS Code, Zed):

Add the Jetty MCP server to your editor's config. See the MCP Server Setup guide for config snippets for each editor.

Once connected, ask your agent: "List my Jetty collections" to verify the setup works.

For full details, see Using Jetty with AI Agents.


Troubleshooting

"Invalid or expired token"

  • Regenerate your token in Settings → API Tokens
  • Make sure you're using the full token including the mlc_ prefix

"Access denied to collection"

  • Verify the collection name in your URL matches exactly
  • Check that your token has access to that collection

"API key not found"

  • Add the required API key in Settings → Secrets
  • Use the exact secret name expected by the activity (e.g., OPENAI_API_KEY)

Next Steps

Ready to build? Start with the 60-Second Quickstart to run your first workflow.

Or jump to a specific tutorial: