> ## Documentation Index
> Fetch the complete documentation index at: https://docs.forii.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Make your first API call in under 2 minutes

Get up and running with Forii. You'll make your first inference request before the page finishes loading.

## Step 1: Get your API key

1. Sign up at [app.forii.in](https://app.forii.in)
2. Navigate to **Dashboard → API Keys**
3. Click **Create New Key**
4. Copy the key — it starts with `forii_sk_` and is shown only once

<Info>
  Your free tier includes ₹50 in credits — enough for thousands of inference calls. No credit card needed to start.
</Info>

## Step 2: Install the SDK

Forii is OpenAI-compatible. Use the official OpenAI SDK — no Forii SDK needed.

<Tabs>
  <Tab title="Python">
    ```bash theme={null}
    pip install openai
    ```
  </Tab>

  <Tab title="JavaScript">
    ```bash theme={null}
    npm install openai
    ```
  </Tab>

  <Tab title="cURL">
    No installation needed. cURL is pre-installed on macOS and Linux.
  </Tab>
</Tabs>

## Step 3: Make your first request

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    import os
    from openai import OpenAI

    client = OpenAI(
        base_url="https://api.forii.in/inference/v1",
        api_key=os.environ["FORII_API_KEY"],
    )

    response = client.chat.completions.create(
        model="forii/deepseek-v3",
        messages=[
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Explain quantum computing in simple terms"},
        ],
        temperature=0.7,
        max_tokens=512,
    )

    print(response.choices[0].message.content)
    print(f"\nTokens: {response.usage.total_tokens}")
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    import OpenAI from "openai";

    const client = new OpenAI({
      apiKey: process.env.FORII_API_KEY,
      baseURL: "https://api.forii.in/inference/v1",
    });

    const response = await client.chat.completions.create({
      model: "forii/deepseek-v3",
      messages: [
        { role: "system", content: "You are a helpful assistant." },
        { role: "user", content: "Explain quantum computing in simple terms" },
      ],
      temperature: 0.7,
      max_tokens: 512,
    });

    console.log(response.choices[0].message.content);
    console.log(`\nTokens: ${response.usage.total_tokens}`);
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl https://api.forii.in/inference/v1/chat/completions \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $FORII_API_KEY" \
      -d '{
        "model": "forii/deepseek-v3",
        "messages": [
          {"role": "system", "content": "You are a helpful assistant."},
          {"role": "user", "content": "Explain quantum computing in simple terms"}
        ],
        "temperature": 0.7,
        "max_tokens": 512
      }'
    ```
  </Tab>
</Tabs>

## Step 4: Stream a response

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    stream = client.chat.completions.create(
        model="forii/deepseek-v3",
        messages=[{"role": "user", "content": "Tell me a story"}],
        stream=True,
    )

    for chunk in stream:
        if chunk.choices[0].delta.content:
            print(chunk.choices[0].delta.content, end="")
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    const stream = await client.chat.completions.create({
      model: "forii/deepseek-v3",
      messages: [{ role: "user", content: "Tell me a story" }],
      stream: true,
    });

    for await (const chunk of stream) {
      process.stdout.write(chunk.choices[0]?.delta?.content || "");
    }
    ```
  </Tab>
</Tabs>

## What's next?

<CardGroup cols={3}>
  <Card title="Chat Completions" icon="message-square" href="/docs/api-reference/chat-completions">
    Full reference for all completion modes — streaming, structured outputs, function calling.
  </Card>

  <Card title="Models" icon="layers" href="/docs/concepts/models">
    Browse available models, context windows, and pricing.
  </Card>

  <Card title="Pricing" icon="indian-rupee-sign" href="/docs/concepts/pricing">
    INR pricing, credits system, and plans — frontier models at 30% lower cost.
  </Card>
</CardGroup>
