Skip to main content
This is the core endpoint for all AI-powered features — summarization, extraction, analysis, drafting.
Endpoint
Response

Parameters

Required

Optional

Messages

Each message in the messages array:

System prompts

Set the AI’s behavior with a system message:

Multi-turn conversations

Include previous messages to maintain context:

Streaming

Get responses token-by-token as they’re generated:

Vision

Send images to models that support vision (Claude, GPT-4o):
Typescript

Usage and costs

Every response includes token counts and cost:
Response
Reduce costs: Use temperature: 0 for factual extraction. Try cheaper models like deepseek/deepseek-chat or qwen/qwen-2.5-72b-instruct for simpler tasks.

Common patterns

Deposition summary

Contract clause extraction

Medical record review