I\'m trying to pass the cat output to curl:
$ cat file | curl --data \'{\"title\":\"mytitle\",\"input\":\"-\"}\' http://api
Bu
Sounds like you want to wrap the content of input in a JSON body, and then have that sent over with a POST request. I think that the simplest way to do that is to manipulate stdin first and then push that over to curl using -d @-. One way could look like this:
cat <(echo '{"title":"mytitle","input":"') file <(echo '"}') \
| curl -d @- http://api
I'm using <(echo) to use cat to merge strings and files, but there is almost certainly a better way.
Keep in mind that this does not escape the contents of file and that you may run into issues because of that.