> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.athenaintel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.athenaintel.com/_mcp/server.

# Read one or more assets with anchors, formats, and pagination

POST https://api.athenaintel.com/api/v0/tools/asset/read
Content-Type: application/json

Read one or more assets with citation-style anchors, output format selection (text/json/image), and pagination. Each result discloses the asset type's read capabilities and returns a structured teaching error when a read fails. Mirrors the agent's read_asset tool.

Reference: https://docs.athenaintel.com/api-reference/tools/read-asset

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects an AssetReadRequestIn.

- `asset_ids` (list of string, required) — 1-10 asset identifiers to read. Each id may carry inline read options using citation-style query syntax, e.g. 'asset_xxx?anchor=page&page=3&format=image'. Versioned ('asset_xxx@version') and live ('asset_xxx_providerId') ids are supported.
- `password` (string, optional, nullable) — Optional password for reading password-protected Office files. Applied to every asset in the request.

## Response

### 200

Successful Response

- `results` (list of AssetReadResult, required) — One result per requested asset, in request order

## Errors

### 401 Unauthorized Error

Unauthorized

- `message` (string, required)

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### AssetReadResult

The result of reading a single asset.

- `asset_id` (string, required) — The asset identifier this result is for
- `content` (string, required) — The asset content. Plain text or a JSON string for structured asset types; base64-encoded image data when format is 'image'. Pagination metadata (truncated/next_offset) is embedded here for windowed reads.
- `format` (string, required) — The format the content was delivered in
- `anchor_guidance` (string, optional, nullable) — Supported/preferred anchors, returned after an unsupported anchor
- `asset` (AssetReadIdentityOut, optional, nullable) — The asset the read resolved to. Set only when the caller passed the asset's permission check: on a successful read, and on a teaching error (bad anchor, unsupported format) returned after that check. Null when the asset was refused or not found.
- `asset_type` (string, optional, nullable) — The resolved asset type, when known
- `error` (AssetReadErrorOut, optional, nullable) — Structured teaching error, populated when is_error is true
- `format_guidance` (string, optional, nullable) — Supported formats, returned after an unsupported format
- `is_error` (boolean, optional, default: false) — True when the read failed; see the error field
- `read_capabilities` (ReadCapabilitiesOut, optional, nullable) — What this asset type supports, for precise follow-up reads
- `structured_content` (map from string to any, optional, nullable) — Structured payload for json-format reads, when available
- `warning` (string, optional, nullable) — Non-fatal notice, e.g. a page/slide clamp on the requested range

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### AssetReadIdentityOut

The asset a read resolved to, after the caller passed its permission check.

- `id` (string, required) — The asset id the permission check authorized
- `title` (string, optional, nullable) — The asset's title
- `type` (string, optional, nullable) — The asset's original type (athena_original_type)
- `workspace_id` (string, optional, nullable) — The workspace that owns the asset

### AssetReadErrorOut

Teaching error explaining why a read failed and how to recover.

- `kind` (string, required) — Machine-readable error category: not_found, out_of_range, invalid_anchor_params, unsupported_anchor, unavailable, transport
- `message` (string, required) — Human-readable description of the failure
- `hint` (string, optional, nullable) — One sentence describing the exact re-query syntax to use
- `retryable` (boolean, optional, default: false) — Whether retrying the identical request could succeed
- `valid_options` (map from string to any, optional, nullable) — Concrete valid values to use instead (e.g. available sheet ids)

### ReadCapabilitiesOut

The read capabilities advertised for an asset type.

- `asset_type` (string, required) — The asset type these capabilities describe
- `default_format` (string, required) — Format used when none is requested
- `formats` (list of string, required) — Output formats this asset type supports
- `anchors` (list of string, optional) — Anchor types accepted for this asset type
- `notes` (string, optional, nullable) — Handler-specific guidance for reading this asset type
- `pagination` (string, optional, nullable) — Pagination protocol: char_offset, cell_offset, page_range, sheet_range, or null when the asset type is not paginated
- `preferred_anchors` (list of string, optional) — Anchor types recommended for precise reads

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Request**

```json
{
  "asset_ids": [
    "asset_9249292-d118-42d3-95b4-00eccfe0754f?anchor=page&page=1&format=text"
  ]
}
```

**Response**

```json
{
  "results": [
    {
      "asset_id": "asset_9249292-d118-42d3-95b4-00eccfe0754f",
      "content": "Page 1 text...",
      "format": "text",
      "asset_type": "pdf",
      "is_error": false,
      "read_capabilities": {
        "asset_type": "pdf",
        "default_format": "text",
        "formats": [
          "text",
          "image"
        ],
        "anchors": [
          "page",
          "page_range",
          "page_rect",
          "page_text"
        ],
        "pagination": "page_range",
        "preferred_anchors": [
          "page",
          "page_text",
          "page_rect"
        ]
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.athenaintel.com/api/v0/tools/asset/read"

payload = { "asset_ids": ["asset_9249292-d118-42d3-95b4-00eccfe0754f?anchor=page&page=1&format=text"] }
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.athenaintel.com/api/v0/tools/asset/read';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"asset_ids":["asset_9249292-d118-42d3-95b4-00eccfe0754f?anchor=page&page=1&format=text"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.athenaintel.com/api/v0/tools/asset/read"

	payload := strings.NewReader("{\n  \"asset_ids\": [\n    \"asset_9249292-d118-42d3-95b4-00eccfe0754f?anchor=page&page=1&format=text\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.athenaintel.com/api/v0/tools/asset/read")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"asset_ids\": [\n    \"asset_9249292-d118-42d3-95b4-00eccfe0754f?anchor=page&page=1&format=text\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.athenaintel.com/api/v0/tools/asset/read")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"asset_ids\": [\n    \"asset_9249292-d118-42d3-95b4-00eccfe0754f?anchor=page&page=1&format=text\"\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.athenaintel.com/api/v0/tools/asset/read', [
  'body' => '{
  "asset_ids": [
    "asset_9249292-d118-42d3-95b4-00eccfe0754f?anchor=page&page=1&format=text"
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/tools/asset/read");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"asset_ids\": [\n    \"asset_9249292-d118-42d3-95b4-00eccfe0754f?anchor=page&page=1&format=text\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["asset_ids": ["asset_9249292-d118-42d3-95b4-00eccfe0754f?anchor=page&page=1&format=text"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/tools/asset/read")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```