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

# Quickstart

> First API call in 3 minutes. Classify Arabic comments with a single request  -  no credit card required.

# First API call in 3 minutes

Get up and running with the NAWA classification API in three steps.

<Steps>
  <Step title="Get your API key">
    Go to [trynawa.com/developers/keys](https://trynawa.com/developers/keys) to create your free API key. Sign in with Google or email  -  no credit card required.

    <Note>
      Free keys (`nawa_test_sk_xxx`) require no credit card. Limited to 100 lifetime requests and 14-day expiry. They use real AI models  -  same accuracy as paid keys.
    </Note>
  </Step>

  <Step title="Make your first classification">
    Send an Arabic comment to the `/v1/classify` endpoint:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.trynawa.com/v1/classify \
        -H "Authorization: Bearer nawa_test_sk_xxx" \
        -H "Content-Type: application/json" \
        -d '{
          "text": "متى الجزء الثاني؟",
          "platform": "youtube"
        }'
      ```

      ```typescript TypeScript theme={null}
      import { Nawa } from '@nawalabs/sdk'

      const nawa = new Nawa({ apiKey: 'nawa_test_sk_xxx' })

      const { data, error } = await nawa.classify({
        text: 'متى الجزء الثاني؟',
        platform: 'youtube'
      })

      if (error) {
        console.error(error.code, error.message)
      } else {
        console.log(data)
      }
      ```

      ```python Python theme={null}
      from nawa import Nawa

      nawa = Nawa(api_key="nawa_test_sk_xxx")

      result = nawa.classify(
          text="متى الجزء الثاني؟",
          platform="youtube"
      )

      if result.error:
          print(result.error.code, result.error.message)
      else:
          print(result.data)
      ```
    </CodeGroup>
  </Step>

  <Step title="Read the response">
    Every NAWA response follows a consistent envelope format:

    ```json theme={null}
    {
      "success": true,
      "result": {
        "text": "متى الجزء الثاني؟",
        "intent": "question",
        "intent_confidence": 0.97,
        "sentiment": "neutral",
        "sentiment_confidence": 0.91,
        "dialect": "gulf",
        "dialect_confidence": 0.95,
        "toxicity": "none",
        "toxicity_confidence": 0.99,
        "categories": ["engagement"],
        "language": "ar",
        "model": "nagl-v1",
        "cached": false
      },
      "errors": [],
      "request_id": "req_abc123def456"
    }
    ```

    **Response fields:**

    | Field                | Type    | Description                                                              |
    | -------------------- | ------- | ------------------------------------------------------------------------ |
    | `intent`             | string  | One of: `question`, `complaint`, `praise`, `suggestion`, `spam`, `other` |
    | `intent_confidence`  | number  | Confidence score between 0 and 1                                         |
    | `sentiment`          | string  | One of: `positive`, `negative`, `neutral`, `mixed`                       |
    | `dialect`            | string  | One of: `gulf`, `egyptian`, `levantine`, `msa`                           |
    | `dialect_confidence` | number  | Confidence score between 0 and 1                                         |
    | `toxicity`           | string  | One of: `none`, `mild`, `moderate`, `severe`                             |
    | `categories`         | array   | Content categories: `engagement`, `support`, `feedback`, `spam`          |
    | `cached`             | boolean | `true` if served from semantic cache (no cost)                           |
  </Step>
</Steps>

## What's next?

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Learn about API keys, free vs paid tiers, and key rotation.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/classify">
    Explore all endpoints, parameters, and response schemas.
  </Card>

  <Card title="Dialect Detection" icon="language" href="/guides/arabic-dialect-detection">
    Deep dive into Gulf, Egyptian, Levantine, and MSA classification.
  </Card>

  <Card title="SDKs" icon="box" href="/sdks/typescript">
    Install the TypeScript or Python SDK for a better developer experience.
  </Card>
</CardGroup>
