> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://humanloop.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://humanloop.com/docs/_mcp/server.

# April

## TypeScript SDK

*April 3rd, 2023*

We now have a fully typed TypeScript SDK to make working with Humanloop even easier.

[https://www.npmjs.com/package/humanloop](https://www.npmjs.com/package/humanloop)

You can use this with your JavaScript, TypeScript or Node projects.

**Installation**

```shell
npm i humanloop
```

**Example usage**

```typescript
import { Humanloop } from "humanloop"

const humanloop = new Humanloop({
  // Defining the base path is optional and defaults to https://api.humanloop.com/v3
  // basePath: "https://api.humanloop.com/v3",
  apiKey: 'API_KEY',
})


const chatResponse = await humanloop.chat({
  "project": "project_example",
  "messages": [
    {
      "role": "user",
      "content": "Write me a song",
    }
  ],
  "provider_api_keys": {
    "openai": OPENAI_API_KEY
  },
  "model_config": {
    "model": "gpt-4",
    "temperature": 1,
  },
})

console.log(chatResponse)
```