How do I add tags via the post api endpoint

You have the syntax right. Maybe php is eating your []? The actual curl command (no PHP) is working:

curl -i -sS -X POST "http://localhost:3000/posts.json"  \
-H "Content-Type: multipart/form-data;"  \
-H "Api-Key: ba8f7..."  \
-H "Api-Username: blake.erickson"  \
-F "title=2e45e2e8a239dk29d 1f35c2db23232323444a61 1e7e8a39797234"  \
-F "raw=f9ef6749c8736db0996bad662187bee6 8a5753d79c027e5a3a576b171c5bc085 a546f59b75bca6f54edd2af2ef069cf8" \
-F "tags[]=asdf" \
-F "tags[]=fdsa" \
-F "tags[]=foo"

EDIT:

Wait. Why are you including a topic id? You should only be able to add tags when creating a topic, not when creating a post (a reply to a topic).