The outcome

Use function calling while preventing prompt injection, cross-tenant access, forged arguments, and autonomous consequential actions.

SiliconCloud is a SiliconFlow generative AI cloud for hosted language, image, audio, video, embedding, and reranking model APIs. Testing and integrating hosted open models for chat, embeddings, reranking, image, audio, and video workloads through a common API surface. This guide narrows that broad capability into one repeatable outcome, with checkpoints that keep the source material and your judgment in the loop.

Before you begin

Set the boundary before the tool starts.

Choose one real task, identify who will use the result, and decide what evidence or test will make the result acceptable. Gather only the source material needed for that task. If the work contains confidential, personal, regulated, or client-owned information, confirm that the platform and account are approved before sharing it.

Troiana principle

AI should make the work easier to inspect. If the workflow removes the source, the owner, or the review step, redesign the workflow.

Step by step

A workflow you can repeat.

  1. 01

    Define an allowlist of narrow tools, user roles, tenant boundaries, argument schemas, data classifications, approval thresholds, side effects, budgets, timeouts, and audit requirements.

  2. 02

    Keep keys server-side, minimize prompts, quote untrusted content as data, use a pinned model, disable arbitrary URLs or code, and never put credentials in tool descriptions or context.

  3. 03

    Parse tool calls as untrusted proposals, reject unknown names and fields, canonicalize and validate arguments, reauthorize against current user state, and request confirmation for side effects.

  4. 04

    Execute through isolated service accounts with idempotency, least privilege, rate and spend limits, then return bounded results without internal secrets or excessive records.

  5. 05

    Test prompt injection, confused deputy, tenant crossover, replay, duplicate calls, malformed JSON, data exfiltration, timeout, provider failure, key rotation, denial, and rollback.

Working standard

What good use looks like.

  • Treat every tool call as untrusted.
  • Authorize outside the model.
  • Require confirmation for side effects.

OpenAI compatibility describes request shape, not equivalent model behavior, moderation, context, licensing, or reliability. SiliconFlow's terms and privacy policy place substantial responsibility on users for Interaction Data and restrict some uses. Verify current commercial and model terms, avoid sensitive or unauthorized data, keep keys private, pin model IDs, moderate output, cap spend and retries, and independently authorize every tool action.

Official references

Check the current product documentation.

Features, plan limits, availability, and data controls change. These official pages are the starting points used for this collection.