Humans can do a few things that AI still can't do, and probably won't be able to do for quite some time. What most of those things boil down to, at this point, is judgment. This is the very human ability to make a highly subjective cost/benefit analysis on a decision, then decide if a risky proposition is worth pursuing. While an AI could be programmed to do such work or learn from examples over time, the simple fact is that AI do not collectively have enough data to match human judgment in a lot of matters, and things will probably stay that way for a while. Humans also have have something that an AI could not hope to replicate with current technology; emotions. Specifically, humans have emotional attachments. Whether it's to a given situation, a hope for a certain outcome, prioritizing one person over another, or simply preferring something out of convenience, human emotion shapes human thought, and that tempers every decision made by humans. AI, on the other hand, do not have emotional capabilities just yet, and, again, probably won't for some time, if at all, in the truest sense. That means that in the very near future, when AI begin to sweep the job market and cause a free time epidemic, human society's collective economy is going to go through no small amount of changes and shifts, and if there is any value left for humans to reap, it will be in things like subjective judgment, territory where AI cannot tread.
AI, by nature, tend toward maximization of a given reward variable or desired outcome, or toward maximally extensive learning of a given assigned data set. This means that AI may cut corners, find loopholes, make arguable judgment calls, and otherwise make decisions in a way that humans wouldn't, sometimes leading to undesirable results or ambiguity. If an AI can't figure out what to do in a given situation, it may stop entirely, or even end up going haywire, depending on what kind of safeguards are installed. AI can be given a "reward function" for certain outcomes or attributes of outcomes in order to temper its decisions, but even then, it can run into problems. It could consult with other AI in a neural network, connect to the internet for research, consult past data to look for a good subjective outcome, or do many other things to figure out the best way to proceed, but at the end of the day, the simple fact is that human judgment and intuition will be required at some point for some decisions. If you've ever heard somebody talk about being leery of AI doing things like complex surgeries or managing hedge funds, this aspect of AI is probably in the back of their mind in some form. Humans, on the other hand, can consult other humans, judge a situation based on how desireable certain outcomes are on a fluctuating basis, and simply go with their gut, if all else fails. As stated above, that's where human value is going to lie, so how exactly will that manifest?
For starters, jobs doing menial or physical tasks will probably be among the first to go, leaving things like creative programming, the arts, and the sciences. If there's one thing a machine can do well, it's arithmetic, so even some scientific fields will be in danger. Likewise, precise movements according to a procedure are a particular specialty of well-trained AI, so things like assembly line work, electrician work, and product testing are likely on the line, though surgeons probably need not worry for a while, since humans can be unpredictable, and machines need constant input and instruction for specific situations. Truly subjective and creative fields will likely always be safe to an extent, though AI could enter them, should programmers ever find a way to imbue them with a suitable imitation of human emotion. Even politics could end up under the purview of AI some day, or at least involve them in some ways, such as number crunching and data analytics. The job market for humans will look drastically different, but there's no telling just how valuable human input will be when and if the AI job market revolution is complete. If things go as top names in tech are predicting, and some are hoping, almost everybody will have a lot more free time on their hands; free time that they could use to pursue hobbies, cultivate culture and arts, and innovate in ways that no AI ever could.