Start
Quickstart
Get an API key, send one request, and understand the three ways the file can come back.
Reading this with an AI agent?
The entire documentation lives in one Markdown file, built to be fetched and read by an LLM. Copy the prompt below and paste it into ChatGPT, Claude, Cursor or any agent with web access — it asks the agent to read the file before helping you.
1. Create an API key
- Sign in at api.searchops.io/dashboard with Google.
- Open API keys and create one.
- Copy it immediately — the full key starts with
sk_live_and is shown only once.
Treat it like a password. Keys are stored hashed, so a lost key cannot be recovered — only rotated or deleted. Never put one in browser-side code.
2. Send your first request
Authentication is a single header: x-api-key.
curl -X POST https://api.searchops.io/v1/generate \
-H "Content-Type: application/json" \
-H "x-api-key: sk_live_YOUR_KEY" \
-d '{
"input_type": "markdown",
"content": "# Hello\n\nThis is **bold** text.",
"response_format": "file",
"filename": "hello"
}' \
--output hello.docxconst res = await fetch('https://api.searchops.io/v1/generate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.DOCXAPI_KEY,
},
body: JSON.stringify({
input_type: 'markdown',
content: '# Hello\n\nThis is **bold** text.',
response_format: 'file',
filename: 'hello',
}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const { writeFile } = await import('node:fs/promises');
await writeFile('hello.docx', Buffer.from(await res.arrayBuffer()));import os, requests
r = requests.post(
"https://api.searchops.io/v1/generate",
headers={"x-api-key": os.environ["DOCXAPI_KEY"]},
json={
"input_type": "markdown",
"content": "# Hello\n\nThis is **bold** text.",
"response_format": "file",
"filename": "hello",
},
timeout=60,
)
r.raise_for_status()
open("hello.docx", "wb").write(r.content)That is a complete integration. There is no second call, no polling, and no job to wait on.
3. Choose how the file comes back
The response_format field changes the shape of the response, not the document.
| Value | You get | Use it when |
|---|---|---|
file | Raw .docx bytes | The next step stores or sends the file — Google Drive, S3, an email attachment. Best for n8n. |
base64 | JSON with a base64 string | Your platform builds the binary itself, or you want to inspect the response first. This is the default. |
url | JSON with a 24h download link | You are handing a download to a human and do not want the bytes through your own system. |
{
"status": "success",
"format": "base64",
"data": "UEsDBBQABgAIAAAAIQD…",
"pages": null,
"generation_time_ms": 480
}pages is always null. Page count cannot be determined without rendering the document, so the API returns nothing rather than a wrong number. Do not build logic on it.
4. Name the file
Pass filename and the .docx extension is added for you. Unicode is fine; slashes and control characters are rejected.
{
"input_type": "markdown",
"content": "# Relatório\n\nConteúdo…",
"response_format": "file",
"filename": "Relatório mensal"
}The response carries both an ASCII fallback and the UTF-8 name, so downloads keep accents in every browser.