---
title: "Create Model Session"
method: POST
path: "/api/v1/session/modelsession"
tags: ["Session"]
---

# Create Model Session

`POST /api/v1/session/modelsession`

Create a session with a provider using a model ID and associate it with the API key.

This endpoint creates a session and automatically associates it with the API key used for authentication.
Each API key can have at most one active session at a time.

## Query parameters

- `model_id` string, required — The blockchain ID (hex) of the model to create a session for

## Request body

- SessionDataRequest
  - `sessionDuration` integer
  - `directPayment` boolean
  - `failover` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/morpheusais/apis/morpheus-api-gateway.md) · [All operations](https://skmtc.dev/morpheusais/apis/morpheus-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/morpheusais/morpheus-api-gateway/revisions/061297d1593b/schema)
