Skip to main content

Batch Create Mems

You can also create batches of mems. Creating mems in a batch is a single API request, so it is a good option for building bulk-processing-tools such as importers.

First, you'll need to aquire an API Access Token. You can get one via our new API Flow within the Mem app. After you've got that, you'll be able to make authorized requests to the API.

Using the Mem Node.js client: @mem-labs/mem-node

Set up the client
import { MemClient } from "@mem-labs/mem-node";
const memClient = new MemClient({
apiAccessToken: "<Replace this with your access token>"
});
Create a batch of mems
memClient.batchCreateMems([
{
content: "Hello there! I am a new mem."
},
{
content: "I am another new mem!"
},
]);

Parameters#

The input parameters for batch creation are identical to the single Create Mem parameters. (The only difference being that the batch API expects an array of inputs, rather than a single input.)

Usage Limits#

  • We limit users to creating 100 mems in a single batch.