MVFM

anthropic/create_message_batch

Create a batch of message requests for async processing

const app = mvfm(prelude, console_, anthropic_);
const prog = app({}, ($) => {
  const batch = $.anthropic.messages.batches.create({
    requests: [{
      custom_id: "req-001",
      params: {
        model: "claude-sonnet-4-20250514",
        max_tokens: 64,
        messages: [{ role: "user", content: "Hello" }],
      },
    }],
  });
  return $.console.log(batch);
});
await fold(defaults(app, { anthropic: crystalBallAnthropicInterpreter }), prog);
Ctrl+Enter