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

# Process documents from a cloud storage bucket

POST https://<your-prep-endpoint>/emtellisplit/v{api_version}/submit
Content-Type: application/json

In API version 1, the output keys contain the stem of the document's file name. In version 2, they do not.

Reference: https://docs.emtelligent.com/prep/api/v-1-submit

## Authentication

- `Authorization` header (bearer token, required) — Your API key

## Request

### Path parameters

- `api_version` (enum, required)
  - Allowed values: `1`, `2`

### Body (application/json)

This endpoint expects a SubmitRequest.

- `cloud_provider` (enum, required)
  - Allowed values: `s3`, `azure`
- `user_creds` (SubmitRequestUserCreds, required) — Credentials for the buckets. Their shape depends on cloud_provider.
- `input_bucket` (string, required) — Must match the server's allowed input buckets
- `input_object_keys` (SubmitRequestInputObjectKeys, required) — Object keys in input_bucket. When operation has ep but not split, splits_json and params.subdoc_num_string are required; when it also has no ocr, best_ocr is required too.
- `output_bucket` (string, required) — Must match the server's allowed output buckets
- `output_bucket_prefix` (string, optional, default: )
- `operation` (enum, optional, default: split-ocr-ep)
  - Allowed values: `split`, `ocr`, `split-ocr`, `split-ocr-ep`, `ocr-ep`, `ep`
- `params` (SubmitParams, optional, nullable) — Processing options. A server can reject some of them.

## Response

### 200

OK

- `job_id` (string, required)

## Errors

### 400 Bad Request Error

Invalid request

- `error` (string, required)

### 401 Unauthorized Error

Missing or invalid credentials

- `error` (string, required)

### 402 Payment Required Error

Organization suspended, or not enough credit

- `V1_submitRequestPaymentRequiredError`
  - InsufficientCreditResponse: InsufficientCreditResponse
  - ErrorResponse: ErrorResponse

### 500 Internal Server Error

Server error, or the server is in maintenance mode

- `error` (string, required)

### 503 Service Unavailable Error

Service temporarily unavailable

- `error` (string, required)

## Types

### SubmitRequestUserCreds

Credentials for the buckets. Their shape depends on cloud_provider.

- S3Creds: S3Creds
- AzureCreds: AzureCreds

### SubmitRequestInputObjectKeys

Object keys in input_bucket. When operation has ep but not split, splits_json and params.subdoc_num_string are required; when it also has no ocr, best_ocr is required too.

- `document` (string, required)
- `splits_json` (string, optional)
- `best_ocr` (string, optional)

### SubmitParams

Processing options. A server can reject some of them.

- `model` (string, optional) — a model name. concerto2 and concerto3 were removed in emtellisplit 0.8.0
- `splitter_version` (enum, optional) — one of v3, v4
  - Allowed values: `v3`, `v4`
- `sections` (boolean, optional) — bool, Whether to split into sections
- `nosplit` (enum, optional) — false or one of ['all', 'fast'], whether to not try to split the document
  - Allowed values: `all`, `fast`
- `enable_collation` (boolean, optional) — bool, Whether to perform across-page section collation
- `complex` (boolean, optional) — bool, Whether to use complex ocr
- `subdoc_num_string` (string, optional) — The subdoc number string to use to index into splits.json when processing without split as the first step. Required when operation has ep but not split.
- `ep_rollup` (map from string to any, optional) — dictionary of key-value pairs to override document metadata

### InsufficientCreditResponse

- `error` (string, required)
- `available_cents` (integer, required)
- `requested_cents` (integer, required)

### ErrorResponse

- `error` (string, required)

### S3Creds

- `aws_access_key_id` (string, required)
- `aws_secret_access_key` (string, required)
- `aws_session_token` (string, optional) — The session token of temporary credentials

### AzureCreds

account_name plus one of: account_primary_access_key, sas_token, or client_id + client_secret + tenant_id. The account must match the server's allowed storage accounts.

- any
- any
- any

## Examples

**Request**

```json
{
  "cloud_provider": "s3",
  "user_creds": {
    "aws_access_key_id": "string",
    "aws_secret_access_key": "string"
  },
  "input_bucket": "string",
  "input_object_keys": {
    "document": "string"
  },
  "output_bucket": "string"
}
```

**Response**

```json
{
  "job_id": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/emtellisplit/v1/submit"

payload = {
    "cloud_provider": "s3",
    "user_creds": {
        "aws_access_key_id": "string",
        "aws_secret_access_key": "string"
    },
    "input_bucket": "string",
    "input_object_keys": { "document": "string" },
    "output_bucket": "string"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.example.com/emtellisplit/v1/submit';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"cloud_provider":"s3","user_creds":{"aws_access_key_id":"string","aws_secret_access_key":"string"},"input_bucket":"string","input_object_keys":{"document":"string"},"output_bucket":"string"}'
};

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.example.com/emtellisplit/v1/submit"

	payload := strings.NewReader("{\n  \"cloud_provider\": \"s3\",\n  \"user_creds\": {\n    \"aws_access_key_id\": \"string\",\n    \"aws_secret_access_key\": \"string\"\n  },\n  \"input_bucket\": \"string\",\n  \"input_object_keys\": {\n    \"document\": \"string\"\n  },\n  \"output_bucket\": \"string\"\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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.example.com/emtellisplit/v1/submit")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"cloud_provider\": \"s3\",\n  \"user_creds\": {\n    \"aws_access_key_id\": \"string\",\n    \"aws_secret_access_key\": \"string\"\n  },\n  \"input_bucket\": \"string\",\n  \"input_object_keys\": {\n    \"document\": \"string\"\n  },\n  \"output_bucket\": \"string\"\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.example.com/emtellisplit/v1/submit")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"cloud_provider\": \"s3\",\n  \"user_creds\": {\n    \"aws_access_key_id\": \"string\",\n    \"aws_secret_access_key\": \"string\"\n  },\n  \"input_bucket\": \"string\",\n  \"input_object_keys\": {\n    \"document\": \"string\"\n  },\n  \"output_bucket\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/emtellisplit/v1/submit', [
  'body' => '{
  "cloud_provider": "s3",
  "user_creds": {
    "aws_access_key_id": "string",
    "aws_secret_access_key": "string"
  },
  "input_bucket": "string",
  "input_object_keys": {
    "document": "string"
  },
  "output_bucket": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/emtellisplit/v1/submit");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"cloud_provider\": \"s3\",\n  \"user_creds\": {\n    \"aws_access_key_id\": \"string\",\n    \"aws_secret_access_key\": \"string\"\n  },\n  \"input_bucket\": \"string\",\n  \"input_object_keys\": {\n    \"document\": \"string\"\n  },\n  \"output_bucket\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "cloud_provider": "s3",
  "user_creds": [
    "aws_access_key_id": "string",
    "aws_secret_access_key": "string"
  ],
  "input_bucket": "string",
  "input_object_keys": ["document": "string"],
  "output_bucket": "string"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/emtellisplit/v1/submit")! 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()
```