# InferenceSession | ONNX Runtime JavaScript API
Documentation for ONNX Runtime JavaScript API

Represent a runtime instance of an ONNX model.

### Hierarchy

- InferenceSession

## Index

### Properties

- inputNames
- outputNames

### Methods

- endProfiling
- run
- startProfiling

## Properties

### Readonly inputNames

inputNames: readonly string[]

- Defined in inference-session.ts:311

Get input names of the loaded model.

### Readonly outputNames

outputNames: readonly string[]

- Defined in inference-session.ts:316

Get output names of the loaded model.

## Methods

### endProfiling

- endProfiling(): void

- - Defined in inference-session.ts:302

  End profiling.

  #### Returns void

### run

- run(feeds: OnnxValueMapType, options?: RunOptions ): Promise< OnnxValueMapType >
- run(feeds: OnnxValueMapType, fetches: FetchesType, options?: RunOptions ): Promise< OnnxValueMapType >

- - Defined in inference-session.ts:276

  Execute the model asynchronously with the given feeds and options.

  #### Parameters

  - ##### feeds: OnnxValueMapType

    Representation of the model input. See type description of `InferenceSession.InputType` for detail.

  - ##### Optional options: RunOptions

    Optional. A set of options that controls the behavior of model inference.

  #### Returns Promise< OnnxValueMapType >

  A promise that resolves to a map, which uses output names as keys and OnnxValue as corresponding values.

- - Defined in inference-session.ts:287

  Execute the model asynchronously with the given feeds, fetches and options.

  #### Parameters

  - ##### feeds: OnnxValueMapType

    Representation of the model input. See type description of `InferenceSession.InputType` for detail.

  - ##### fetches: FetchesType

    Representation of the model output. See type description of `InferenceSession.OutputType` for detail.

  - ##### Optional options: RunOptions

    Optional. A set of options that controls the behavior of model inference.

  #### Returns Promise< OnnxValueMapType >

  A promise that resolves to a map, which uses output names as keys and OnnxValue as corresponding values.

### startProfiling

- startProfiling(): void

- - Defined in inference-session.ts:297

  Start profiling.

  #### Returns void

Generated using TypeDoc