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

# Quickstart

> Get started with the Truedy API in 5 minutes

# Quickstart

Get started with the Truedy API in 5 minutes. This guide will walk you through creating an API key, making your first API call, and creating an agent.

## Prerequisites

* A Truedy account ([Sign up](https://app.truedy.ai))
* An API key (created below)
* cURL, Python, or JavaScript installed

## Step 1: Create an API Key

API keys are created in the **Truedy Dashboard** only. There is no Public API endpoint for creating or managing API keys.

1. Log in to the [Truedy Dashboard](https://app.truedy.ai).
2. Go to **Settings** → **API Keys** (or [open API Keys directly](https://app.truedy.ai/settings/api-keys)).
3. Click **Create API Key**, give it a name (e.g. "My First API Key"), and copy the key.

The key is shown **only once** when created. Store it securely. Keys have the format `truedy_` followed by a random string (e.g. `truedy_Z21gJO4PDlOBbWSWdfSpO72guWIE6KWP`).

Save the API key — you'll need it for all requests in the next steps.

## Step 2: List Your Agents

Let's make your first API call to list your agents:

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.truedy.ai/api/public/v1/agents \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

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

  response = requests.get(
      "https://api.truedy.ai/api/public/v1/agents",
      headers={"Authorization": "Bearer YOUR_API_KEY"}
  )

  agents = response.json()["data"]
  print(f"Found {len(agents)} agents")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.truedy.ai/api/public/v1/agents', {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  const data = await response.json();
  console.log(`Found ${data.data.length} agents`);
  ```
</CodeGroup>

## Step 3: Create an Agent

Now let's create your first voice agent:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.truedy.ai/api/public/v1/agents \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Customer Support Agent",
      "description": "Helps customers with support questions",
      "voice_id": "VOICE_UUID",
      "system_prompt": "You are a helpful customer support agent. Be friendly and professional.",
      "model": "ultravox-v0.6"
    }'
  ```

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

  response = requests.post(
      "https://api.truedy.ai/api/public/v1/agents",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "name": "Customer Support Agent",
          "description": "Helps customers with support questions",
          "voice_id": "VOICE_UUID",
          "system_prompt": "You are a helpful customer support agent. Be friendly and professional.",
          "model": "ultravox-v0.6"
      }
  )

  agent = response.json()["data"]
  print(f"Created agent: {agent['id']}")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.truedy.ai/api/public/v1/agents', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'Customer Support Agent',
      description: 'Helps customers with support questions',
      voice_id: 'VOICE_UUID',
      system_prompt: 'You are a helpful customer support agent. Be friendly and professional.',
      model: 'ultravox-v0.6'
    })
  });

  const data = await response.json();
  console.log('Created agent:', data.data.id);
  ```
</CodeGroup>

## Step 4: Make a Call

Make your first call with the agent:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.truedy.ai/api/public/v1/calls \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "agent_id": "AGENT_UUID",
      "phone_number": "+1234567890",
      "direction": "outbound"
    }'
  ```

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

  response = requests.post(
      "https://api.truedy.ai/api/public/v1/calls",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "agent_id": "AGENT_UUID",
          "phone_number": "+1234567890",
          "direction": "outbound"
      }
  )

  call = response.json()["data"]
  print(f"Call created: {call['id']}")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.truedy.ai/api/public/v1/calls', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      agent_id: 'AGENT_UUID',
      phone_number: '+1234567890',
      direction: 'outbound'
    })
  });

  const data = await response.json();
  console.log('Call created:', data.data.id);
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Explore Endpoints" icon="code">
    Check out the [API Reference](/api-reference) for all available endpoints
  </Card>

  <Card title="Read Guides" icon="book">
    Learn more in our [Guides](/guides) section
  </Card>

  <Card title="Check Rate Limits" icon="gauge">
    Understand [Rate Limits](/guides/rate-limits) and usage tracking
  </Card>

  <Card title="Set Up Webhooks" icon="webhook">
    Configure [Webhooks](/guides/webhooks) for real-time events
  </Card>
</CardGroup>

## Common Issues

### Invalid API Key

Make sure you're using the correct API key and it's in the `Authorization: Bearer <key>` header.

### Rate Limit Exceeded

Check the rate limit headers in the response. You may need to upgrade your plan or wait for the limit to reset.

### Missing Voice ID

Before creating an agent, you need to create or import a voice. See the [Voices API Reference](/api-reference/voices).

## Need Help?

* Check the [API Reference](/api-reference) for detailed endpoint documentation
* Review [Error Responses](/authentication#error-responses) for troubleshooting
* Contact support at [support@truedy.ai](mailto:support@truedy.ai)
