Google are calling them "captions" and API section is called YouTube API v2.0 – Captions.
Please note the following requirements for executing caption-related
API operations:
- Captions are only available for API version 2.
- Captions for a video can only be created, retrieved, modified and deleted by the owner of that video. To perform these operations for a
video, you must submit authenticated API requests for which the
video's owner is the logged-in user. Accordingly, API requests for
caption operations must contain a properly formatted Authorization
header.
- Requests to create (POST), update (PUT) or delete (DELETE) captions must identify your developer key using either the X-GData-Key
request header or the key request parameter.
That means, that you can add captions with API, but you need to have owner access to that video. It is strict policy, so that you won't show "wrong" captions on any video, for example, that show different translation of content in video, than there actually is.
You can only hack around this, by putting video inside container, and overlay your own text over video thus simulating captions.