# Accessing RASA NLU only server from python code using API

**URL:** <https://forum.rasa.com/t/accessing-rasa-nlu-only-server-from-python-code-using-api/51126>\
**Category:** Feedback on Rasa Open Source\
**Tags:** community\
**Created:** [February 4, 2022, 9:03am UTC](https://forum.rasa.com/t/accessing-rasa-nlu-only-server-from-python-code-using-api/51126 "2022-02-04T09:03:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![E-dC](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@E-dC](https://forum.rasa.com/u/E-dC)\
**Post date:** [February 4, 2022, 2:27pm UTC](https://forum.rasa.com/t/accessing-rasa-nlu-only-server-from-python-code-using-api/51126/2 "2022-02-04T14:27:30Z")

</div>

Hi @sandeeppandey456 ,

The following should work, it looks like the issue was that you used `"message"` in your `payload` instead of `"text"`:

```auto
text = str(input("Enter the message"))
payload = {"sender": "Rasa","text": text})
headers = {'content-type': 'application/json'}
response = requests.post('http://10.101.1.239:5005/model/parse', json=payload, headers=headers)
response = response.json()
print("response :\n",response)

```

That being said, I’m not sure the server will send back the `sender_id` bit. You could try with `message_id`: [Rasa Open Source Documentation](https://rasa.com/docs/rasa/pages/http-api#operation/parseModelMessage)

Alternatively, you could load a NLU model directly in your code: see [Using nlu model with Interpreter.load in Rasa 3.0 - #8 by isgaal](http://forum.rasa.com/t/using-nlu-model-with-interpreter-load-in-rasa-3-0/50460/8)

Hope that helps

---

_[View the full topic](https://forum.rasa.com/t/accessing-rasa-nlu-only-server-from-python-code-using-api/51126)._
