Can anyone explain to me the function of のか in this sentence? Is it "I suppose that..." or similar?
彼は、体調が悪いのか、顔色があまり良くない。
「彼{かれ}は、体調{たいちょう}が悪{わる}いのか、顔色{かおいろ}があまり良{よ}くない。」
When used mid-sentence like that, 「のか」 questions the preceding statement to some extent. For translation purposes, one might use:
"Not sure whether [preceding statement] is the case, but ~~~~~."
"Not sure if it is because [preceding statement], but ~~~~~."
In the sentence in question, 「体調が悪い」 is only a speculation whereas 「顔色があまり良くない」 is a fact. That is why the speaker/writer uses 「のか」 to express the possibility of the preceding statement not being totally correct.
In this sentence, 「のか」 can be replaced by 「からなのか」 or 「せいなのか」 without changing the meaning.