google.api_core.exceptions.PermissionDenied: 403 The request is missing a valid API key

I got an error google.api_core.exceptions.PermissionDenied: 403 The request is missing a valid API key. I wrote codes

import os
from google.cloud import vision
from google.cloud.vision import types
from google.auth import credentials
import mock

creds = mock.Mock(spec=credentials.Credentials)
client = vision.ImageAnnotatorClient(credentials=creds,)

When I run this codes,the error happens.I downloaded json by following this process https://cloud.google.com/vision/docs/auth?hl=en and I know my API key like WE34kn56neoiu・・・.But I cannot understand how I should write these json& API key in the codes.I think creds variable certificates, but my idea is maybe wrong.I read this settings site https://google-auth.readthedocs.io/en/latest/user-guide.html#service-account-private-key-files ,but the site does not have the way of using mock.So how should I write in the code?