Skip to main content
    Quickstart

    Add AI to Your App in 5 Minutes

    Get your API key, make your first call, and ship AI features. No backend required.

    Prerequisites

    • A Behest AI account (free, sign up at behest.ai/dashboard — no credit card required)
    • Any HTTP client — fetch, axios, requests, curl, or your language of choice

    1Get Your API Key

    1. Sign up at behest.ai/dashboard
    2. Create a new project
    3. Configure your allowed CORS origins (e.g., http://localhost:3000 for local development)
    4. Copy your project API key

    Your project URL will look like https://your-project.behest.app

    2Make Your First API Call

    JavaScript (fetch)

    const response = await fetch(
      "https://your-project.behest.app/v1/chat/completions",
      {
        method: "POST",
        headers: {
          "Authorization": "Bearer your-api-key",
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          model: "gemini-2.5-flash",
          messages: [
            { role: "user", content: "Summarize this contract" }
          ],
        }),
      }
    );
    
    const data = await response.json();
    console.log(data.choices[0].message.content);

    Python (requests)

    import requests
    
    response = requests.post(
        "https://your-project.behest.app/v1/chat/completions",
        headers={
            "Authorization": "Bearer your-api-key",
            "Content-Type": "application/json",
        },
        json={
            "model": "gemini-2.5-flash",
            "messages": [
                {"role": "user", "content": "Summarize this contract"}
            ],
        },
    )
    
    data = response.json()
    print(data["choices"][0]["message"]["content"])

    curl

    curl -X POST https://your-project.behest.app/v1/chat/completions \
      -H "Authorization: Bearer your-api-key" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "gemini-2.5-flash",
        "messages": [
          {"role": "user", "content": "Summarize this contract"}
        ]
      }'

    3What Happens Automatically

    When you make that API call, Behest handles everything behind the scenes:

    CORS handledBrowser requests just work
    Auth validatedAPI key verified, tenant isolated
    PII scrubbedSensitive data detected and protected
    Prompts defendedInjection attacks blocked
    Rate limits enforcedPer-IP, per-project, per-user
    Memory persistedConversation context maintained
    Tokens trackedUsage and spend recorded
    Fully observableTraces, metrics, and logs captured

    Next Steps