Hi there,
For the “API key not valid” issue, it appears that you are using a Server key, but you need to use a browser key.
The Vision API Getting Started page has detailed screenshots.
Can you please refer and see if you managed to get it through?