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

# Client SDKs

> Generate type-safe API clients in your preferred language

## Official SDK

The Centure Node.js SDK provides type-safe TypeScript support with built-in request/response validation.

```bash theme={null}
npm install @centure/node-sdk
```

<Tip>
  Use the official Node.js SDK for TypeScript and JavaScript projects to get automatic type inference and validation.
</Tip>

## Generate Your Own Client

The Centure API follows the OpenAPI 3.0 specification. Generate a client in any language using the OpenAPI spec:

```
https://api.centure.ai/openapi.json
```

### Common Generators

<Tabs>
  <Tab title="Node.js/TypeScript">
    **openapi-typescript-codegen**

    ```bash theme={null}
    npx openapi-typescript-codegen --input https://api.centure.ai/openapi.json --output ./src/centure-client
    ```

    **openapi-generator-cli**

    ```bash theme={null}
    npx @openapitools/openapi-generator-cli generate \
      -i https://api.centure.ai/openapi.json \
      -g typescript-fetch \
      -o ./src/centure-client
    ```
  </Tab>

  <Tab title="Python">
    **openapi-python-client**

    ```bash theme={null}
    openapi-python-client generate --url https://api.centure.ai/openapi.json
    ```

    **openapi-generator**

    ```bash theme={null}
    openapi-generator generate \
      -i https://api.centure.ai/openapi.json \
      -g python \
      -o ./centure-client
    ```
  </Tab>

  <Tab title="Go">
    **oapi-codegen**

    ```bash theme={null}
    # Install oapi-codegen
    go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest

    # Generate client
    oapi-codegen -package centure https://api.centure.ai/openapi.json > centure/client.go
    ```

    **openapi-generator**

    ```bash theme={null}
    openapi-generator generate \
      -i https://api.centure.ai/openapi.json \
      -g go \
      -o ./centure-client
    ```
  </Tab>

  <Tab title="Java/Kotlin">
    **Java**

    ```bash theme={null}
    openapi-generator generate \
      -i https://api.centure.ai/openapi.json \
      -g java \
      -o ./centure-client
    ```

    **Kotlin**

    ```bash theme={null}
    openapi-generator generate \
      -i https://api.centure.ai/openapi.json \
      -g kotlin \
      -o ./centure-client
    ```
  </Tab>

  <Tab title="Ruby">
    ```bash theme={null}
    openapi-generator generate \
      -i https://api.centure.ai/openapi.json \
      -g ruby \
      -o ./centure-client
    ```
  </Tab>

  <Tab title="PHP">
    ```bash theme={null}
    openapi-generator generate \
      -i https://api.centure.ai/openapi.json \
      -g php \
      -o ./centure-client
    ```
  </Tab>

  <Tab title="C#">
    ```bash theme={null}
    openapi-generator generate \
      -i https://api.centure.ai/openapi.json \
      -g csharp \
      -o ./centure-client
    ```
  </Tab>

  <Tab title="Rust">
    ```bash theme={null}
    openapi-generator generate \
      -i https://api.centure.ai/openapi.json \
      -g rust \
      -o ./centure-client
    ```
  </Tab>
</Tabs>

## Generator Documentation

<CardGroup cols={2}>
  <Card title="OpenAPI Generator" icon="code" href="https://openapi-generator.tech">
    Supports 50+ languages and frameworks
  </Card>

  <Card title="openapi-typescript-codegen" icon="js" href="https://github.com/ferdikoomen/openapi-typescript-codegen">
    TypeScript-focused generator with type inference
  </Card>

  <Card title="openapi-python-client" icon="python" href="https://github.com/openapi-generators/openapi-python-client">
    Modern Python client with type hints
  </Card>

  <Card title="oapi-codegen" icon="golang" href="https://github.com/oapi-codegen/oapi-codegen">
    Go client generator with native types
  </Card>
</CardGroup>

## Authentication

All generated clients require Bearer token authentication. Configure your client with your API key from the [Centure Dashboard](https://centure.ai/dashboard).

<Note>
  API keys have project-level permissions. Store them in environment variables and never commit them to version control.
</Note>
