Docs/Get started

Quickstart

Create a key and make your first request in two minutes.

This guide takes you from zero to a streamed response. You need a Vaelor account; the Free plan includes 20 credits every 12 hours, which is plenty to follow along.

  1. 1

    Create an API key

    Open API keys in the dashboard, select Create key, and give it a name like local-dev. Copy the key — it starts with vk_live_.

  2. 2

    Store it as an environment variable

    Keep the key out of your source code. Export it in your shell, or add it to your .env file.

    Shell
    export VAELOR_API_KEY="vk_live_..."
  3. 3

    Send your first request

    Call the chat endpoint with the flash model. The response body is the generated text, streamed as it's written.

    curl https://api.vaelor.chat/v1/chat \
      -H "Authorization: Bearer $VAELOR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "text": "Write a haiku about the first snow in Lisbon.",
        "attachments": [],
        "config": { "model": "flash", "modes": [], "uncensored": false }
      }'
  4. 4

    Stream tokens as they arrive

    For chat UIs, read the body incrementally instead of waiting for the full reply.

    TypeScript
    const reader = response.body!.pipeThrough(new TextDecoderStream()).getReader()
    
    while (true) {
      const { value, done } = await reader.read()
      if (done) break
      process.stdout.write(value)
    }
  5. 5

    Check what it cost

    Every response carries an x-vaelor-usage-request-id header. Look it up in usage to see the credits it was charged.

Next steps#

Was this page helpful?

Questions? Contact support

Last updated October 20, 2026