← All documentation

Configure AskCodi API

Fast guide to connect Zed AI-native code editor with AskCodi API. Configure settings.json, language models, and OpenAI-compatible API endpoints.

Connect Zed to AskCodi for diverse AI models. Use different models for Write, Ask, and Minimal modes.

Why Connect Zed to AskCodi?

Zed includes default AI providers. Connect AskCodi for specialized models. Use fast models for Minimal Mode. Use powerful models for Write Mode tasks.

Prerequisites

  • Zed installed from https://zed.dev
  • AskCodi account with API key
  • Access to settings.json file (~/.config/zed/settings.json)
  • Basic JSON knowledge
  • Know which models to access

Your API key connects to multiple AskCodi models via OpenAI-compatible endpoint.

Step 1: Install Zed

  1. Download Zed from https://zed.dev
  2. Run installer
  3. Launch Zed after installation

Step 2: Open Settings File

  1. In Zed, open Command Palette (Cmd+Shift+P on macOS or Ctrl+Shift+P on Windows/Linux)
  2. Type "settings.json"
  3. This opens ~/.config/zed/settings.json

Step 3: Configure AskCodi Provider

In settings.json, add language_models configuration:

{
  "language_models": {
    "openai_compatible": {
      "askcodi": {
        "api_url": "https://api.askcodi.com/v1",
        "available_models": [
          {
            "name": "your-model-name",
            "display_name": null,
            "max_tokens": 200000,
            "max_output_tokens": 32000,
            "max_completion_tokens": 200000,
            "capabilities": {
              "tools": true,
              "images": true,
              "parallel_tool_calls": false,
              "prompt_cache_key": false
            }
          }
        ]
      }
    }
  }
}

Replace your-model-name with specific model (gpt-4o, claude-3-opus, etc.)

Step 4: Add Multiple Models (Optional)

Configure multiple AskCodi models by adding more entries to available_models array:

{
  "language_models": {
    "openai_compatible": {
      "askcodi": {
        "api_url": "https://api.askcodi.com/v1",
        "available_models": [
          {
            "name": "gpt-4o",
            "display_name": "GPT-4o (Fast)",
            "max_tokens": 200000,
            "max_output_tokens": 32000,
            "max_completion_tokens": 200000,
            "capabilities": {
              "tools": true,
              "images": true,
              "parallel_tool_calls": false
            }
          },
          {
            "name": "claude-3-opus",
            "display_name": "Claude 3 Opus (Smart)",
            "max_tokens": 200000,
            "max_output_tokens": 32000,
            "max_completion_tokens": 200000,
            "capabilities": {
              "tools": true,
              "images": true,
              "parallel_tool_calls": false
            }
          }
        ]
      }
    }
  }
}

Step 5: Add API Key

  1. Open Agent Panel settings in Zed
  2. Use Command Palette and type "agent: open settings"
  3. Look for provider (askcodi) in language models list
  4. Paste your AskCodi API key into input field
  5. Hit Enter

Step 6: Save and Restart

  1. Save settings.json (Cmd+S or Ctrl+S)
  2. Restart Zed to load new configuration

Step 7: Test Integration

  1. Open AI features in Zed (Write, Ask, or Minimal mode)
  2. Verify AskCodi models appear in dropdown
  3. Try simple AI request to confirm connection
  4. Check responses come through with good quality and speed

Model Selection Strategy

Configure different models for use cases:

  • Write Mode: Models optimized for code generation and understanding
  • Ask Mode: Models with strong reasoning capabilities
  • Minimal Mode: Fast models for quick assistance
  • Complex Tasks: Powerful models for detailed analysis

Optimization Tips

Performance: Adjust max_tokens based on usage patterns. Higher limits allow comprehensive responses but may impact performance.

Model Selection: Use different models for different tasks. Fast models for routine assistance. Capable models for complex coding tasks.

Usage Monitoring: Check AskCodi dashboard to monitor API usage across Zed AI modes.

Backup: Keep backup of settings.json to restore AskCodi configuration if needed.

Troubleshooting

Settings Syntax:

  • Ensure JSON syntax is valid
  • All brackets, quotes, commas properly formatted
  • Use JSON validator if needed

API Connection:

Model Not Appearing:

  • Confirm settings.json saved correctly
  • Restart Zed after changes

AI Features Not Working:

  • Check internet connection
  • Verify API key permissions

Performance Issues:

  • Try models with smaller token limits
  • Check internet connection speed

Key Steps

  • Download Zed from zed.dev
  • Configure ~/.config/zed/settings.json with AskCodi provider
  • Use API URL: https://api.askcodi.com/v1
  • Add AskCodi API key through Agent Panel
  • Define available models with token limits
  • Access Write, Ask, and Minimal AI modes
  • Monitor usage through AskCodi dashboard

Connect Zed to AskCodi for specialized AI models across all Zed AI modes.

Something missing or wrong in this guide? Talk to us