> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-docs-3071-org-scoped-api-keys.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# startLLM

> TypeScript SDK リファレンス

> **startLLM**(`opts`): [`LLM`](../interfaces/llm)

現在の Turn の子として LLM span を開始します。アクティブな Turn がない場合は
例外がスローされます。

定義場所: [src/genai/api.ts:77](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/api.ts#L77)

<div id="parameters">
  ## パラメーター
</div>

<div id="opts">
  ### opts
</div>

[`LLMInit`](../interfaces/llminit)

<div id="returns">
  ## 戻り値
</div>

[`LLM`](../interfaces/llm)

<div id="examples">
  ## 例
</div>

```ts twoslash theme={null}
// @noErrors
weave.startLLM({model: 'gpt-4o-mini', providerName: 'openai'});
```

```ts twoslash theme={null}
// @noErrors
weave.startLLM({
  model: 'gpt-4o-mini',
  providerName: 'openai',
  systemInstructions: ['You are a helpful weather bot.'],
  startTime: new Date('2026-05-29T10:00:00.000Z'),
});
```
