Developer quickstart

Your first traced API call.

For developers calling VIABLE from code. Hand setup to your coding agent with one message, or follow four steps yourself. Either way you end with a scoped key, a working request, and its trace in your dashboard.

Teaching or running a study? Start with your first class or your first study.

Your own AI

One message. Your AI handles setup.

Start a new task, paste this, and approve the sign-in link it shows you in your own browser. It installs the VIABLE CLI and its Agent Skill, and never sees your password.

If you don’t code
Claude Cowork in the Claude desktop app, ChatGPT Work in the ChatGPT app, or Gemini with Task chosen under the prompt box.
If you build software
Claude Code, Codex, Google Antigravity, or any agent with a terminal.
  • Builds a course and its activities, or sets up a study and uploads its approved consent form
  • Writes integration code from the maintained API guide and, with your approval, creates scoped keys straight into a local file, so the secret never enters the chat
  • Reads usage and request logs, builds knowledge bases, and dry-runs Agent workflows before anything is billed
Message for your AI
Read https://www.viablelab.org/downloads/viable-cli.md and set up VIABLE CLI and its Agent Skill for your environment. Help me sign in securely.

Your AI needs to run commands, with Node.js 22+.Setup detailsCan’t run commands? Share the API guide

No code

Give students or patrons an assistant

Build an agent that answers from your own sites and files, then share it as a chat page. Visitors need no account or key.

  1. Add knowledgeWebsites to crawl, files, or pasted text it should answer from.
  2. Describe itThe designer drafts the workflow. Chat with it in Try it; the editor assistant suggests fixes.
  3. Publish and shareTurn on its chat page under Connect, then share the link or paste one line into LibGuides, LibAnswers, Canvas or any site.

Or call the API yourself, in about five minutes

  1. Create an API key

    Sign in, open API Keys, and create a key with the model:request scope. Each key can carry its own rate, token, cost, and model limits.

    Already have a provider account or grant? Add it under Provider keys and the same code bills that account instead of VIABLE credits.

    Terminal
    export VIABLE_API_KEY="viable_sk_..."

    Keep the key on your server. Browser and mobile apps should call your backend, which calls the API.

  2. Send your first request

    It is a single JSON POST, so any HTTP client works. Pick the tab that matches your stack:

    • cURL runs in any terminal.
    • fetch and requests need no extra packages.
    • SDK tabs use the official OpenAI SDK with its base URL set to https://api.viablelab.org/v1. If your code already uses it, that one line is the whole migration.

    viable-3 is a fast, low-cost alias. Swap in any ID from the model catalog. SDK install: pip install openai or npm install openai.

    curl https://api.viablelab.org/v1/chat/completions \
      -H "Authorization: Bearer $VIABLE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "viable-3",
        "messages": [
          { "role": "user", "content": "Explain photosynthesis to a 5th grader." }
        ]
      }'
  3. Read the response

    Responses keep the OpenAI chat.completion shape. Read the reply from choices[0].message.content; usage drives the cost estimate in your dashboard.

    Response
    {
      "id": "chatcmpl-...",
      "object": "chat.completion",
      "model": "viable-3",
      "choices": [
        {
          "index": 0,
          "message": {
            "role": "assistant",
            "content": "Plants make their own food from sunlight, water, and air..."
          },
          "finish_reason": "stop"
        }
      ],
      "usage": { "prompt_tokens": 18, "completion_tokens": 96, "total_tokens": 114 }
    }
  4. Find it in Request Logs

    Every authenticated request appears as soon as it arrives, then fills in status, model, tokens, estimated cost, latency, and the logged request and response, ready to filter or export.

    Request logExample
    200POST /v1/chat/completions1.4 s
    Model
    viable-3
    Tokens
    18 in · 96 out
    Est. cost
    $0.00006
    Key
    prod-tutor

Next steps