Given a function f: X → Y (Both of these sets can be chosen as wanted):
X is called the domain and Y is called the codomain.

The codomain is were all of the outputs of f are constrained to fall. (f(x) can only be values existing in the set Y)
The image of the function is the subset of the codomain the function can reach.

For an example, take a look at this function:
f: {0, 1, 2, 3, 4, 5} -> N
f(x) = x²

This function does map its domain {0, 1, 2, 3, 4, 5} to its codomain N. But not all of the values in the codomain N can be reached using this function and domain, so the image of the function would be {0, 1, 4, 9, 16, 25}, only a small subset of N.

Formally the image is defined as { f(x) : x ∈ X } where X is the Domain of the function f.
The Codomain can be chosen when writing a function.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence