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

# Get your API credentials

To start integrating Reverie’s APIs into your application, you'll need two credentials:

* **REV-API-KEY**: Your unique API key for authentication
* **REV-APP-ID**: Identifies your registered application

These are required in the header of every request made to our APIs.

### Steps to Generate Your API Key

1. **Sign Up** : Visit [RevUp Developer Portal](https://revup.reverieinc.com?utm_source=documentation\&utm_medium=website\&utm_campaign=revup_signup) and create a free developer account.

2. **Automatic API Key Generation** : As soon as you register, your **first API Key** and **App ID** are automatically created — no extra steps required.

3. **Access Credentials** : Your APP ID and API Key will be visible in the dashboard for use in your integrations.

<img src="https://mintcdn.com/reverielanguagetechnologies-3de407b0/U3lRm5Bc3fScvdaW/images/revDash.svg?fit=max&auto=format&n=U3lRm5Bc3fScvdaW&q=85&s=7ab89f4dd5cc49a827eb488c36b07272" alt="Reverie Dashboard" width="50%" data-path="images/revDash.svg" />

### How to Use the Credentials

To authenticate your requests, include the REV-APP-ID & REV-API-KEY in the headers of your HTTP requests.

```yml theme={null}
REV-API-KEY: <YOUR-API-KEY>
REV-APP-ID: <YOUR-APP-ID>
```

### Test your first API call

Here are the cURL requests of all the APIs.

<CodeGroup>
  ```bash Speech-to-Text (File) theme={null}
  curl --location --request POST 'https://revapi.reverieinc.com/upload' \
  --header 'src_lang: hi' \
  --header 'domain: generic' \
  --header 'REV-API-KEY: <YOUR API KEY>' \
  --header 'REV-APPNAME: stt_file' \
  --header 'REV-APP-ID: <YOUR API-ID>' \
  --header 'subtitles: true' \
  --form 'file=@"<File Path>"'
  ```

  ```bash Text-to-Speech theme={null}
  curl --location --request POST 'https://revapi.reverieinc.com/' \
  --header 'REV-API-KEY: <YOUR API KEY>' \
  --header 'REV-APP-ID: <YOUR APP-ID>' \
  --header 'REV-APPNAME: tts' \
  --header 'speaker: hi_female' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  	"text": "किसान होंगे आत्मनिर्भर, समृद्ध भारत"
  }'
  ```

  ```bash Translation theme={null}
  curl --location --request POST 'https://revapi.reverieinc.com/' \
  --header 'Content-Type: application/json' \
  --header 'REV-API-KEY: <YOUR API KEY>' \
  --header 'REV-APP-ID: <YOUR APP-ID>' \
  --header 'src_lang: en' \
  --header 'tgt_lang: hi' \
  --header 'domain: generic' \
  --header 'REV-APPNAME: localization' \
  --header 'REV-APPVERSION: 3.0' \
  --data '{
      "data": [
          "Reverie Language Technologies was established in 2009.",
          "The company head office is located in Bengaluru."
      ],
     "nmtMask": true,
      "nmtMaskTerms": {
          "Reverie Language Technologies":"Reverie Language Technologies"
      },
      "enableNmt": true,
      "enableLookup": true
  }'
  ```

  ```bash Transliteration theme={null}
  curl --location --request POST 'https://revapi.reverieinc.com/' \
  --header 'Content-Type: application/json' \
  --header 'REV-API-KEY: <YOUR API-KEY>' \
  --header 'REV-APP-ID: <YOUR APP-ID>' \
  --header 'src_lang: en' \
  --header 'tgt_lang: hi' \
  --header 'domain: 1' \
  --header 'cnt_lang: en' \
  --header 'REV-APPNAME: transliteration' \
  --data-raw '{"data": ["Reverie Language Technologies ltd website address is www.reverieinc.com"],
  "isBulk" :false,
  "ignoreTaggedEntities" : false
  }'
  ```

  ```bash OCR theme={null}
  curl -X POST https://revapi.reverieinc.com/process_doc \
    --header 'REV-API-KEY: YOUR-API-KEY' \
    --header 'REV-APP-ID: YOUR-APPID' \
    --header 'REV-APPNAME: ocr' \
    -F "file=@document.pdf" \
    -F "file_type=pdf" \
    -F "languages=en,hi" \
    -F "ocr_type=layout_ocr"
  ```

  ```bash Document Localization theme={null}
  curl --location 'https://revapi.reverieinc.com/translate_doc_import' \
    --header 'REV-APP-ID: YOUR_APP_ID' \
    --header 'REV-APPNAME: nmt' \
    --header 'REV-API-KEY: YOUR_API_KEY' \
    --form sourceLanguage="english" \
    --form targetLanguage="hindi" \
    --form projectFiles=@"/path/to/your/file/Movie.txt"
  ```

  ```bash Text Analysis theme={null}
  curl --location 'http://revapi.reverieinc.com/api/v2/text-analyse?translate=false&summary=false&sentiment=true&detect_entities=true&content_safety=true&pii_redaction=true' \
  --header 'Content-Type: application/json' \
  --header 'REV-API-KEY: <YOUR_REV_API_KEY>' \
  --header 'REV-APP-ID: <YOUR_REV_APP_ID>' \
  --header 'REV-APPNAME: text-analysis' \
  --data-raw '{
    "text": "Today is a special day. I sent you an email earlier and shared my website link. Please use #ForBetterReach and feel free to contact me around 10 AM.",
    "language": "en",
    "translation": {
      "target_language": "en",
      "translation_domain": "generic"
    },
    "pii_redaction": {
      "redact_pii_sub": "entity_name",
      "redact_pii_types": []
    },
    "summary": {
      "summary_model": "gemma2:2b",
      "summary_type": "headline"
    },
    "entity_recognition": {
      "entity_types": []
    },
    "sentiment": {
      "level": "whole"
    },
    "content_moderation": {
      "moderation_types": [
        "hate_speech",
        "profanity"
      ]
    }
  }'
  ```
</CodeGroup>

### Best Practices for API Key Management

1. **Secure Storage**: Store API keys in secure environments like encrypted storage or secrets management tools (e.g., AWS Secrets Manager or Azure Key Vault) to avoid exposure in source code or version control systems.

2. **Limit Key Permissions**: Use the principle of least privilege by restricting the permissions associated with the API key. Only allow access to the specific API endpoints and actions required, reducing potential security risks

3. **Monitor Usage and Set Limits**: Continuously monitor API key usage for abnormal activity and implement rate limits to prevent abuse or overuse, ensuring better security and performance.
