Example: Publishing and Enqueueing Requests
Specify theapi
as llm
with the provider set to anthropic()
when publishing requests. Use the Upstash-Callback
header to handle responses asynchronously, as streaming completions aren’t supported for this integration.
Publishing a Request
Enqueueing a Chat Completion Request
UseenqueueJSON
with Anthropic as the provider to enqueue requests for asynchronous processing.
Sending Chat Completion Requests in Batches
UsebatchJSON
to send multiple requests at once. Each request in the batch specifies the same Anthropic provider and includes a callback URL.
Analytics with Helicone
To monitor usage, include Helicone analytics by passing your Helicone API key underanalytics
: