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

# Quickstart

> Get started with Cred Protocol API in under 5 minutes

## Prerequisites

Before you begin, you'll need:

* A Cred Protocol account ([sign up here](https://app.credprotocol.com))
* An API key from your [Dashboard](https://app.credprotocol.com/dashboard)

## Get Your API Key

<Steps>
  <Step title="Log in to Dashboard">
    Go to [app.credprotocol.com](https://app.credprotocol.com) and log in to your account.
  </Step>

  <Step title="Navigate to API Keys">
    Click on **API Keys** in the sidebar to access your API key management.
  </Step>

  <Step title="Create a New Key">
    Click **Create API Key**, give it a name, and copy your new API key.

    <Warning>
      Store your API key securely. You won't be able to see it again after creation.
    </Warning>
  </Step>
</Steps>

## Make Your First Request

### Get a Credit Score

Use the following request to get a credit score for an Ethereum address:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.credprotocol.com/api/v2/score/address/vitalik.eth" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.credprotocol.com/api/v2/score/address/vitalik.eth', {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

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

  response = requests.get(
      'https://api.credprotocol.com/api/v2/score/address/vitalik.eth',
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )

  data = response.json()
  print(data)
  ```
</CodeGroup>

### Example Response

```json theme={null}
{
  "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "score": 847,
  "decile": 7,
  "range": "very_good",
  "model_version": "andromeda_1.0",
  "timestamp": "2024-01-15T10:30:00Z"
}
```

## Or Use an SDK

If you're gating access to a product rather than pulling raw scores, the SDKs wrap the trust-evaluation API (`/v1/evaluate`) — one call returns a 0–100 trust score, a tier, and pass/fail against a policy template. Framework middleware for Express, Hono, Next.js and FastAPI turns that into a one-line guard.

<CodeGroup>
  ```typescript TypeScript theme={null}
  // npm install @cred-protocol/sdk
  import { CredClient } from '@cred-protocol/sdk'

  const cred = new CredClient({ apiKey: process.env.CRED_API_KEY })
  const result = await cred.evaluate({
    walletAddress: 'vitalik.eth',
    policy: 'standard',
  })
  console.log(result.trustScore, result.trustTier, result.allPassed)
  ```

  ```python Python theme={null}
  # pip install cred-protocol
  from cred_protocol import CredClient

  async with CredClient(api_key="cred_sk_...") as cred:
      result = await cred.evaluate(wallet_address="vitalik.eth", policy="standard")
      print(result.trust_score, result.trust_tier, result.all_passed)
  ```
</CodeGroup>

See the [SDK overview](/sdks/overview) for the adapters and policy templates.

## Understanding the Response

| Field           | Description                                          |
| --------------- | ---------------------------------------------------- |
| `address`       | The resolved Ethereum address                        |
| `score`         | Credit score between 300-1000                        |
| `decile`        | Score decile (1-10)                                  |
| `range`         | Score range (low, fair, good, very\_good, excellent) |
| `model_version` | Scoring model version (currently "andromeda\_1.0")   |
| `timestamp`     | When the score was calculated                        |

## Test with Sandbox

Before integrating with production data, use our sandbox endpoints to test your integration:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.credprotocol.com/api/v2/sandbox/score/address/0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab17" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.credprotocol.com/api/v2/sandbox/score/address/0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab17',
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const data = await response.json();
  ```

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

  response = requests.get(
      'https://api.credprotocol.com/api/v2/sandbox/score/address/0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab17',
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )
  ```
</CodeGroup>

<Info>
  Sandbox endpoints return deterministic mock data and don't count against your API quota.
</Info>

## Next Steps

<CardGroup cols={2}>
  <Card title="Credit Reports" icon="file-lines" href="/api-reference/report/get-report">
    Generate comprehensive credit reports
  </Card>

  <Card title="Identity Verification" icon="fingerprint" href="/api-reference/identity/get-identity">
    Verify on-chain identity attestations
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/guides/error-handling">
    Learn how to handle API errors
  </Card>

  <Card title="Authentication" icon="key" href="/guides/authentication">
    Deep dive into API authentication
  </Card>

  <Card title="SDKs" icon="cube" href="/sdks/overview">
    TypeScript, Python, and framework middleware
  </Card>

  <Card title="Machine Payments" icon="robot" href="/guides/payments">
    Pay per request with x402 or MPP — no account needed
  </Card>
</CardGroup>
