# Does GPT-J support api access?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdoes-gpt-j-support-api-access%2F11086%3E%5C
**Category:** Beginners\
**Created:** [October 26, 2021, 6:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdoes-gpt-j-support-api-access%2F11086 "2021-10-26T06:31:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![emran4e](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@emran4e](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Femran4e)%5C
**Post date:** [October 26, 2021, 6:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdoes-gpt-j-support-api-access%2F11086%2F1 "2021-10-26T06:31:28Z")

</div>

Hi, i’m trying to use the gpt-j model to test through the api but i’m getting this error \>\> The model EleutherAI/gpt-j-6B is too large to be loaded automatically.

can you please tell me how to resolve this?

should i purchase the paid package or am i doing something wrong?

i used this code, i took it from the official website:

```auto
import requests

API_URL = "/static-proxy?url=https%3A%2F%2Fapi-inference.huggingface.co%2Fmodels%2FEleutherAI%2Fgpt-j-6B"
headers = {"Authorization": "Bearer api_KsXRTrcHCdYZNqLVwStUOFmhcwxMWjPJDd"}

def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()

output = query("Can you please let us know more details about your ")

print (output)

```

this is the output i’m getting:  
`{'error': 'The model EleutherAI/gpt-j-6B is too large to be loaded automatically.'}`

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnielsr)%5C
**Post date:** [October 26, 2021, 9:26am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdoes-gpt-j-support-api-access%2F11086%2F2 "2021-10-26T09:26:04Z")

</div>

Can you try again?

I just tested the [inference widget](https://huggingface.co/EleutherAI/gpt-j-6B?text=Once+upon+a+time%2C), and it works for me.
