# Files

## Create File Upload

> Get a signed upload URL for direct GCS upload

```json
{"openapi":"3.1.0","info":{"title":"LightningRod API","version":"1.0.0"},"servers":[{"url":"/api/public/v1"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"CreateFileUploadRequest":{"properties":{"filename":{"type":"string","title":"Filename","description":"Original filename"},"size_bytes":{"type":"integer","minimum":1,"title":"Size Bytes","description":"File size in bytes"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type","description":"MIME type of the file"}},"type":"object","required":["filename","size_bytes"],"title":"CreateFileUploadRequest"},"CreateFileUploadResponse":{"properties":{"id":{"type":"string","title":"Id"},"original_file_name":{"type":"string","title":"Original File Name"},"cloud_storage_path":{"type":"string","title":"Cloud Storage Path"},"upload_url":{"type":"string","title":"Upload Url","description":"Signed GCS upload URL for direct upload"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"File-level metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When the upload URL expires"}},"type":"object","required":["id","original_file_name","cloud_storage_path","upload_url","mime_type","size_bytes","created_at","expires_at"],"title":"CreateFileUploadResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/files":{"post":{"tags":["Files"],"summary":"Create File Upload","description":"Get a signed upload URL for direct GCS upload","operationId":"create_file_upload_files_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFileUploadRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lightningrod.ai/rest-api/files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
