> For the complete documentation index, see [llms.txt](https://docs.durohub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.durohub.com/getting-started/hello-world.md).

# Hello World

Let's make your first API call to Duro. This guide will walk you through a simple query to verify your setup.

## Prerequisites

Before making API calls, ensure you have:

* An API key (see [Authentication](https://docs.durohub.com/getting-started/authentication.md))
* The slugs of your organization and of the library the key was created in (visible in your Duro URL: `durohub.com/org/@your-org/libs/your-library/...`)

## Required Headers

All API requests require these headers:

| Header           | Description                                                                 |
| ---------------- | --------------------------------------------------------------------------- |
| `x-api-key`      | Your API authentication token                                               |
| `x-organization` | The organization of the key's library, by slug (e.g., `@acme-corp`) or UUID |
| `Content-Type`   | Must be `application/json`                                                  |

{% hint style="info" %}
Library-scoped operations (like querying components) also need the `x-library` header, set to the library the key was created in (e.g., `@acme-corp/main-library`). An API key is pinned to that one library. See [Authentication](https://docs.durohub.com/getting-started/authentication.md#using-the-token).
{% endhint %}

## Your First Query

Here's a simple query to list all libraries in your organization:

```graphql
query GetLibraries {
  libraries {
    id
    name
    slug
    description
  }
}
```

### Example Response

```json
{
  "data": {
    "libraries": [
      {
        "id": "fc28b204-0cd0-46b3-96eb-b0720c16c423",
        "name": "Main Library",
        "slug": "main-library",
        "description": "Primary component library"
      }
    ]
  }
}
```

## Complete cURL Example

Here's a complete example using cURL. Using the EU or GovCloud region? Use your region's host — see [Endpoints](https://docs.durohub.com/readme.md#endpoints).

```bash
curl 'https://api.durohub.com/graphql' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'x-organization: @your-org' \
  -H 'Content-Type: application/json' \
  -d '{"query": "query { libraries { id name slug } }"}'
```

## Next Steps

Now that you've verified your API access, learn about working with [Components](https://docs.durohub.com/core-concepts/components.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.durohub.com/getting-started/hello-world.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
