Inference API detailed request

I am using this api endpoint of gpt2 from https://huggingface.co/gpt2
this is given curl request,
" curl -X POST
-H “Authorization: Bearer api_xxxxxxxxxxxxxxxxxxxxxxx”
-H “Content-Type: application/json”
-d ‘“My name is Mariama, my favorite”’
https://api-inference.huggingface.co/models/gpt2 "

The problem is this request only specifies start of the output text. “my name is marima, my favorite” in this case.
But when using transformers you can specify max lenght of output too with

>>> generator("Hello, I'm a language model,", max_length=30, num_return_sequences=5)

is it achievable with inference api ? Probably something like below request.

" curl -X POST
-H “Authorization: Bearer api_xxxxxxxxxxxxxxxxxxxxxxx”
-H “Content-Type: application/json”
-d ‘“My name is Mariama, my favorite”’
-d “max_length = 30”
htt/api-inference.huggingface.co/models/gpt2 "

hi hexapoda,

I have no idea what your post is asking about, but the link doesn’t seem to work (I get “method not allowed” when I try to use it).

It might be good to include more detail too.

i edited the post, my question briefly " is there any other way to use inference api ?"

Hey, I think this not yet available, @julien-c might have better answer

Hi @Hexapoda! This is going to be available in the next release of our paid accelerated inference API. If you’re still interested, feel free to send an email to api-enterprise@huggingface.co.

Thanks for your attention, i already created my own api which is more flexible and fast as expected. Put huggingface helped me a lot with prototype great community!