Skip to content

Instantly share code, notes, and snippets.

defmodule Anthropic do
@url "https://api.anthropic.com/v1/messages"
def messages(request) do
opts = [
json: request,
headers: headers(),
# Req default timeout is 15s which is
# too little for many AI invocations.
receive_timeout: :timer.minutes(1)