> 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.

# Create a Word document or presentation from a file

POST https://api.athenaintel.com/api/v0/assets/create-from-file
Content-Type: multipart/form-data

Create a Word document from a .docx file, or a presentation from a .pptx or .potx file, holding that file's content: the asset Athena makes when you create one from a file in the app. Athena imports the file through DOCX Studio or PPTX Studio with its own studio credential, as your write, and answers once the asset is ready (a large deck can take a few minutes). Nothing is left behind when the import fails. The file's name decides the type; the title defaults to the name without its extension. Gates are those of POST /api/v0/assets/create: membership in the workspace (workspace_id, else parent_folder_id's, else your current one) and EDIT on parent_folder_id. With source_asset_id (an asset you can read, for example the document the file was exported from) and no parent_folder_id, the new asset goes into the source's folder when you may create there, otherwise at your root. Unlike POST /api/v0/tools/file/save, which stores the file itself and turns an Office upload into its editable type in the background, this makes the editable asset in the request and keeps no file asset. A Word file may be up to 18.75 MiB, a PowerPoint file up to 100 MiB. From an agent run (a verified X-Athena-Session-Credential), a Word document's first write also records the run, and a presentation takes the create_presentation_pptx_studio tool policy.

Reference: https://docs.athenaintel.com/api-reference/assets/create-from-file

## Authentication

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

## Request

### Query parameters

- `title` (string, optional, nullable) — Title for the new asset; defaults to the file's name
- `parent_folder_id` (string, optional, nullable) — ID of the folder to create the asset in
- `workspace_id` (string, optional, nullable) — ID of the workspace to create the asset in; defaults to the workspace of parent_folder_id, else your current workspace
- `source_asset_id` (string, optional, nullable) — An asset you can read that the file came from; without parent_folder_id the new asset goes next to it when you may create there

### Body (multipart/form-data)

This endpoint expects a multipart form containing a file.

- `file` (file, required) — The .docx, .pptx or .potx file to create the asset from

## Response

### 200

Asset created from the file

- `asset_id` (string, required) — ID of the newly created asset
- `asset_type` (string, required) — Type of the created asset
- `created_at` (string, required) — Timestamp when the asset was created
- `title` (string, required) — Title of the created asset
- `parent_folder_id` (string, optional, nullable) — ID of the parent folder
- `workspace_id` (string, optional, nullable) — ID of the workspace that owns the created asset

## Errors

### 400 Bad Request Error

The file is empty

- `map from string to any`

### 403 Forbidden Error

Not a member of the workspace, cannot edit parent_folder_id, the deployment does not offer the asset type, or an agent run's tool policy refuses it

- `map from string to any`

### 404 Not Found Error

source_asset_id or parent_folder_id not found

- `map from string to any`

### 413 Content Too Large Error

The file is larger than the type's limit

- `map from string to any`

### 422 Unprocessable Entity Error

The file is not a .docx, .pptx or .potx, or the studio could not read it

- `map from string to any`

### 502 Bad Gateway Error

The studio could not be reached or failed

- `map from string to any`

## Examples

**Request**

```json
{
  "file": "<file: string>"
}
```

**Response**

```json
{
  "asset_id": "asset_abc123-def456-ghi789",
  "asset_type": "presentation",
  "created_at": "2026-10-30T10:30:00Z",
  "title": "Quarterly Review",
  "parent_folder_id": "asset_folder_12345",
  "workspace_id": "workspace_abc123"
}
```

**SDK Code**

```python assets_create_from_file_example
import requests

url = "https://api.athenaintel.com/api/v0/assets/create-from-file"

files = { "file": "open('string', 'rb')" }
headers = {"X-API-KEY": "<apiKey>"}

response = requests.post(url, files=files, headers=headers)

print(response.json())
```

```javascript assets_create_from_file_example
const url = 'https://api.athenaintel.com/api/v0/assets/create-from-file';
const form = new FormData();
form.append('file', 'string');

const options = {method: 'POST', headers: {'X-API-KEY': '<apiKey>'}};

options.body = form;

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

```go assets_create_from_file_example
package main

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

func main() {

	url := "https://api.athenaintel.com/api/v0/assets/create-from-file"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")

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

	req.Header.Add("X-API-KEY", "<apiKey>")

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

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

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

}
```

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

url = URI("https://api.athenaintel.com/api/v0/assets/create-from-file")

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

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n"

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

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

HttpResponse<String> response = Unirest.post("https://api.athenaintel.com/api/v0/assets/create-from-file")
  .header("X-API-KEY", "<apiKey>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.athenaintel.com/api/v0/assets/create-from-file', [
  'multipart' => [
    [
        'name' => 'file',
        'filename' => 'string',
        'contents' => null
    ]
  ]
  'headers' => [
    'X-API-KEY' => '<apiKey>',
  ],
]);

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

```csharp assets_create_from_file_example
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/assets/create-from-file");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift assets_create_from_file_example
import Foundation

let headers = ["X-API-KEY": "<apiKey>"]
let parameters = [
  [
    "name": "file",
    "fileName": "string"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/assets/create-from-file")! 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()
```