live
MODEL IDzai-glm-5-1

GLM-5.1

Z.ai
by 200K context

GLM-5.1 is Z.ai’s flagship language model for agentic engineering, coding, reasoning, and tool-driven workflows. It supports a 200K token context window with up to 128K output tokens, deep thinking, function calling, structured output, and streaming tool calls, and is designed to stay effective over long multi-step sessions rather than only short-horizon tasks.

GLM-5.1

text-generation

Board Cyber Incident Briefing$0.0019~15s
**What Happened**
On Monday afternoon, an employee in our billing department entered their login credentials into a fraudulent website. Using these stolen credentials, the attacker accessed the employee’s email inbox and attempted to reach a shared finance folder. Our security controls blocked access to the finance folder. At 02:14 Tuesday, automated monitoring detected unusual login activity on our remote-access gateway. The security team disabled external access at 02:31 and isolated two employee laptops. 

**Current Impact**
We have confirmed that the attacker accessed one email inbox containing approximately 1,840 emails. A privacy review is currently underway to determine whether any of those emails contained protected health information; we do not yet have the results of that review. We have confirmed that the attacker did not access electronic health records, clinical systems, payment-card data, or patient portals. Clinical operations continued without interruption throughout the incident.

**Next Steps**
We restored remote access on Wednesday at 09:00, requiring all users to reset their passwords and now mandating phishing-resistant multifactor authentication. Outside counsel and our cyber insurer are engaged. The forensic review is expected to conclude within ten business days, which will inform864 our regulatory notification requirements based on the outcome of the ongoing privacy review.

**Board-Level Oversight Questions:**
1. What is our timeline and process for deciding regulatory and individual notifications if the privacy review finds protected health information in the compromised emails?
2. How will we validate that the new phishing-resistant multifactor authentication is effectively adopted and functioning across the organization?
3. What updates do we expect, and when, from the forensic investigation prior to its full conclusion in ten business days?
Finish reason: stop
Try in Playground
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'zai:glm@5.1',
  settings: {
    thinkingLevel: 'none'
  },
  messages: [
    {
      role: 'user',
      content: 'I need to brief the board of North Valley Health after a contained cybersecurity incident. Here are the verified facts: At 02:14 Tuesday, monitoring detected unusual authentication attempts against the remote-access gateway. The security team disabled external access at 02:31 and isolated two employee laptops. Investigation found that one billing employee entered credentials into a phishing site on Monday afternoon. The attacker used that account to access an email inbox and attempted to reach a shared finance folder, but endpoint controls blocked the attempt. There is currently no evidence that electronic health records, clinical systems, payment-card data, or patient portals were accessed. Approximately 1,840 emails in the compromised inbox may have been visible; a privacy review is determining whether any contained protected health information. Passwords and active sessions were reset for all remote-access users. Remote access resumed Wednesday at 09:00 with phishing-resistant multifactor authentication required. Clinical operations continued without interruption. Outside counsel and the cyber insurer are engaged. The forensic review should conclude within ten business days. Do not speculate beyond these facts.'
    },
    {
      role: 'assistant',
      content: 'Understood. Should the briefing emphasize technical chronology, regulatory exposure, or the decisions and oversight expected from the board?'
    },
    {
      role: 'user',
      content: 'Create a calm, plain-English board briefing with three short sections: What Happened, Current Impact, and Next Steps. Keep it under 350 words, distinguish confirmed facts from the open privacy review, avoid technical jargon and reassurance that cannot be supported, and end with exactly three board-level oversight questions.'
    }
  ]
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "zai:glm@5.1",
            "settings": {
                "thinkingLevel": "none"
            },
            "messages": [
                {
                    "role": "user",
                    "content": "I need to brief the board of North Valley Health after a contained cybersecurity incident. Here are the verified facts: At 02:14 Tuesday, monitoring detected unusual authentication attempts against the remote-access gateway. The security team disabled external access at 02:31 and isolated two employee laptops. Investigation found that one billing employee entered credentials into a phishing site on Monday afternoon. The attacker used that account to access an email inbox and attempted to reach a shared finance folder, but endpoint controls blocked the attempt. There is currently no evidence that electronic health records, clinical systems, payment-card data, or patient portals were accessed. Approximately 1,840 emails in the compromised inbox may have been visible; a privacy review is determining whether any contained protected health information. Passwords and active sessions were reset for all remote-access users. Remote access resumed Wednesday at 09:00 with phishing-resistant multifactor authentication required. Clinical operations continued without interruption. Outside counsel and the cyber insurer are engaged. The forensic review should conclude within ten business days. Do not speculate beyond these facts."
                },
                {
                    "role": "assistant",
                    "content": "Understood. Should the briefing emphasize technical chronology, regulatory exposure, or the decisions and oversight expected from the board?"
                },
                {
                    "role": "user",
                    "content": "Create a calm, plain-English board briefing with three short sections: What Happened, Current Impact, and Next Steps. Keep it under 350 words, distinguish confirmed facts from the open privacy review, avoid technical jargon and reassurance that cannot be supported, and end with exactly three board-level oversight questions."
                }
            ]
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "textInference",
      "taskUUID": "3bd09a3b-ccf7-4abe-8b97-828a493d8b07",
      "model": "zai:glm@5.1",
      "settings": {
        "thinkingLevel": "none"
      },
      "messages": [
        {
          "role": "user",
          "content": "I need to brief the board of North Valley Health after a contained cybersecurity incident. Here are the verified facts: At 02:14 Tuesday, monitoring detected unusual authentication attempts against the remote-access gateway. The security team disabled external access at 02:31 and isolated two employee laptops. Investigation found that one billing employee entered credentials into a phishing site on Monday afternoon. The attacker used that account to access an email inbox and attempted to reach a shared finance folder, but endpoint controls blocked the attempt. There is currently no evidence that electronic health records, clinical systems, payment-card data, or patient portals were accessed. Approximately 1,840 emails in the compromised inbox may have been visible; a privacy review is determining whether any contained protected health information. Passwords and active sessions were reset for all remote-access users. Remote access resumed Wednesday at 09:00 with phishing-resistant multifactor authentication required. Clinical operations continued without interruption. Outside counsel and the cyber insurer are engaged. The forensic review should conclude within ten business days. Do not speculate beyond these facts."
        },
        {
          "role": "assistant",
          "content": "Understood. Should the briefing emphasize technical chronology, regulatory exposure, or the decisions and oversight expected from the board?"
        },
        {
          "role": "user",
          "content": "Create a calm, plain-English board briefing with three short sections: What Happened, Current Impact, and Next Steps. Keep it under 350 words, distinguish confirmed facts from the open privacy review, avoid technical jargon and reassurance that cannot be supported, and end with exactly three board-level oversight questions."
        }
      ]
    }
  ]'
runware run zai:glm@5.1 \
  settings.thinkingLevel=none \
  messages.0.role=user \
  messages.0.content="I need to brief the board of North Valley Health after a contained cybersecurity incident. Here are the verified facts: At 02:14 Tuesday, monitoring detected unusual authentication attempts against the remote-access gateway. The security team disabled external access at 02:31 and isolated two employee laptops. Investigation found that one billing employee entered credentials into a phishing site on Monday afternoon. The attacker used that account to access an email inbox and attempted to reach a shared finance folder, but endpoint controls blocked the attempt. There is currently no evidence that electronic health records, clinical systems, payment-card data, or patient portals were accessed. Approximately 1,840 emails in the compromised inbox may have been visible; a privacy review is determining whether any contained protected health information. Passwords and active sessions were reset for all remote-access users. Remote access resumed Wednesday at 09:00 with phishing-resistant multifactor authentication required. Clinical operations continued without interruption. Outside counsel and the cyber insurer are engaged. The forensic review should conclude within ten business days. Do not speculate beyond these facts." \
  messages.1.role=assistant \
  messages.1.content="Understood. Should the briefing emphasize technical chronology, regulatory exposure, or the decisions and oversight expected from the board?" \
  messages.2.role=user \
  messages.2.content="Create a calm, plain-English board briefing with three short sections: What Happened, Current Impact, and Next Steps. Keep it under 350 words, distinguish confirmed facts from the open privacy review, avoid technical jargon and reassurance that cannot be supported, and end with exactly three board-level oversight questions."
{
  "taskType": "textInference",
  "taskUUID": "3bd09a3b-ccf7-4abe-8b97-828a493d8b07",
  "model": "zai:glm@5.1",
  "settings": {
    "thinkingLevel": "none"
  },
  "messages": [
    {
      "role": "user",
      "content": "I need to brief the board of North Valley Health after a contained cybersecurity incident. Here are the verified facts: At 02:14 Tuesday, monitoring detected unusual authentication attempts against the remote-access gateway. The security team disabled external access at 02:31 and isolated two employee laptops. Investigation found that one billing employee entered credentials into a phishing site on Monday afternoon. The attacker used that account to access an email inbox and attempted to reach a shared finance folder, but endpoint controls blocked the attempt. There is currently no evidence that electronic health records, clinical systems, payment-card data, or patient portals were accessed. Approximately 1,840 emails in the compromised inbox may have been visible; a privacy review is determining whether any contained protected health information. Passwords and active sessions were reset for all remote-access users. Remote access resumed Wednesday at 09:00 with phishing-resistant multifactor authentication required. Clinical operations continued without interruption. Outside counsel and the cyber insurer are engaged. The forensic review should conclude within ten business days. Do not speculate beyond these facts."
    },
    {
      "role": "assistant",
      "content": "Understood. Should the briefing emphasize technical chronology, regulatory exposure, or the decisions and oversight expected from the board?"
    },
    {
      "role": "user",
      "content": "Create a calm, plain-English board briefing with three short sections: What Happened, Current Impact, and Next Steps. Keep it under 350 words, distinguish confirmed facts from the open privacy review, avoid technical jargon and reassurance that cannot be supported, and end with exactly three board-level oversight questions."
    }
  ]
}
Response
{
  "taskType": "textInference",
  "taskUUID": "3bd09a3b-ccf7-4abe-8b97-828a493d8b07",
  "text": "**What Happened**\nOn Monday afternoon, an employee in our billing department entered their login credentials into a fraudulent website. Using these stolen credentials, the attacker accessed the employee’s email inbox and attempted to reach a shared finance folder. Our security controls blocked access to the finance folder. At 02:14 Tuesday, automated monitoring detected unusual login activity on our remote-access gateway. The security team disabled external access at 02:31 and isolated two employee laptops. \n\n**Current Impact**\nWe have confirmed that the attacker accessed one email inbox containing approximately 1,840 emails. A privacy review is currently underway to determine whether any of those emails contained protected health information; we do not yet have the results of that review. We have confirmed that the attacker did not access electronic health records, clinical systems, payment-card data, or patient portals. Clinical operations continued without interruption throughout the incident.\n\n**Next Steps**\nWe restored remote access on Wednesday at 09:00, requiring all users to reset their passwords and now mandating phishing-resistant multifactor authentication. Outside counsel and our cyber insurer are engaged. The forensic review is expected to conclude within ten business days, which will inform864 our regulatory notification requirements based on the outcome of the ongoing privacy review.\n\n**Board-Level Oversight Questions:**\n1. What is our timeline and process for deciding regulatory and individual notifications if the privacy review finds protected health information in the compromised emails?\n2. How will we validate that the new phishing-resistant multifactor authentication is effectively adopted and functioning across the organization?\n3. What updates do we expect, and when, from the forensic investigation prior to its full conclusion in ten business days?",
  "cost": 0.0018994,
  "finishReason": "stop"
}

tool-calling

Field Operations Weather Tool Call$0.000342~5s
{
  "taskType": "textInference",
  "taskUUID": "4c0ef575-e6c0-4647-b5e5-edeb32e141d0",
  "cost": 0.0003416,
  "finishReason": "tools",
  "tools": [
    {
      "id": "call_-7255067552496216496",
      "name": "get_weather",
      "input": {
        "location": "Kyoto, Japan",
        "units": "celsius"
      }
    }
  ]
}
Finish reason: tools
Try in Playground
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'zai:glm@5.1',
  messages: [
    {
      role: 'user',
      content: 'We are deciding whether to dispatch a maintenance crew for an outdoor telecommunications tower inspection today.'
    },
    {
      role: 'assistant',
      content: 'Which location should I check, and would you like temperatures in Celsius or Fahrenheit?'
    },
    {
      role: 'user',
      content: 'Get the current weather for Kyoto, Japan, in Celsius.'
    }
  ],
  tools: [
    {
      type: 'function',
      name: 'get_weather',
      description: 'Retrieve the current weather for a requested location.',
      schema: {
        type: 'object'
      }
    }
  ],
  toolChoice: {
    type: 'tool',
    name: 'get_weather'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "zai:glm@5.1",
            "messages": [
                {
                    "role": "user",
                    "content": "We are deciding whether to dispatch a maintenance crew for an outdoor telecommunications tower inspection today."
                },
                {
                    "role": "assistant",
                    "content": "Which location should I check, and would you like temperatures in Celsius or Fahrenheit?"
                },
                {
                    "role": "user",
                    "content": "Get the current weather for Kyoto, Japan, in Celsius."
                }
            ],
            "tools": [
                {
                    "type": "function",
                    "name": "get_weather",
                    "description": "Retrieve the current weather for a requested location.",
                    "schema": {
                        "type": "object"
                    }
                }
            ],
            "toolChoice": {
                "type": "tool",
                "name": "get_weather"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "textInference",
      "taskUUID": "4c0ef575-e6c0-4647-b5e5-edeb32e141d0",
      "model": "zai:glm@5.1",
      "messages": [
        {
          "role": "user",
          "content": "We are deciding whether to dispatch a maintenance crew for an outdoor telecommunications tower inspection today."
        },
        {
          "role": "assistant",
          "content": "Which location should I check, and would you like temperatures in Celsius or Fahrenheit?"
        },
        {
          "role": "user",
          "content": "Get the current weather for Kyoto, Japan, in Celsius."
        }
      ],
      "tools": [
        {
          "type": "function",
          "name": "get_weather",
          "description": "Retrieve the current weather for a requested location.",
          "schema": {
            "type": "object"
          }
        }
      ],
      "toolChoice": {
        "type": "tool",
        "name": "get_weather"
      }
    }
  ]'
runware run zai:glm@5.1 \
  messages.0.role=user \
  messages.0.content="We are deciding whether to dispatch a maintenance crew for an outdoor telecommunications tower inspection today." \
  messages.1.role=assistant \
  messages.1.content="Which location should I check, and would you like temperatures in Celsius or Fahrenheit?" \
  messages.2.role=user \
  messages.2.content="Get the current weather for Kyoto, Japan, in Celsius." \
  tools.0.type=function \
  tools.0.name=get_weather \
  tools.0.description="Retrieve the current weather for a requested location." \
  tools.0.schema.type=object \
  toolChoice.type=tool \
  toolChoice.name=get_weather
{
  "taskType": "textInference",
  "taskUUID": "4c0ef575-e6c0-4647-b5e5-edeb32e141d0",
  "model": "zai:glm@5.1",
  "messages": [
    {
      "role": "user",
      "content": "We are deciding whether to dispatch a maintenance crew for an outdoor telecommunications tower inspection today."
    },
    {
      "role": "assistant",
      "content": "Which location should I check, and would you like temperatures in Celsius or Fahrenheit?"
    },
    {
      "role": "user",
      "content": "Get the current weather for Kyoto, Japan, in Celsius."
    }
  ],
  "tools": [
    {
      "type": "function",
      "name": "get_weather",
      "description": "Retrieve the current weather for a requested location.",
      "schema": {
        "type": "object"
      }
    }
  ],
  "toolChoice": {
    "type": "tool",
    "name": "get_weather"
  }
}
Response
{
  "taskType": "textInference",
  "taskUUID": "4c0ef575-e6c0-4647-b5e5-edeb32e141d0",
  "cost": 0.0003416,
  "finishReason": "tools",
  "tools": [
    {
      "id": "call_-7255067552496216496",
      "name": "get_weather",
      "input": {
        "location": "Kyoto, Japan",
        "units": "celsius"
      }
    }
  ]
}

text-generation

Boutique Hotel Loan Credit Memo$0.00257~22s
The proposed transaction involves a $7.4 million senior loan to facilitate the $12.4 million acquisition of Harbor House, a 42-room independent boutique hotel in Portland, Maine. The loan is structured as a 7.1% fixed-rate facility with a five-year term and 25-year amortization, generating $633,000 in annual debt service. At the stated stabilized NOI of $1.02 million, the transaction yields a 1.61x Debt Service Coverage Ratio (DSCR) and a 56.5% Loan-to-Value (LTV) based on the $13.1 million appraisal, providing adequate cushion relative to the proposed 1.35x DSCR and 65% LTV covenants. The sponsor is contributing $5.0 million in cash equity, achieving a prudent 40.3% Loan-to-Cost (LTC), and will fund the $650,000 first-year room renovation program entirely from additional equity outside the acquisition contribution, preserving the property’s debt service capacity.

The credit is supported by several principal strengths. The sponsor’s operational platform includes two comparable New England hotels, providing relevant domain expertise, and the principals possess a combined net worth of $28 million with $6.2 million in liquidity, offering substantial recourse support through the provided completion and limited payment guaranties. Furthermore, the trailing-12-month revenue of $4.05 million translates to an ADR of $238, indicating healthy pricing power for the asset class, while the covenants requiring quarterly reporting and lender approval for distributions while DSCR is below 1.50x provide necessary oversight to protect the lender’s position against potential cash flow deterioration. 

Material risks include the property’s reliance on leisure travel, inherent seasonal demand volatility characteristic of the New England market, and current occupancy at 71%, which provides limited upside and heightens vulnerability to macroeconomic or discretionary spending headwinds. These risks are partially mitigated by the established cash flow margin, as stabilized NOI comfortably exceeds the 1.50x distribution threshold, and the structural protections embedded in the guaranties and covenant package. Given the adequate historical and stabilized debt yield, conservative loan-to-cost and loan-to-value metrics, strong sponsorship, and appropriate credit safeguards, the recommended disposition is to **Approve** the facility as requested.
Finish reason: stop
Try in Playground
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'zai:glm@5.1',
  settings: {
    thinkingLevel: 'none'
  },
  messages: [
    {
      role: 'user',
      content: 'I am underwriting the acquisition of Harbor House, a 42-room independent boutique hotel in Portland, Maine. Purchase price is $12.4 million, with a requested senior loan of $7.4 million at 7.1% fixed for five years, amortized over 25 years. Trailing-12-month revenue is $4.05 million, stabilized NOI is $1.02 million, occupancy is 71%, and ADR is $238. The appraisal values the property at $13.1 million. The sponsor operates two comparable New England hotels and will contribute $5 million in cash. Key concerns are seasonal demand, reliance on leisure travel, and $650,000 of planned room renovations during the first year.'
    },
    {
      role: 'assistant',
      content: 'Before drafting the recommendation, please clarify projected debt service, renovation funding, guarantor support, and any proposed operating covenants.'
    },
    {
      role: 'user',
      content: 'Annual debt service is projected at $633,000, giving a 1.61x DSCR on stabilized NOI. Renovations will be funded entirely from sponsor equity outside the acquisition contribution. The principals have a combined net worth of $28 million and liquidity of $6.2 million, and they will provide a completion guaranty plus a limited payment guaranty. Proposed covenants are minimum 1.35x DSCR, maximum 65% LTV, quarterly reporting, and lender approval for distributions while DSCR is below 1.50x. Write a three-paragraph credit recommendation for the loan committee covering the transaction, principal strengths, material risks and mitigants, and a clear approve-or-decline conclusion. Use a restrained institutional tone and rely only on the information provided.'
    }
  ]
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "zai:glm@5.1",
            "settings": {
                "thinkingLevel": "none"
            },
            "messages": [
                {
                    "role": "user",
                    "content": "I am underwriting the acquisition of Harbor House, a 42-room independent boutique hotel in Portland, Maine. Purchase price is $12.4 million, with a requested senior loan of $7.4 million at 7.1% fixed for five years, amortized over 25 years. Trailing-12-month revenue is $4.05 million, stabilized NOI is $1.02 million, occupancy is 71%, and ADR is $238. The appraisal values the property at $13.1 million. The sponsor operates two comparable New England hotels and will contribute $5 million in cash. Key concerns are seasonal demand, reliance on leisure travel, and $650,000 of planned room renovations during the first year."
                },
                {
                    "role": "assistant",
                    "content": "Before drafting the recommendation, please clarify projected debt service, renovation funding, guarantor support, and any proposed operating covenants."
                },
                {
                    "role": "user",
                    "content": "Annual debt service is projected at $633,000, giving a 1.61x DSCR on stabilized NOI. Renovations will be funded entirely from sponsor equity outside the acquisition contribution. The principals have a combined net worth of $28 million and liquidity of $6.2 million, and they will provide a completion guaranty plus a limited payment guaranty. Proposed covenants are minimum 1.35x DSCR, maximum 65% LTV, quarterly reporting, and lender approval for distributions while DSCR is below 1.50x. Write a three-paragraph credit recommendation for the loan committee covering the transaction, principal strengths, material risks and mitigants, and a clear approve-or-decline conclusion. Use a restrained institutional tone and rely only on the information provided."
                }
            ]
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "textInference",
      "taskUUID": "e092cd48-03c1-49d1-8daf-02481caf1a76",
      "model": "zai:glm@5.1",
      "settings": {
        "thinkingLevel": "none"
      },
      "messages": [
        {
          "role": "user",
          "content": "I am underwriting the acquisition of Harbor House, a 42-room independent boutique hotel in Portland, Maine. Purchase price is $12.4 million, with a requested senior loan of $7.4 million at 7.1% fixed for five years, amortized over 25 years. Trailing-12-month revenue is $4.05 million, stabilized NOI is $1.02 million, occupancy is 71%, and ADR is $238. The appraisal values the property at $13.1 million. The sponsor operates two comparable New England hotels and will contribute $5 million in cash. Key concerns are seasonal demand, reliance on leisure travel, and $650,000 of planned room renovations during the first year."
        },
        {
          "role": "assistant",
          "content": "Before drafting the recommendation, please clarify projected debt service, renovation funding, guarantor support, and any proposed operating covenants."
        },
        {
          "role": "user",
          "content": "Annual debt service is projected at $633,000, giving a 1.61x DSCR on stabilized NOI. Renovations will be funded entirely from sponsor equity outside the acquisition contribution. The principals have a combined net worth of $28 million and liquidity of $6.2 million, and they will provide a completion guaranty plus a limited payment guaranty. Proposed covenants are minimum 1.35x DSCR, maximum 65% LTV, quarterly reporting, and lender approval for distributions while DSCR is below 1.50x. Write a three-paragraph credit recommendation for the loan committee covering the transaction, principal strengths, material risks and mitigants, and a clear approve-or-decline conclusion. Use a restrained institutional tone and rely only on the information provided."
        }
      ]
    }
  ]'
runware run zai:glm@5.1 \
  settings.thinkingLevel=none \
  messages.0.role=user \
  messages.0.content="I am underwriting the acquisition of Harbor House, a 42-room independent boutique hotel in Portland, Maine. Purchase price is \$12.4 million, with a requested senior loan of \$7.4 million at 7.1% fixed for five years, amortized over 25 years. Trailing-12-month revenue is \$4.05 million, stabilized NOI is \$1.02 million, occupancy is 71%, and ADR is \$238. The appraisal values the property at \$13.1 million. The sponsor operates two comparable New England hotels and will contribute \$5 million in cash. Key concerns are seasonal demand, reliance on leisure travel, and \$650,000 of planned room renovations during the first year." \
  messages.1.role=assistant \
  messages.1.content="Before drafting the recommendation, please clarify projected debt service, renovation funding, guarantor support, and any proposed operating covenants." \
  messages.2.role=user \
  messages.2.content="Annual debt service is projected at \$633,000, giving a 1.61x DSCR on stabilized NOI. Renovations will be funded entirely from sponsor equity outside the acquisition contribution. The principals have a combined net worth of \$28 million and liquidity of \$6.2 million, and they will provide a completion guaranty plus a limited payment guaranty. Proposed covenants are minimum 1.35x DSCR, maximum 65% LTV, quarterly reporting, and lender approval for distributions while DSCR is below 1.50x. Write a three-paragraph credit recommendation for the loan committee covering the transaction, principal strengths, material risks and mitigants, and a clear approve-or-decline conclusion. Use a restrained institutional tone and rely only on the information provided."
{
  "taskType": "textInference",
  "taskUUID": "e092cd48-03c1-49d1-8daf-02481caf1a76",
  "model": "zai:glm@5.1",
  "settings": {
    "thinkingLevel": "none"
  },
  "messages": [
    {
      "role": "user",
      "content": "I am underwriting the acquisition of Harbor House, a 42-room independent boutique hotel in Portland, Maine. Purchase price is $12.4 million, with a requested senior loan of $7.4 million at 7.1% fixed for five years, amortized over 25 years. Trailing-12-month revenue is $4.05 million, stabilized NOI is $1.02 million, occupancy is 71%, and ADR is $238. The appraisal values the property at $13.1 million. The sponsor operates two comparable New England hotels and will contribute $5 million in cash. Key concerns are seasonal demand, reliance on leisure travel, and $650,000 of planned room renovations during the first year."
    },
    {
      "role": "assistant",
      "content": "Before drafting the recommendation, please clarify projected debt service, renovation funding, guarantor support, and any proposed operating covenants."
    },
    {
      "role": "user",
      "content": "Annual debt service is projected at $633,000, giving a 1.61x DSCR on stabilized NOI. Renovations will be funded entirely from sponsor equity outside the acquisition contribution. The principals have a combined net worth of $28 million and liquidity of $6.2 million, and they will provide a completion guaranty plus a limited payment guaranty. Proposed covenants are minimum 1.35x DSCR, maximum 65% LTV, quarterly reporting, and lender approval for distributions while DSCR is below 1.50x. Write a three-paragraph credit recommendation for the loan committee covering the transaction, principal strengths, material risks and mitigants, and a clear approve-or-decline conclusion. Use a restrained institutional tone and rely only on the information provided."
    }
  ]
}
Response
{
  "taskType": "textInference",
  "taskUUID": "e092cd48-03c1-49d1-8daf-02481caf1a76",
  "text": "The proposed transaction involves a $7.4 million senior loan to facilitate the $12.4 million acquisition of Harbor House, a 42-room independent boutique hotel in Portland, Maine. The loan is structured as a 7.1% fixed-rate facility with a five-year term and 25-year amortization, generating $633,000 in annual debt service. At the stated stabilized NOI of $1.02 million, the transaction yields a 1.61x Debt Service Coverage Ratio (DSCR) and a 56.5% Loan-to-Value (LTV) based on the $13.1 million appraisal, providing adequate cushion relative to the proposed 1.35x DSCR and 65% LTV covenants. The sponsor is contributing $5.0 million in cash equity, achieving a prudent 40.3% Loan-to-Cost (LTC), and will fund the $650,000 first-year room renovation program entirely from additional equity outside the acquisition contribution, preserving the property’s debt service capacity.\n\nThe credit is supported by several principal strengths. The sponsor’s operational platform includes two comparable New England hotels, providing relevant domain expertise, and the principals possess a combined net worth of $28 million with $6.2 million in liquidity, offering substantial recourse support through the provided completion and limited payment guaranties. Furthermore, the trailing-12-month revenue of $4.05 million translates to an ADR of $238, indicating healthy pricing power for the asset class, while the covenants requiring quarterly reporting and lender approval for distributions while DSCR is below 1.50x provide necessary oversight to protect the lender’s position against potential cash flow deterioration. \n\nMaterial risks include the property’s reliance on leisure travel, inherent seasonal demand volatility characteristic of the New England market, and current occupancy at 71%, which provides limited upside and heightens vulnerability to macroeconomic or discretionary spending headwinds. These risks are partially mitigated by the established cash flow margin, as stabilized NOI comfortably exceeds the 1.50x distribution threshold, and the structural protections embedded in the guaranties and covenant package. Given the adequate historical and stabilized debt yield, conservative loan-to-cost and loan-to-value metrics, strong sponsorship, and appropriate credit safeguards, the recommended disposition is to **Approve** the facility as requested.",
  "cost": 0.0025744,
  "finishReason": "stop"
}

tool-calling

Wedding Weekend Weather Tool Call$0.000409~5s
{
  "taskType": "textInference",
  "taskUUID": "bac78203-8d06-4b31-893b-679933774916",
  "cost": 0.0004094,
  "finishReason": "tools",
  "tools": [
    {
      "id": "call_-7255071160268748784",
      "name": "get_weather",
      "input": {
        "location": "Taormina, Sicily, Italy",
        "units": "metric"
      }
    }
  ]
}
Finish reason: tools
Try in Playground
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'zai:glm@5.1',
  messages: [
    {
      role: 'user',
      content: 'I\'m coordinating welcome drinks for a destination wedding in Taormina. The courtyard is beautiful, but the hotel needs our indoor-or-outdoor decision before guests arrive.'
    },
    {
      role: 'assistant',
      content: 'I can help determine whether the courtyard is practical. Do you want current conditions or a forecast, and which temperature units should I use?'
    },
    {
      role: 'user',
      content: 'Current conditions, please. What is the weather right now in Taormina, Sicily, Italy? Use Celsius.'
    }
  ],
  tools: [
    {
      type: 'function',
      name: 'get_weather',
      description: 'Retrieve the current weather for a requested location.',
      schema: {
        type: 'object'
      }
    }
  ],
  toolChoice: {
    type: 'tool',
    name: 'get_weather'
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "zai:glm@5.1",
            "messages": [
                {
                    "role": "user",
                    "content": "I'm coordinating welcome drinks for a destination wedding in Taormina. The courtyard is beautiful, but the hotel needs our indoor-or-outdoor decision before guests arrive."
                },
                {
                    "role": "assistant",
                    "content": "I can help determine whether the courtyard is practical. Do you want current conditions or a forecast, and which temperature units should I use?"
                },
                {
                    "role": "user",
                    "content": "Current conditions, please. What is the weather right now in Taormina, Sicily, Italy? Use Celsius."
                }
            ],
            "tools": [
                {
                    "type": "function",
                    "name": "get_weather",
                    "description": "Retrieve the current weather for a requested location.",
                    "schema": {
                        "type": "object"
                    }
                }
            ],
            "toolChoice": {
                "type": "tool",
                "name": "get_weather"
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "textInference",
      "taskUUID": "bac78203-8d06-4b31-893b-679933774916",
      "model": "zai:glm@5.1",
      "messages": [
        {
          "role": "user",
          "content": "I'm coordinating welcome drinks for a destination wedding in Taormina. The courtyard is beautiful, but the hotel needs our indoor-or-outdoor decision before guests arrive."
        },
        {
          "role": "assistant",
          "content": "I can help determine whether the courtyard is practical. Do you want current conditions or a forecast, and which temperature units should I use?"
        },
        {
          "role": "user",
          "content": "Current conditions, please. What is the weather right now in Taormina, Sicily, Italy? Use Celsius."
        }
      ],
      "tools": [
        {
          "type": "function",
          "name": "get_weather",
          "description": "Retrieve the current weather for a requested location.",
          "schema": {
            "type": "object"
          }
        }
      ],
      "toolChoice": {
        "type": "tool",
        "name": "get_weather"
      }
    }
  ]'
runware run zai:glm@5.1 \
  messages.0.role=user \
  messages.0.content="I'm coordinating welcome drinks for a destination wedding in Taormina. The courtyard is beautiful, but the hotel needs our indoor-or-outdoor decision before guests arrive." \
  messages.1.role=assistant \
  messages.1.content="I can help determine whether the courtyard is practical. Do you want current conditions or a forecast, and which temperature units should I use?" \
  messages.2.role=user \
  messages.2.content="Current conditions, please. What is the weather right now in Taormina, Sicily, Italy? Use Celsius." \
  tools.0.type=function \
  tools.0.name=get_weather \
  tools.0.description="Retrieve the current weather for a requested location." \
  tools.0.schema.type=object \
  toolChoice.type=tool \
  toolChoice.name=get_weather
{
  "taskType": "textInference",
  "taskUUID": "bac78203-8d06-4b31-893b-679933774916",
  "model": "zai:glm@5.1",
  "messages": [
    {
      "role": "user",
      "content": "I'm coordinating welcome drinks for a destination wedding in Taormina. The courtyard is beautiful, but the hotel needs our indoor-or-outdoor decision before guests arrive."
    },
    {
      "role": "assistant",
      "content": "I can help determine whether the courtyard is practical. Do you want current conditions or a forecast, and which temperature units should I use?"
    },
    {
      "role": "user",
      "content": "Current conditions, please. What is the weather right now in Taormina, Sicily, Italy? Use Celsius."
    }
  ],
  "tools": [
    {
      "type": "function",
      "name": "get_weather",
      "description": "Retrieve the current weather for a requested location.",
      "schema": {
        "type": "object"
      }
    }
  ],
  "toolChoice": {
    "type": "tool",
    "name": "get_weather"
  }
}
Response
{
  "taskType": "textInference",
  "taskUUID": "bac78203-8d06-4b31-893b-679933774916",
  "cost": 0.0004094,
  "finishReason": "tools",
  "tools": [
    {
      "id": "call_-7255071160268748784",
      "name": "get_weather",
      "input": {
        "location": "Taormina, Sicily, Italy",
        "units": "metric"
      }
    }
  ]
}