跳转到主要内容

章节Cloudflare 开发者文档(免费档)

Ai Gateway

103 页更新于 2 天前

开始阅读

本章内容103

  1. 01 Changelog import { ProductChangelog } from "~/components"; 2 天前
  2. 02 Architectures import { GlossaryTooltip, ResourcesBySelector } from "~/components"; Learn how you can use AI Gateway withi... 2 天前
  3. 03 Getting started import { Details, DirectoryListing, LinkButton, Render, TabItem, Tabs, } from "~/components"; In this guide... 2 天前
  4. 04 Header Glossary import { Glossary } from "~/components"; AI Gateway supports a variety of headers to help you configure, cu... 2 天前
  5. 05 Cloudflare AI Gateway import { CardGrid, Description, Feature, LinkTitleCard, Plan, RelatedProduct, } from "~/components"; Observ... 2 天前
  6. 06 Authenticated Gateway AI Gateway requires a valid Cloudflare API token for each request. This prevents unauthorized access and pr... 2 天前
  7. 07 BYOK (Store Keys) import { CardGrid, LinkTitleCard } from "~/components"; Introduction Bring your own keys (BYOK) is a featur... 2 天前
  8. 08 Cloudflare Access Protect your gateway with Cloudflare Access so users authenticate with your identity provider before they c... 2 天前
  9. 09 Custom costs import { TabItem, Tabs } from "~/components"; AI Gateway allows you to set custom costs at the request leve... 2 天前
  10. 10 Custom domains import { CURL } from "~/components"; Custom domains let you send AI Gateway requests through a hostname tha... 2 天前
  11. 11 Custom Providers import { Render, TabItem, Tabs } from "~/components"; Overview Custom Providers allow you to integrate AI p... 2 天前
  12. 12 Fallbacks import { Render } from "~/components"; Specify model or provider fallbacks with your Universal endpoint to ... 2 天前
  13. 13 Configuration import { DirectoryListing } from "~/components"; Configure your AI Gateway with multiple options and custom... 2 天前
  14. 14 Manage gateways import { Render } from "~/components"; You have several different options for managing an AI Gateway. Creat... 2 天前
  15. 15 Request handling :::note Dynamic Routing also offers timeouts and retries per model, along with conditional routing, rate li... 2 天前
  16. 16 Add Human Feedback using API import { APIRequest } from "~/components"; This guide will walk you through the steps of adding human feedb... 2 天前
  17. 17 Add human feedback using Worker Bindings This guide explains how to provide human feedback for AI Gateway evaluations using Worker bindings. 1. Run ... 2 天前
  18. 18 Add Human Feedback using Dashboard import { DashButton } from "~/components"; Human feedback is a valuable metric to assess the performance of... 2 天前
  19. 19 Evaluations import { Aside } from "~/components"; Evaluations are deprecated and no longer supported for new accounts.... 2 天前
  20. 20 Set up Evaluations import { Aside } from "~/components"; Evaluations are deprecated and no longer supported for new accounts.... 2 天前
  21. 21 Auto Router import { Details, TabItem, Tabs, TypeScriptExample } from "~/components"; AI Gateway Auto Router automatica... 2 天前
  22. 22 Caching import { Render, TabItem, Tabs } from "~/components"; When caching is enabled, AI Gateway can cache respons... 2 天前
  23. 23 Features import { CardGrid, Feature, LinkTitleCard, Badge } from "~/components"; AI Gateway provides a comprehensive... 2 天前
  24. 24 Machine Payments (x402) import { Steps } from "~/components"; Machine Payments allows clients to pay for inference calls to select ... 2 天前
  25. 25 Rate limiting import { TabItem, Tabs } from "~/components"; Rate limiting controls the traffic that reaches your applicat... 2 天前
  26. 26 Spend limits import { Steps } from "~/components"; Spend limits let you set cost-based budgets on your AI Gateway. When ... 2 天前
  27. 27 Unified Billing import { DashButton, Render, Steps, TabItem, Tabs } from "~/components"; Unified Billing allows users to ca... 2 天前
  28. 28 Data Loss Prevention (DLP) import { Feature } from "~/components"; Data Loss Prevention (DLP) for AI Gateway helps protect your organi... 2 天前
  29. 29 Set up Data Loss Prevention (DLP) import { APIRequest, Render } from "~/components"; Add Data Loss Prevention (DLP) to any AI Gateway to star... 2 天前
  30. 30 Dynamic routing import { CardGrid, LinkTitleCard, YouTube } from "~/components"; Introduction Dynamic routing enables you t... 2 天前
  31. 31 JSON Configuration Instead of using the dashboard editor UI to define the route graph, you can do it using the REST API. Route... 2 天前
  32. 32 Using a dynamic route :::caution Ensure your gateway has authentication turned on and you have your upstream providers keys store... 2 天前
  33. 33 Guardrails import { CardGrid, LinkTitleCard, YouTube } from "~/components"; Guardrails help you deploy AI applications... 2 天前
  34. 34 Set up Guardrails import { APIRequest } from "~/components"; Add Guardrails to any gateway to start evaluating and potentiall... 2 天前
  35. 35 Supported model types AI Gateway's Guardrails detects the type of AI model being used and applies safety checks accordingly: Text... 2 天前
  36. 36 Usage considerations Guardrails currently uses Llama Guard 3 8B on Workers AI to perform content evaluations. The underlying mod... 2 天前
  37. 37 Set up Workers AI with AI Gateway import { Render, PackageManagers, WranglerConfig } from "~/components"; This guide will walk you through se... 2 天前
  38. 38 Pi AI import { PackageManagers, TypeScriptExample, WranglerConfig, } from "~/components"; To call AI Gateway from... 2 天前
  39. 39 Vercel AI SDK import { PackageManagers, TypeScriptExample, WranglerConfig, } from "~/components"; To call AI Gateway from... 2 天前
  40. 40 Android Studio import { Steps } from "~/components"; Android Studio supports custom model providers through its built-in A... 2 天前
  41. 41 Claude Code import { Tabs, TabItem, Steps } from "~/components"; By pointing Claude Code at AI Gateway instead of a pro... 2 天前
  42. 42 Claude Desktop import { Steps } from "~/components"; By pointing Claude Desktop at AI Gateway instead of Anthropic directl... 2 天前
  43. 43 Cursor import { Steps } from "~/components"; Cursor supports a custom OpenAI base URL for models that use a custom... 2 天前
  44. 44 Gemini CLI import { Steps } from "~/components"; Gemini CLI supports a custom Google Gemini API base URL. Point it at ... 2 天前
  45. 45 GitHub Copilot CLI import { Tabs, TabItem, Steps } from "~/components"; GitHub Copilot CLI supports bring-your-own-key (BYOK) ... 2 天前
  46. 46 Coding agents import { Steps, DashButton } from "~/components"; Coding agents send model requests to a provider on your b... 2 天前
  47. 47 OpenAI Codex import { Tabs, TabItem, Steps } from "~/components"; OpenAI Codex is a coding agent you run in your termina... 2 天前
  48. 48 OpenCode import { Steps, Tabs, TabItem } from "~/components"; OpenCode is an open source coding agent that supports ... 2 天前
  49. 49 Pi import { Tabs, TabItem, Steps } from "~/components"; Pi is a coding agent you run in your terminal. It has ... 2 天前
  50. 50 Visual Studio Code import { Steps, RuleID } from "~/components"; Visual Studio Code supports custom endpoint models for chat. ... 2 天前
  51. 51 Xcode import { Steps } from "~/components"; Xcode supports internet-hosted chat providers that use the OpenAI Cha... 2 天前
  52. 52 Analytics import { Render, TabItem, Tabs } from "~/components"; Your AI Gateway dashboard shows metrics on requests, ... 2 天前
  53. 53 Costs Cost metrics are only available for endpoints where the models return token data and the model name in thei... 2 天前
  54. 54 Custom metadata import { TypeScriptExample } from "~/components"; Custom metadata in AI Gateway allows you to tag requests ... 2 天前
  55. 55 Observability import { DirectoryListing } from "~/components"; Observability is the practice of instrumenting systems to ... 2 天前
  56. 56 Log classification import { DashButton, Steps } from "~/components"; Log classification analyzes the request and response cont... 2 天前
  57. 57 OpenTelemetry AI Gateway supports exporting traces to OpenTelemetry-compatible backends, enabling you to monitor and anal... 2 天前
  58. 58 User Insights The User Insights dashboard shows how much your organization spends on AI, which identities are responsible... 2 天前
  59. 59 Logging import { Render } from "~/components"; Logs help you monitor requests and troubleshoot application issues. ... 2 天前
  60. 60 Legacy Logs :::note[Account eligibility] Legacy Logs applies only to AI Gateway customers who created a gateway before ... 2 天前
  61. 61 Logpush import { Render, Tabs, TabItem } from "~/components"; AI Gateway allows you to securely export logs to an e... 2 天前
  62. 62 Audit logs import { DashButton } from "~/components"; Audit logs provide a comprehensive summary of changes made withi... 2 天前
  63. 63 Platform import { DirectoryListing } from "~/components"; 2 天前
  64. 64 Limits import { Render } from "~/components"; The following limits apply to gateway configurations, logs, and rela... 2 天前
  65. 65 Pricing AI Gateway is available to use on all plans. AI Gateway's core features available today are offered for fre... 2 天前
  66. 66 Troubleshooting This page covers common issues when using AI Gateway. For provider-specific troubleshooting, refer to the r... 2 天前
  67. 67 Create your first AI Gateway using Workers AI import { Render } from "~/components"; This tutorial guides you through creating your first AI Gateway usin... 2 天前
  68. 68 Tutorials import { GlossaryTooltip, ListTutorials } from "~/components"; View tutorials to help you get started with ... 2 天前
  69. 69 Use Pruna P-video through AI Gateway import { Render } from "~/components"; This tutorial shows how to call the Pruna's P-video model on Replica... 2 天前
  70. 70 Unified API (OpenAI compat) import { Details, Tabs, TabItem } from " /components"; import CodeSnippets from "/components/ai-gateway/cod... 2 天前
  71. 71 Using AI Gateway 2 天前
  72. 72 REST API The REST API lets you call any model — whether hosted on Cloudflare or by a third-party provider like OpenA... 2 天前
  73. 73 Universal Endpoint (Deprecated) import { Render, Badge, WranglerConfig } from "~/components"; :::caution[Deprecated] The Universal Endpoint... 2 天前
  74. 74 Web Search import { TypeScriptExample } from "~/components"; AI Gateway proxies native web search tools from supported... 2 天前
  75. 75 Workers Bindings import { Render, TypeScriptExample, WranglerConfig } from "~/components"; The AI binding ( env.AI) lets you... 2 天前
  76. 76 Anthropic import { Render, Details, Tabs, TabItem, Aside } from "~/components"; Anthropic helps build reliable, inter... 2 天前
  77. 77 Azure OpenAI Azure OpenAI allows you apply natural language algorithms on your data. Endpoint https://gateway.ai.cloudfl... 2 天前
  78. 78 Baseten import { Render, Tabs, TabItem } from "~/components"; Baseten provides infrastructure for building and depl... 2 天前
  79. 79 Amazon Bedrock import { Details, Tabs, TabItem } from "~/components"; Amazon Bedrock allows you to build and scale generat... 2 天前
  80. 80 Cartesia Cartesia provides advanced text-to-speech services with customizable voice models. Endpoint https://gateway... 2 天前
  81. 81 Cerebras import { Render } from "~/components"; Cerebras offers developers a low-latency solution for AI model infer... 2 天前
  82. 82 Cohere import { Render } from "~/components"; Cohere build AI models designed to solve real-world business challen... 2 天前
  83. 83 Deepgram Deepgram provides Voice AI APIs for speech-to-text, text-to-speech, and voice agents. :::note Deepgram is a... 2 天前
  84. 84 DeepSeek import { Render } from "~/components"; DeepSeek helps you build quickly with DeepSeek's advanced AI models.... 2 天前
  85. 85 ElevenLabs ElevenLabs offers advanced text-to-speech services, enabling high-quality voice synthesis in multiple langu... 2 天前
  86. 86 Fal AI Fal AI provides access to 600+ production-ready generative media models through a single, unified API. The ... 2 天前
  87. 87 Google AI Studio import { Render, Details, Tabs, TabItem } from "~/components"; Google AI Studio helps you build quickly wit... 2 天前
  88. 88 xAI import { Render } from "~/components"; Endpoint https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_... 2 天前
  89. 89 Groq import { Render } from "~/components"; Groq delivers high-speed processing and low-latency performance. End... 2 天前
  90. 90 HuggingFace HuggingFace helps users build, deploy and train machine learning models. Endpoint https://gateway.ai.cloudf... 2 天前
  91. 91 Ideogram import { Tabs, TabItem } from "~/components"; Ideogram provides advanced text-to-image generation models wi... 2 天前
  92. 92 Provider Native Here is a quick list of the providers we support: import { DirectoryListing } from "~/components"; 2 天前
  93. 93 Mistral AI import { Render } from "~/components"; Mistral AI helps you build quickly with Mistral's advanced AI models... 2 天前
  94. 94 OpenAI import { Details, Tabs, TabItem } from "~/components"; OpenAI helps you build with GPT models. Endpoint Bas... 2 天前
  95. 95 OpenRouter OpenRouter is a platform that provides a unified interface for accessing and using large language models (L... 2 天前
  96. 96 Parallel import { Render } from "~/components"; Parallel is a web API purpose-built for AIs, providing production-re... 2 天前
  97. 97 Perplexity import { Render } from "~/components"; Perplexity is an AI powered answer engine. Endpoint https://gateway.... 2 天前
  98. 98 Replicate Replicate runs and fine tunes open-source models. Endpoint https://gateway.ai.cloudflare.com/v1/{account_id... 2 天前
  99. 99 Google Vertex AI Google Vertex AI enables developers to easily build and deploy enterprise ready generative AI experiences. ... 2 天前
  100. 100 Workers AI import { TypeScriptExample } from "~/components"; Use AI Gateway as a unified control layer for Workers AI ... 2 天前
  101. 101 WebSockets API The AI Gateway WebSockets API provides a persistent connection for AI interactions, eliminating repeated ha... 2 天前
  102. 102 Non-realtime WebSockets API The Non-realtime WebSockets API allows you to establish persistent connections for AI requests without requ... 2 天前
  103. 103 Realtime WebSockets API Some AI providers support real-time, low-latency interactions over WebSockets. AI Gateway allows seamless i... 2 天前