@@ -13,7 +13,7 @@ const client = new OpenRouter({
1313 apiKey: process .env .OPENROUTER_API_KEY
1414});
1515
16- const response = await client .chat .completions . create ({
16+ const response = await client .chat .send ({
1717 model: " minimax/minimax-m2" ,
1818 messages: [
1919 { role: " user" , content: " Explain quantum computing" }
@@ -29,7 +29,7 @@ The SDK is automatically generated from OpenRouter's OpenAPI specs and updated w
2929
3030``` typescript
3131// When new models launch, they're available instantly
32- const response = await client .chat .completions . create ({
32+ const response = await client .chat .send ({
3333 model: " minimax/minimax-m2" ,
3434});
3535```
@@ -39,7 +39,7 @@ const response = await client.chat.completions.create({
3939Every parameter, response field, and configuration option is fully typed. Invalid configurations are caught at compile time, not in production.
4040
4141``` typescript
42- const response = await client .chat .completions . create ({
42+ const response = await client .chat .send ({
4343 model: " minimax/minimax-m2" ,
4444 messages: [
4545 { role: " user" , content: " Hello" }
@@ -61,7 +61,7 @@ const response = await client.chat.completions.create({
6161** Type-safe streaming:**
6262
6363``` typescript
64- const stream = await client .chat .completions . create ({
64+ const stream = await client .chat .send ({
6565 model: " minimax/minimax-m2" ,
6666 messages: [{ role: " user" , content: " Write a story" }],
6767 stream: true
@@ -90,7 +90,7 @@ const client = new OpenRouter({
9090 apiKey: process .env .OPENROUTER_API_KEY
9191});
9292
93- const response = await client .chat .completions . create ({
93+ const response = await client .chat .send ({
9494 model: " minimax/minimax-m2" ,
9595 messages: [
9696 { role: " user" , content: " Hello!" }
0 commit comments