# How can I call a model from a Typescript v2 Function or a Python function ? via OSDK?

**URL:** <https://community.palantir.com/t/how-can-i-call-a-model-from-a-typescript-v2-function-or-a-python-function-via-osdk/4394>\
**Category:** Ask the Community\
**Tags:** modeling, osdk, functions\
**Created:** [July 4, 2025, 2:54pm UTC](https://community.palantir.com/t/how-can-i-call-a-model-from-a-typescript-v2-function-or-a-python-function-via-osdk/4394 "2025-07-04T14:54:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VincentF](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@VincentF](https://community.palantir.com/u/VincentF)\
**Post date:** [July 4, 2025, 2:54pm UTC](https://community.palantir.com/t/how-can-i-call-a-model-from-a-typescript-v2-function-or-a-python-function-via-osdk/4394/1 "2025-07-04T14:54:50Z")

</div>

In developer console, I would like to expose a model that is hosted in Foundry.

I can’t import a model directly in OSDK nor in a code repo for v2 functions.

How can I expose this model directly ? If possible ?  
How can I expose a v2 Function that calls itself this model ? If possible ?

---

<div class="post-metadata">

**Author:** ![VincentF](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@VincentF](https://community.palantir.com/u/VincentF)\
**Post date:** [July 4, 2025, 2:55pm UTC](https://community.palantir.com/t/how-can-i-call-a-model-from-a-typescript-v2-function-or-a-python-function-via-osdk/4394/2 "2025-07-04T14:55:53Z")

</div>

You can expose a function from a model directly in the Modeling Objective UI.

 ![image](https://canada1.discourse-cdn.com/palantir/original/2X/9/9e8dc92553277daeee10145e7fb2b17d54408f89.png)

See https://www.palantir.com/docs/foundry/manage-models/create-a-model-deployment#3-publish-a-function-for-the-deployment

Given it is a query, it should be importable, for example, in a Python function.  
See https://www.palantir.com/docs/foundry/functions/functions-on-models#call-a-model-function-from-python-functions

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [July 18, 2025, 2:56pm UTC](https://community.palantir.com/t/how-can-i-call-a-model-from-a-typescript-v2-function-or-a-python-function-via-osdk/4394/3 "2025-07-18T14:56:32Z")

</div>

Closed on July 18, 2025, 2:56pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
