Mixedbread Ts banner
mixedbread-ai mixedbread-ai

Mixedbread Ts

Development community

Description

[![NPM version](<https://img.shields.io/npm/v/@mixedbread/sdk.svg?label=npm%20(stable)>)](https://npmjs.org/package/@mixedbread/sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@mixe

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Mixedbread API TypeScript SDK API Library

[![NPM version]()](https://npmjs.org/package/@mixedbread/sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@mixedbread/sdk)

This library provides convenient access to the Mixedbread REST API from server-side TypeScript or JavaScript.

The REST API documentation can be found on [mixedbread.com](https://mixedbread.com/docs). The full API of this library can be found in [api.md](api.md).

It is generated with [Stainless](https://www.stainless.com/).

Installation

npm install @mixedbread/sdk

Usage

The full API of this library can be found in [api.md](api.md).

import Mixedbread from '@mixedbread/sdk';

const client = new Mixedbread({
  apiKey: process.env['MXBAI_API_KEY'], // This is the default and can be omitted
  environment: 'development', // or 'production' | 'local'; defaults to 'production'
});

const store = await client.stores.create();

console.log(store.id);

Request & Response types

This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:

import Mixedbread from '@mixedbread/sdk';

const client = new Mixedbread({
  apiKey: process.env['MXBAI_API_KEY'], // This is the default and can be omitted
  environment: 'development', // or 'production' | 'local'; defaults to 'production'
});

const store: Mixedbread.Store = await client.stores.create();

Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.

File uploads

Request parameters that correspond to file uploads can be passed in many different forms:

  • File (or an object with the same structure)
  • a fetch Response (or an object with the same structure)
  • an fs.ReadStream
  • the return value of our toFile helper