I was wondering if Twitter offers any api that can be installed on my blog, so Twitter users can tweet from my blog when browsing my blog.
The Twitter @ Anywhere API has a Tweet box that can be installed on any website.
It also includes Twitter hovercards, follow buttons, linkify @mentions, and user login & signup.
I believe that Twitter's solution for bloggers is their Web Intents API. There are three types of Web Intents but the one I believe you'll find most relevant to your need is the Tweet or Reply intent.
What it does essentially is enabling you to set up a button that will appear on every new blog-post or article. When your readers click that button, their preferred Twitter client will open (web on desktop or app on mobile) on the new tweet window, ready to accept their text to tweet inside. The cool thing about it is that you can even suggest your readers a draft of a well formulated tweet, ready for them to personalize (or not) and tweet away.
For example, say you posted a new blog-post titled: "Here's How To Test Your IQ in 5 Minutes" and you'd wish for people who read your article and liked it to be able to share the link to it with their followers with a recommendation. Say the type of ideal tweets you'd like to see people writing is something along the lines: "www.myblog.com offers an accurate IQ test that takes only 5 minutes to complete. Here's the link to try it yourself: www.myblog.com/iq-test-in-5-minutes".
With Twitter Web Intent you can generate the following link:
If you'll copy-paste the link above in your browser (or click here) you'll see that Twitter opens with a ready-made draft for a new tweet with the suggested text already inside. Of course you can pass the link with no draft text and it will open as a blank new tweet.
There are ready made plugins for popular blogging platforms which automatically generate a "Tweet This Article" button on each new post with the title of the post and permalink as the draft suggested ready-made tweet.
Last, have a look at Twitter's Web Intent documentation as there are more useful parameters you can include in your Web Intent tweet draft like suggested accounts to be followed, images and more.