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

# Quick Start

> Get your first repair working in 5 minutes

# Quick Start

Get Shim running in 5 minutes. No signup required for the demo.

***

## Step 1: Get an API Key

<Steps>
  <Step title="Sign up">
    Visit [console.shim.so/signup](https://console.shim.so/signup) and create a free account.
  </Step>

  <Step title="Generate API key">
    Navigate to Console -> API Keys -> Create Your First Key
  </Step>

  <Step title="Copy your key">
    Format: `sk_live_xxxxx` (keep this secret)
  </Step>
</Steps>

***

## Step 2: Make Your First Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.shim.so/v1/repair \
    -H "Authorization: Bearer sk_live_xxxxx" \
    -H "Content-Type: application/json" \
    -d '{
      "raw_output": "{\"name\": \"John\", \"age\": \"30\""
    }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch('https://api.shim.so/v1/repair', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer sk_live_xxxxx',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      raw_output: '{"name": "John", "age": "30"'
    })
  });

  const result = await response.json();
  console.log(result.repaired); // { name: "John", age: 30 }
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.shim.so/v1/repair',
      headers={'Authorization': 'Bearer sk_live_xxxxx'},
      json={'raw_output': '{"name": "John", "age": "30"'}
  )

  result = response.json()
  print(result['repaired'])  # {'name': 'John', 'age': 30}
  ```
</CodeGroup>

***

## Step 3: Understand the Response

```json theme={null}
{
  "success": true,
  "repaired": {
    "name": "John",
    "age": 30
  },
  "metadata": {
    "confidence": "medium",
    "was_repaired": true,
    "output_valid_json": true,
    "syntax_repairs": [
      {
        "type": "closed_object_bracket",
        "confidence": "high",
        "safe": true
      }
    ],
    "schema_repairs": [
      {
        "type": "type_coercion",
        "confidence": "high",
        "safe": true,
        "field": "age",
        "original_value": "30",
        "repaired_value": 30
      }
    ],
    "warnings": [],
    "errors": []
  }
}
```

### Key Fields

* **`success`**: `true` if repair succeeded, `false` if unrecoverable
* **`repaired`**: The fixed JSON object (or `null` if failed)
* **`metadata.confidence`**: `high`, `medium`, or `low`
* **`metadata.syntax_repairs`**: Structural fixes (brackets, commas)
* **`metadata.schema_repairs`**: Type coercion, field validation
* **`metadata.warnings`**: Non-critical issues (review these)
* **`metadata.errors`**: Critical failures (repair failed)

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Streaming Repair" icon="stream" href="/guides/streaming-repair">
    Repair JSON token-by-token (no buffering)
  </Card>

  <Card title="Schema Validation" icon="check-circle" href="/guides/schema-validation">
    Add type checking and field validation
  </Card>

  <Card title="Error Handling" icon="exclamation-triangle" href="/guides/handling-errors">
    Handle failures gracefully
  </Card>

  <Card title="Rate Limits" icon="gauge" href="/guides/rate-limits">
    Understand tier limits and overage
  </Card>
</CardGroup>
