# Anthropic

Ask Claude for text or JSON, with images, PDFs, uploaded files, web search and web fetch; count tokens; manage files; and send message batches at half the price.

## Connect Anthropic

1. In the sidebar, open **Connections** and press **Add connection**.
2. Type `anthropic` and choose **Anthropic**.
3. Fill in the fields. Each one says **Required** or **Optional**.
4. Press **Test and save**. GoRunner checks the connection before it saves anything.

The sheet asks for:

- **API Key · Required**: Your Anthropic API key (sk-ant-…).

Paste an Anthropic API key (platform.claude.com → Settings → API keys → Create key). The key’s workspace decides the rate limits and who is billed.

[Connections](https://docs.gorunner.io/build/connections) says how to sign in again, rename or delete it. In a product that embeds GoRunner, **Add connection** can be missing: then [your provider makes connections](https://docs.gorunner.io/embed/customer-connections) for you.

## Do things in Anthropic

Add an **Anthropic** step, choose a **Resource**, then an **Operation**. Choose a row to see its fields.

- [Text](https://docs.gorunner.io/apps/anthropic#fields-f-text): Message a Model · Count Tokens
- [Image](https://docs.gorunner.io/apps/anthropic#fields-f-image): Analyze Image
- [Document](https://docs.gorunner.io/apps/anthropic#fields-f-document): Analyze Document
- [File](https://docs.gorunner.io/apps/anthropic#fields-f-file): Upload File · Get File Metadata · List Files · Delete File
- [Message Batch](https://docs.gorunner.io/apps/anthropic#fields-f-batch): Create · Get · List · Cancel · Get Results
- [Model](https://docs.gorunner.io/apps/anthropic#fields-f-model): List Models

To start a workflow from Anthropic, use a [Schedule](https://docs.gorunner.io/apps/schedule), [Webhook](https://docs.gorunner.io/apps/webhook) or [Form](https://docs.gorunner.io/apps/form) trigger.

Later steps read a step’s output by its name: see [Use data from earlier steps](https://docs.gorunner.io/build/use-data-from-earlier-steps).

## Limits

- A reply from Anthropic can be up to 16 MB (a file download can have its own limit). A larger one fails the step; it is never cut short.
- When Anthropic says to slow down (429), the step waits as long as it asks, if the step’s time allows. Otherwise it fails and says when to try again.

Not in your list? See [When an app isn’t here](https://docs.gorunner.io/apps/when-an-app-isnt-here#q-not-in-list).

## For developers

In the API, which calls apps pieces, Anthropic is `pieceId: "anthropic"` with `actionId: "anthropic"`, set by `resource` and an `operation_…` field, such as `operation_batch`. [Get an app](https://docs.gorunner.io/api/apps/get-app) returns every field.

It can change something outside the run (`writes_external`). See [How versions and side effects work](https://docs.gorunner.io/apps#q-versions).

### Anthropic › Text

### Message a Model

- **Model · Optional**: The Claude model that answers. Default: claude-opus-5-5.
- **System Prompt · Optional**: Optional. How Claude should behave: its role, tone, rules.
- **Earlier Messages · Optional**: Optional. The conversation so far, oldest first, such as [{"role": "user", "content": "Hi"}, {"role": "assistant", "content": "Hello!"}]. The prompt follows it.
- **Prompt · Required**: What to ask or tell Claude.
- **Files · Optional**: Attach one file per row, or switch the field to an expression to pass a whole list from an earlier step (such as {{steps.unzip.files}}). Optional. Images (JPEG, PNG, GIF, WEBP), PDFs and text files Claude reads with the prompt.
- **Uploaded Files · Optional**: Optional. Ids of files uploaded with File → Upload (file_…), comma separated: images, PDFs or text.
- **Web Search · Optional**: Let Claude search the web and cite what it finds (billed per search). Off by default.
- **Web Fetch · Optional**: Let Claude read web pages whose links are in the prompt or in search results. Off by default.
- **Most Searches or Fetches · Optional**: Optional. The most times Claude may search or fetch in this answer. Shows when **Web Search** is on.
- **Output Format · Optional**: Text, or JSON a later step can read field by field (parsed under json). Options: Text, JSON matching a schema. Default: Text.
- **JSON Schema · Required**: The shape of the answer, as JSON Schema, such as {"type":"object","properties":{"summary":{"type":"string"}},"required":["summary"],"additionalProperties":false}. Every object needs "additionalProperties": false. Shows when **Output Format** is **JSON matching a schema**.
- **Max Tokens · Optional**: The most tokens the answer may use, thinking included; past it the answer stops. Default: 16000.
- **Effort · Optional**: How thoroughly Claude works: lower is faster and cheaper. Not every model takes every level. Options: Model default, Low, Medium, High, Extra high, Max. Default: Model default.

### Count Tokens

- **Model · Optional**: The Claude model that answers. Default: claude-opus-5-5.
- **System Prompt · Optional**: Optional. How Claude should behave: its role, tone, rules.
- **Earlier Messages · Optional**: Optional. The conversation so far, oldest first, such as [{"role": "user", "content": "Hi"}, {"role": "assistant", "content": "Hello!"}]. The prompt follows it.
- **Prompt · Required**: What to ask or tell Claude.
- **Files · Optional**: Attach one file per row, or switch the field to an expression to pass a whole list from an earlier step (such as {{steps.unzip.files}}). Optional. Images (JPEG, PNG, GIF, WEBP), PDFs and text files Claude reads with the prompt.
- **Uploaded Files · Optional**: Optional. Ids of files uploaded with File → Upload (file_…), comma separated: images, PDFs or text.
- **Web Search · Optional**: Let Claude search the web and cite what it finds (billed per search). Off by default.
- **Web Fetch · Optional**: Let Claude read web pages whose links are in the prompt or in search results. Off by default.
- **Most Searches or Fetches · Optional**: Optional. The most times Claude may search or fetch in this answer. Shows when **Web Search** is on.

### Anthropic › Image

### Analyze Image

- **Model · Optional**: The Claude model that answers. Default: claude-opus-5-5.
- **Prompt · Optional**: What to ask about the images. Default: Describe this image.
- **Images From · Optional**: Links on the web, files from an earlier step, or files uploaded with File → Upload. Options: Links, Files, Uploaded files. Default: Links.
- **Uploaded Files · Required**: Ids of uploaded files (file_…), comma separated. Shows when **Images From** is **Uploaded files**.
- **Images · Required**: Attach one file per row, or switch the field to an expression to pass a whole list from an earlier step (such as {{steps.unzip.files}}). JPEG, PNG, GIF or WEBP, up to 10 MB each. Shows when **Images From** is **Files**.
- **Image URLs · Required**: One or more public https links to images, comma or line separated. Shows when **Images From** is **Links**.
- **Output Format · Optional**: Text, or JSON a later step can read field by field (parsed under json). Options: Text, JSON matching a schema. Default: Text.
- **JSON Schema · Required**: The shape of the answer, as JSON Schema, such as {"type":"object","properties":{"summary":{"type":"string"}},"required":["summary"],"additionalProperties":false}. Every object needs "additionalProperties": false. Shows when **Output Format** is **JSON matching a schema**.
- **Max Tokens · Optional**: The most tokens the answer may use, thinking included; past it the answer stops. Default: 16000.
- **Effort · Optional**: How thoroughly Claude works: lower is faster and cheaper. Not every model takes every level. Options: Model default, Low, Medium, High, Extra high, Max. Default: Model default.

### Anthropic › Document

### Analyze Document

- **Model · Optional**: The Claude model that answers. Default: claude-opus-5-5.
- **Prompt · Optional**: What to ask about the documents. Default: Summarize this document.
- **Documents From · Optional**: Links on the web, files from an earlier step, or files uploaded with File → Upload. Options: Links, Files, Uploaded files. Default: Links.
- **Uploaded Files · Required**: Ids of uploaded files (file_…), comma separated. Shows when **Documents From** is **Uploaded files**.
- **Documents · Required**: Attach one file per row, or switch the field to an expression to pass a whole list from an earlier step (such as {{steps.unzip.files}}). PDFs (up to 600 pages) or text files. Shows when **Documents From** is **Files**.
- **Document URLs · Required**: One or more public https links to documents, comma or line separated. Shows when **Documents From** is **Links**.
- **Citations · Optional**: Have Claude point at the passages its answer rests on (not with JSON output). Off by default.
- **Output Format · Optional**: Text, or JSON a later step can read field by field (parsed under json). Options: Text, JSON matching a schema. Default: Text.
- **JSON Schema · Required**: The shape of the answer, as JSON Schema, such as {"type":"object","properties":{"summary":{"type":"string"}},"required":["summary"],"additionalProperties":false}. Every object needs "additionalProperties": false. Shows when **Output Format** is **JSON matching a schema**.
- **Max Tokens · Optional**: The most tokens the answer may use, thinking included; past it the answer stops. Default: 16000.
- **Effort · Optional**: How thoroughly Claude works: lower is faster and cheaper. Not every model takes every level. Options: Model default, Low, Medium, High, Extra high, Max. Default: Model default.

### Anthropic › File

### Upload File

- **File · Required**: Upload a file, or switch to an expression to use one from an earlier step (such as {{steps.download.result}}). PDF, text or image, up to 500 MB.
- **Delete After (days) · Optional**: Optional. Anthropic deletes the file this many days after the upload (1–90). Empty keeps it until deleted.

### Get File Metadata and Delete File

- **File ID · Required**: The file's id (file_…), as Upload File or List Files returns it.

### List Files

- **Return All · Optional**: Read every file, page by page (at most 5000; past that the step fails rather than stop early). Off by default.
- **Limit · Optional**: How many files to return (1–5000). Default: 50. Shows when **Return All** is off.

### Anthropic › Message Batch

### Create

- **Requests · Required**: The messages to send, such as [{"custom_id": "row-1", "params": {"model": "claude-opus-5-5", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hi"}]}}]. Each custom_id is unique (letters, digits, _ and -, up to 64); params are a Message a Model request.

### Get, Cancel and Get Results

- **Batch ID · Required**: The batch's id (msgbatch_…), as Create returns it.

### List

- **Return All · Optional**: Read every batch, page by page (at most 5000; past that the step fails rather than stop early). Off by default.
- **Limit · Optional**: How many batchs to return (1–5000). Default: 50. Shows when **Return All** is off.

### Anthropic › Model

### List Models

Nothing to fill in.

Source: https://docs.gorunner.io/apps/anthropic
