The Consulate handles the affairs of its citizens in the territory, but does not have as much political power as the embassy.
They are places aimed at solving bureaucratic issues or problems of its citizens in foreign territory, such as visas, cargo inspection, administrative assistance for both individuals and legal entities, issuing documents such as passports, renewal of electoral documents, criminal records, etc.
Each country may have several consulates in the foreign nation, usually in capital cities. In the case of Brazil, the country has three Consulates General in Japan: Tokyo, Nagoya and Hamamatsu.
The Embassy is responsible for relations between two countries, each country has only one embassy in each partner nation, always in the capital, in this case the Brazilian embassy is located in Tokyo (Capital of Japan). In the place, matters of common interest between the two nations are discussed, involving political negotiations, official information, human rights, economy, culture, all aimed at defending Brazilian interests residing in Japan.