# Recieving ApiError: 400 when using local host

**URL:** https://ask.openrouteservice.org/t/recieving-apierror-400-when-using-local-host/4782
**Category:** openrouteservice
**Created:** [April 14, 2023, 6:33am UTC](https://ask.openrouteservice.org/t/recieving-apierror-400-when-using-local-host/4782 "2023-04-14T06:33:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sander\_ruben](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/sander_ruben/32/2256_2.png) [@sander\_ruben](https://ask.openrouteservice.org/u/sander_ruben)
#### Post date: [April 14, 2023, 6:33am UTC](https://ask.openrouteservice.org/t/recieving-apierror-400-when-using-local-host/4782/1 "2023-04-14T06:33:43Z")

</div>

I am using ORS in python, and my code works for a small instance using an API key from the ORS website. However, I would like to run larger instances and found that this was possible using my own server. I have no experience in this area whatsoever, so I followed the steps from [SyntaxByte on YouTube](https://www.youtube.com/watch?v=VQXlbqKArFk&ab_channel=SyntaxByte). Now I receive the following error:

ApiError: 400 ({‘error’: {‘code’: 2012, ‘message’: “Unknown parameter ‘g’.”}, ‘info’: {‘engine’: {‘version’: ‘7.0.1’, ‘build\_date’: ‘2023-03-08T12:06:41Z’}, ‘timestamp’: 1681399387414}})

Does anyone know what this unknown paramater is and where to find/solve it? Thanks in advance.

---

<div class="post-metadata">

### Author: ![sander\_ruben](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/sander_ruben/32/2256_2.png) [@sander\_ruben](https://ask.openrouteservice.org/u/sander_ruben)
#### Post date: [April 15, 2023, 10:28am UTC](https://ask.openrouteservice.org/t/recieving-apierror-400-when-using-local-host/4782/2 "2023-04-15T10:28:41Z")

</div>

This is solved, I had to add /driving-car to the API key.

---

<div class="post-metadata">

### Author: ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)
#### Post date: [April 17, 2023, 9:10am UTC](https://ask.openrouteservice.org/t/recieving-apierror-400-when-using-local-host/4782/3 "2023-04-17T09:10:04Z")

</div>

Hi @sander_ruben,

i’m not sure how adding `/driving-car` to the API key would fix any request 😅 .  
Also please provide the full request in these cases.

With a local ors instance you won’t get the `/optimization` endpoint. For vroom setup see e.g.

> [@I started vroom + ors, but I cannot use optimization endpoint](https://ask.openrouteservice.org/t/i-started-vroom-ors-but-i-cannot-use-optimization-endpoint/3637):
>
> I’ve already started a docker compose instance and everything seems to be running, directions api works, all health check green. Vroom also started listening on port 3000. But I cannot make any api calls to [http://localhost:8080/ors/v2/optimization](http://localhost:8080/ors/v2/optimization) endpoint, it gives me 404 error. Is there something else I need to setup to enable optimization? Thanks a lot!

or their documentation.

Best regards.
