# How to get model\_id, public\_id, secret\_key

**URL:** <https://forum.numer.ai/t/how-to-get-model-id-public-id-secret-key/757>\
**Category:** Feedback\
**Created:** [August 8, 2020, 5:28am UTC](https://forum.numer.ai/t/how-to-get-model-id-public-id-secret-key/757 "2020-08-08T05:28:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharkdeng](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sharkdeng](https://forum.numer.ai/u/sharkdeng)\
**Post date:** [August 8, 2020, 5:28am UTC](https://forum.numer.ai/t/how-to-get-model-id-public-id-secret-key/757/1 "2020-08-08T05:28:02Z")

</div>

Hello, i just encountered numer.ai today. When running the first submission. I got this question

```auto
# Get your API keys and model_id from https://numer.ai/submit
public_id = "REPLACEME"
secret_key = "REPLACEME"
model_id = "REPLACEME"
napi = numerapi.NumerAPI(public_id=public_id, secret_key=secret_key)

```

How to get the public\_id, secret\_key, and model\_id?

Thank you

---

<div class="post-metadata">

**Author:** ![sharkdeng](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sharkdeng](https://forum.numer.ai/u/sharkdeng)\
**Post date:** [August 8, 2020, 5:35am UTC](https://forum.numer.ai/t/how-to-get-model-id-public-id-secret-key/757/2 "2020-08-08T05:35:54Z")

</div>

I found one [post](http://forum.numer.ai/t/multi-model-support/563/2) and submit successfully, but how to check my submissions?

---

<div class="post-metadata">

**Author:** ![jrb](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/jrb/32/3472_2.png) [@jrb](https://forum.numer.ai/u/jrb)\
**Post date:** [August 8, 2020, 7:25am UTC](https://forum.numer.ai/t/how-to-get-model-id-public-id-secret-key/757/3 "2020-08-08T07:25:06Z")

</div>

Welcome to the tournament @sharkdeng!

You can create API keys from your [account settings](https://numer.ai/account) page (Log into numerai, click on the gear icon on the top right and then click on **Settings** in the menu). Once you’re on that page, click on “Create API Key” under “Automation”.

You can get the model\_id for your model(s) from the [models](https://numer.ai/models) page (Also accessible from the gear icon on the top right of the page). You can also get _model\_id_ for your models from the API. I recommend reading the [numerapi docs](https://numerapi.readthedocs.io/en/stable/) for that.

You can check your latest submission from the [tournament](https://numer.ai/tournament) page. You can also get it via the API. Everything accesible via the website is also available via the API, except for the API keys.

---

<div class="post-metadata">

**Author:** ![jnolan9](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@jnolan9](https://forum.numer.ai/u/jnolan9)\
**Post date:** [August 25, 2020, 2:06pm UTC](https://forum.numer.ai/t/how-to-get-model-id-public-id-secret-key/757/4 "2020-08-25T14:06:45Z")

</div>

Does anyone have any more detail about what syntax is necessary to use the API? I have tried this:

```auto
public_id = "REPLACEME"
secret_key = "REPLACEME"
model_id = "REPLACEME"
napi = numerapi.NumerAPI(public_id=public_id, secret_key=secret_key)

```

In a couple of different ways and I keep getting back:

ERROR numerapi.base\_api: Your session is invalid or has expired.

thanks

---

<div class="post-metadata">

**Author:** ![pschork](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/pschork/32/2495_2.png) [@pschork](https://forum.numer.ai/u/pschork)\
**Post date:** [August 25, 2020, 6:44pm UTC](https://forum.numer.ai/t/how-to-get-model-id-public-id-secret-key/757/5 "2020-08-25T18:44:53Z")

</div>

This typically means that you have the `public_id` and `secret_key` swapped.

---

<div class="post-metadata">

**Author:** ![jnolan9](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@jnolan9](https://forum.numer.ai/u/jnolan9)\
**Post date:** [August 25, 2020, 7:04pm UTC](https://forum.numer.ai/t/how-to-get-model-id-public-id-secret-key/757/6 "2020-08-25T19:04:03Z")

</div>

I tried that, tried all caps, I am still seeing the same thing, not any type of login failure or anything like that. Are there any type of extended diags available with that command?
