Skip to content

Quick Start ​

Get up and running with Atiru in minutes.

1. Register an account ​

Go to atiru.io and create an account. Confirm your email via the link sent to your inbox.

2. Get an API key ​

  1. Log in to the Atiru dashboard.
  2. Go to API Keys.
  3. Create a new API key. Copy the key once—it is shown only at creation.

3. Upload your first file ​

Replace YOUR_API_KEY with your key.

bash
curl -X POST "https://api.atiru.io/files" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: image/png" \
  -H "x-file-name: example.png" \
  --data-binary @/path/to/file.png
javascript
const BASE = 'https://api.atiru.io'
const API_KEY = 'YOUR_API_KEY'

async function uploadFile(buffer, contentType, filename) {
  const res = await fetch(`${BASE}/files`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${API_KEY}`,
      'Content-Type': contentType,
      'x-file-name': filename,
    },
    body: buffer,
  })
  return res.json()
}

// Example: upload a file from disk (Node.js)
import { readFileSync } from 'fs'
const buffer = readFileSync('./example.png')
const result = await uploadFile(buffer, 'image/png', 'example.png')
console.log(result.file.public_url)
python
import requests

BASE = "https://api.atiru.io"
API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

def upload_file(path: str, content_type: str):
    with open(path, "rb") as f:
        return requests.post(
            f"{BASE}/files",
            headers={**HEADERS, "Content-Type": content_type, "x-file-name": path.split("/")[-1]},
            data=f.read(),
        ).json()

result = upload_file("example.png", "image/png")
print(result["file"]["public_url"])

4. View your file ​

The response includes public_url and default_url. Use either in a browser or <img> tag:

html
<img src="https://cdn.atiru.io/m/YOUR_FILE_ID" alt="My image" />

For images, you can add resize parameters:

html
<img src="https://cdn.atiru.io/m/YOUR_FILE_ID?width=200&height=200" alt="Thumbnail" />

Next steps ​