```python
from fastapi import FastAPI, status
from pydantic import BaseModel
import helpers

app = FastAPI()


class DocumentCreate(BaseModel):
    name: str
    text: str


@app.post("/documents", status_code=status.HTTP_201_CREATED)
def create_document(doc: DocumentCreate):
    bytes_written = helpers.save_document(doc.name, doc.text)
    return {"bytes": bytes_written}
```