# fastapi.exceptions.FastAPIError: Invalid args for response field 'depends'

- **ID:** `python/fastapi-depends-invalid-parameter`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using `Depends()` incorrectly, such as passing a non-callable or using it in a response model, causes FastAPI to raise an error.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (100% success)
   ```
   Use `Depends()` correctly: `def endpoint(dep: SomeClass = Depends())` or `def endpoint(dep: SomeClass = Depends(get_dep))`.
   ```
2. **** (95% success)
   ```
   Ensure the dependency function is callable and has correct signature.
   ```

## Dead Ends

- **** — Using `Depends` as a type hint without parentheses, e.g., `def endpoint(dep: Depends):` fails because Depends is a class, not a type. (90% fail)
- **** — Putting `Depends` in a Pydantic model field doesn't work; it's only for route parameters. (95% fail)
