Skip to main content
This guide walks you through: get an API key, run your first project intelligence flow (upload files → read insights → export a report), and optionally generate a standalone document from a prompt.

1. Get an API key

Pick whichever path fits your workflow — they produce the same sk_live_* key.

2. Run a project intelligence flow

This is the primary surface — upload related files, let the pipeline cross-reference them, read the resulting alerts and insights.
import os, requests, time

API = "https://backend.overtenai.com/api/v1"
H = {"X-API-Key": os.environ["OVERTEN_API_KEY"]}

# 1. Create a project
project = requests.post(
    f"{API}/projects",
    headers=H,
    json={"name": "Acme Q3 Due Diligence", "tags": ["dd", "q3"]},
).json()
pid = project["project_id"]

# 2. Attach files (analysis kicks off automatically)
for path in ["financials.xlsx", "report.pdf", "contract.docx"]:
    with open(path, "rb") as f:
        requests.post(
            f"{API}/projects/{pid}/files",
            headers=H,
            files={"file": f},
            data={"role": "primary"},
        ).raise_for_status()

# 3. Poll status
while True:
    s = requests.get(f"{API}/projects/{pid}/analysis/status", headers=H).json()
    print(f"phase={s['pipeline']['phase']} progress={s['progress']}%")
    if s["pipeline"]["status"] == "completed":
        break
    time.sleep(10)

# 4. Read the alerts / insights feed
insights = requests.get(
    f"{API}/projects/{pid}/insights",
    headers=H,
    params={"severity": "critical,high", "limit": 50},
).json()
for item in insights["items"]:
    print("-", item["alert"]["description"])

# 5. Export a branded .docx report
report = requests.post(
    f"{API}/projects/{pid}/reports",
    headers=H,
    json={"title": "Acme Due Diligence — Key Findings"},
).json()
with open("insights_report.docx", "wb") as f:
    f.write(requests.get(report["download_url"]).content)
print("Saved insights_report.docx")
Open insights_report.docx — you’ll see a cover page with a summary strip, then one section per severity with each finding laid out as a titled card with description, source, and recommendations. Same structure every run (it’s a deterministic template, not an LLM write). See the full surface in the Project Intelligence guide.

3. Generate a standalone document

If you don’t need the cross-document analysis — you just want to produce a spreadsheet, report, or deck from a prompt — hit the format endpoints directly. No project required.
resp = requests.post(
    f"{API}/excel/generate",
    headers=H,
    json={"prompt": "Create a sales report with summary statistics"},
)
resp.raise_for_status()
result = resp.json()
print(f"run_id={result['run_id']} credits_used={result['credits_used']}")

with open("sales_report.xlsx", "wb") as f:
    f.write(requests.get(result["download_url"]).content)
The same shape works for /word/generate and /slides/generate. See the format guides for what each agent can produce.

4. Iterate on the same document

Pass the run_id back to resume — the agent already knows the document structure, so the next turn is much cheaper:
resp2 = requests.post(
    f"{API}/excel/generate",
    headers=H,
    json={
        "run_id": result["run_id"],
        "prompt": "Now add a chart comparing regions over the last 4 quarters",
    },
)
Resume works across all generation endpoints. See Runs and tasks for the full resume semantics.

5. Skip polling with a webhook

If you don’t want to block on the sync response, submit asynchronously and let us POST the result to you when ready:
resp = requests.post(
    f"{API}/excel/generate",
    headers=H,
    json={
        "prompt": "Create a Q3 sales report",
        "async": True,
        "webhook_url": "https://myapp.example.com/webhooks/overten",
    },
)
# → {"run_id": "run_...", "task_id": "task_...", "status": "queued"}
Payload shape and signature verification: Webhooks.

What’s next

Project intelligence

Full surface for cross-document analysis, insights, and reports.

Format guides

Real-world examples for Word, Excel, and Slides generation.

Conversions

Turn any .docx/.xlsx/.pptx into .pdf, .html, .txt, and more.

API reference

Try every endpoint from the browser.