# Quickstart

In this guide, you will create an API key and send your first piece of text to the API. There are three steps, and they should take about two minutes.

[Watch the whole flow in 2:20: signing up, creating a key, trying the Playground, making your first call and reading the findings.](https://media.getellora.com/platform/deslop-api-workflow-v1.mp4)

## Creating an Account and a Key

First, [sign up](https://platform.getellora.com/signup) for an account. You get $5 of free credit, and no card is needed. Once you are signed in, open [API keys](https://platform.getellora.com/keys) in the console and choose **Create key**. Copy the key right away, since it is shown once.

You may wish to store the key in an environment variable so that it stays out of your code.

```bash
export ELLORA_API_KEY="elk_live_..."
```

## Sending Text

Next, call the API with the text you would like to check. The examples below show how to do this using curl, Python, and JavaScript.

**curl**

```bash
curl https://platform-api.getellora.com/v1/detect \
  -H "Authorization: Bearer $ELLORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Let'\''s delve into the rich tapestry of modern marketing. It'\''s worth noting that every team must navigate an ever-evolving landscape."}'
```

**Python**

```python
import os
import requests

response = requests.post(
    "https://platform-api.getellora.com/v1/detect",
    headers={"Authorization": f"Bearer {os.environ['ELLORA_API_KEY']}"},
    json={"text": "Let's delve into the rich tapestry of modern marketing. It's worth noting that every team must navigate an ever-evolving landscape."},
    timeout=10,
)
response.raise_for_status()
result = response.json()

print(result["findings_count"])
for finding in result["findings"]:
    print(finding["severity"], finding["rule_id"], "-", finding["suggestion"])
```

**JavaScript**

```javascript
const response = await fetch("https://platform-api.getellora.com/v1/detect", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.ELLORA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ text: "Let's delve into the rich tapestry of modern marketing. It's worth noting that every team must navigate an ever-evolving landscape." }),
});

if (!response.ok) throw new Error(`Ellora ${response.status}: ${await response.text()}`);
const result = await response.json();

console.log(result.findings_count);
for (const finding of result.findings) {
  console.log(finding.severity, finding.rule_id, "-", finding.suggestion);
}
```

## Reading the Findings

Each finding names the rule that matched, the sentence, the matching excerpt, why it reads as machine-written, and a suggestion. The response also includes a `findings_count` object, which counts the findings by severity.

The API gives no verdict. If you want a pass or fail rule, you may build it from `findings_count`, for example `findings_count.red === 0`. Yellow findings need a judgment call, and blue findings are optional polish.

```json
{
  "id": "req_01jc8m3y6q0v7k2h9d4x5n8r1t",
  "words_count": 20,
  "characters_count": 131,
  "cost": 0.002,
  "findings_count": {
    "total": 8,
    "red": 5,
    "yellow": 0,
    "blue": 3
  },
  "findings": [
    {
      "id": "01m6ya0a1b2c3d4e5f6g7h8j9k",
      "rule_id": "ai.delve",
      "category": "ai",
      "severity": "red",
      "scope": "sentence",
      "sentence": 1,
      "excerpt": "Let's delve into the rich tapestry of modern marketing.",
      "reason": "A stock phrase can flatten the writer's meaning.",
      "suggestion": "use a specific verb: dig, explore, look at"
    }
  ],
  "stored": true
}
```

The example above is trimmed to the first of its eight findings. The `cost` field is what this call cost, in US dollars, as a number. Remember, the response has no score and never contains rewritten text.

## Next Steps

Now that you have made your first call, you may want to read about [authentication](https://docs.getellora.com/platform/authentication/) and key handling. The [API reference](https://docs.getellora.com/platform/api/) describes every field of the request and response, and the [errors page](https://docs.getellora.com/platform/errors/) explains what to do about each error. The guides cover what to send, how to act on findings, and what to do when a call fails.

Source: https://docs.getellora.com/platform/quickstart/
