Apidog Docs
๐Ÿ‡บ๐Ÿ‡ธ English
  • ๐Ÿ‡บ๐Ÿ‡ธ English
  • ๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅๆœฌ่ชž
HomeLearning CenterSupport CenterAPI References
HomeLearning CenterSupport CenterAPI References
Discord Community
Slack Community
X / Twitter
๐Ÿ‡บ๐Ÿ‡ธ English
  • ๐Ÿ‡บ๐Ÿ‡ธ English
  • ๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅๆœฌ่ชž
  1. Send requests
  • Apidog Learning Center
  • Get started
    • Introduce Apidog
    • Basic concepts in Apidog
    • Navigating Apidog
    • Quick Start
      • Overview
      • Specify a new endpoint
      • Make a request to the endpoint
      • Add an assertion
      • Create a test scenario
      • Share your API documentation
      • Explore more
      • Send a request and save as an endpoint
    • Migration
      • Overview
      • Manual import
      • Scheduled import
      • Import options
      • Export data
      • Import from...
        • Import from Postman
        • Import OpenAPI (Swagger) spec
        • Import cURL
        • Import Markdowns
        • Import from Insomnia
        • Import from apiDoc
        • Import .har file
        • Import WSDL
  • Design APIs
    • Overview
    • Create a new API project
    • Endpoint basics
    • Components
    • Common fields
    • Global parameters
    • Endpoint change history
    • Batch endpoint management
    • Configure multiple request body examples
    • Schemas
      • Generate Schemas from JSON etc.
      • Build a schema
      • Overview
      • Create a new schema
    • Security schemes
      • Overview
      • Create a security scheme
      • Use the security scheme
      • Security scheme in online documentation
    • Advanced features
      • Custom endpoint fields
      • Import endpoints as test steps
      • Endpoint status
      • Appearance of parameter lists
      • Endpoint unique idenfication
  • Develop and Debug APIs
    • Overview
    • Generate requests
    • Send requests
    • Endpoint cases
    • Dynamic values
    • Validate responses
    • Design-first Mode & Request-first Mode
    • Generate code
    • Environments & variables
      • Overview
      • Using variables
      • Environments & services
    • Vault secrets
      • Overview
      • HashiCorp Vault
      • Azure Key Vault
      • AWS Secrets Manager
    • Pre/Post processors
      • Overview
      • Assertion
      • Extract variable
      • Wait
      • Database operations
        • Overview
        • MongoDB
        • Redis
        • Oracle Client
      • Using scripts
        • Overview
        • Postman scripts reference
        • Pre processor scripts
        • Post processor scripts
        • Public scripts
        • Calling other programming languages
        • Using JS libraries
        • Visualizing responses
        • Script examples
          • Assertion scripts
          • Using variables in scripts
          • Using scripts to modify request messages
          • Other examples
    • Dynamic values Modules
  • Mock API data
    • Overview
    • Smart mock
    • Custom mock
    • Mock priority sequence
    • Mock scripts
    • Cloud mock
    • Self-hosted runner mock
    • Mock language (Locales)
  • Automated tests
    • Overview
    • Test reports
    • Test scenarios
      • Create a test scenario
      • Pass data between requests
      • Flow control conditions
      • Import endpoints/endpoint cases from other projects
      • Sync data from endpoints/endpoint cases
      • Export test scenarios
    • Run test scenarios
      • Run a test scenario
      • Data-driven testing
      • Run test scenarios in batch
      • Scheduled tasks
      • Manage the runtime environment of APIs from other projects
    • Test APIs
      • Integration testing
      • Performance testing
      • End-to-end testing
      • Regression testing
    • Apidog CLI
      • Overview
      • Installing and running Apidog CLI
      • Apidog CLI Options
    • CI/CD
      • Overview
      • Integrate with Jenkins
      • Integration with Gitlab
  • Publish API Docs
    • Overview
    • API Technologies Supported
    • Quick share
    • View the API documentation
    • Publish docs sites
    • Folder tree settings
    • Custom layouts
    • Visibility settings
    • Endpoint SEO settings
    • Custom domain
    • Embedding values in document URLs
    • Documentation Search
    • Integrating Google Analytics with Doc Sites
    • CORS Proxy
    • API Versions
      • Overview
      • Create API versions
      • Publish API versions
      • Share endpoints with API versions
  • Send requests
    • Overview
    • gRPC
    • Use request proxy agents for debugging
    • SOAP/WebService
    • GraphQL
    • WebSocket
    • Socket.IO
    • SSE debugging
    • Create requests
      • Request History
      • Request basics
      • Parameters and body
      • Request headers
      • Request settings
      • HTTP/2
    • Authentication and authorization
      • Overview
      • CA and client certificates
      • Authorization types supported by Apidog
      • Digest Auth
      • OAuth 1.0
      • OAuth 2.0
      • Hawk Authentication
      • Kerberos
      • NTLM
      • Akamai EdgeGrid
    • Response and cookies
      • Overview
      • API response in Apidog
      • Create and send cookies
      • Debug requests
      • Save the request as an endpoint
  • Branches
    • Overview
    • Create a new sprint branch
    • Test APIs in a branch
    • Design API in a branch
    • Merge sprint branches
    • Manage sprint branches
  • Apidog MCP Server
    • Overview
    • Conntect API Specification within Apidog Project to AI via Apidog MCP Server
    • Conntect Online API Documentation Published by Apidog to AI via Apidog MCP Server
    • Conntect OpenAPI Files to AI via Apidog MCP Server
  • Best practices
    • How to handle API signatures
    • How to access OAuth 2.0 protected APIs
    • Apidog collaboration workflow
    • Managing authentication state in Apidog
  • Administration
    • Onboarding Checklist
      • Basic Concepts
      • Onboarding Guide
    • Managing Teams
      • Managing Teams
      • Managing Team Members
      • Member Roles & Permission Settings
      • Team Activities
      • Team Resources
        • General Runner
        • Team Variables
        • Request Proxy Agent
      • Real-time Collaborations
        • Team Collaboration
    • Managing Projects
      • Managing Projects
      • Managing Project Members
      • Notification Settings
      • Project Resources
        • Database Connection
    • Managing Organizations
      • Single Sign-On (SSO)
        • SSO Overview
        • Configure Microsoft Entra ID
        • Configure Okta
        • Configure SSO for an Organization
        • Managing user accounts
        • Mapping Groups to Teams
      • SCIM Provisioning
        • Intro to SCIM Provisioning
        • Microsoft Entra ID
        • Okta
      • Organization Resources
        • Self-hosted Runner
  • Billing
    • Overview
    • Credits
    • Unable to use credit cards?
    • Managing subscriptions
    • Upgrade plan
  • Add-ons
    • API Hub
    • Apidog Intellij IDEA plugin
    • Browser Extension
      • Chrome
      • Microsoft Edge
    • Request Proxy
      • Request proxy in Apidog web
      • Request proxy in shared docs
      • Request proxy in Apidog client
  • Account & preferences
    • Language settings
    • Data backup
    • Network proxy configuration
    • Hot keys
    • Updating Apidog
    • Generate OpenAPI access token
    • Deleting account
    • Account settings
  • References
    • API-Design First Approach
    • Apidog OpenAPI Specificaiton Extensions
    • JSONPath
    • XPath
    • Regular Expressions
    • JSON Schema
    • CSV File Format
    • Install Java Environment
    • Runner deployment environment
    • Apidog flavored Markdown
  • Apidog Europe
    • Apidog Europe
  • Support Center
  1. Send requests

SSE debugging

SSE (Server-Sent Events) is a real-time communication technology built upon the HTTP protocol. It's commonly used when AI models need to stream responses. With SSE, a continuous, one-way connection is established between the client and the server. This allows the server to send real-time updates directly to the client, enabling users to instantly see the thought process of the reasoning models and the generated content.

Initiating an SSE Connection#

Apidog Version Should Be 2.3.10 or higher.
1
Create a New Endpoint
In Apidog, start by creating a new HTTP project. Then, add a new endpoint and enter the URL for the AI model's endpoint.
2
Send the Request
Upon sending the request, if the response header Content-Type includes text/event-stream, Apidog will automatically parse the returned data as SSE events.
3
View Real-time Responses
You can see the real-time messages in the Timeline view of the response panel, where the content can be displayed in natural language.
sse-timeline-auto-merge.gif

Auto-Merge Message#

Apidog Version Should Be 2.6.49 or higher.
Apidog comes with built-in support for popular AI models and can automatically recognize and merge streaming responses in the following formats:
OpenAI API Compatible Format (The vast majority of AI model providers use this format.)
Gemini API Compatible Format
Claude API Compatible Format
Ollama API Compatible Format (AI models deployed locally using Ollama use this format, which is JSON Streaming or NDJSON.)
If the AI model's response matches any of these formats, Apidog will automatically merge message fragments into complete reply.
For certain models, such as DeepSeek R1, Apidog also supports displaying the model's thought process in the timeline, giving you a clearer, more intuitive view of how the AI is reasoning.

Customize Merging Rules#

If the Auto-Merge feature does not work properly, you can take the following measures based on the actual situation:

1. Configure JSONPath Extraction Rules#

When the SSE returns content that is in JSON format but does not conform to the built-in recognition rules of OpenAI, Gemini, Claude, etc., you can manually configure JSONPath to extract the required content. For example, for the following raw SSE response:
data: {"choices":[{"index":0,"message":{"role":"assistant","content":"H"},"logprobs":null,"finish_reason":"stop"}]}

data: {"choices":[{"index":0,"message":{"role":"assistant","content":"i"},"logprobs":null,"finish_reason":"stop"}]}
To extract thecontentfield, use this JSONPath configuration: $.choices[0].message.content.
Hereโ€™s what each part of this JSONPath means:
$ refers to the root of the JSON
choices[0] selects the first element of the choices array
message.content specifies the content attribute under the message object of that element.
This configuration will extract the content:
Hi

2. Use Post Processor Script#

For non-JSON SSE messages, you can:
Use post processor scripts to manually handle the data.
Contact technical support to provide feedback on the model format you are using, and we will consider adding built-in support for that format.

FAQ#

What to do if the SSE timeline does not display messages?
This issue usually happens when the server's response doesn't follow the SSE format guidelines. The standard SSE message format requires:
The message content must come afterdata:
Each message must be separated by two newline characters (i.e., a blank line between messages).
For more details on the SSE message format, check out the MDN documentation - Using Server-Sent Events.

Learn More#

How to Use the Deepseek API (R1 & V3)๏ผŸ
A complete guide to obtaining the DeepSeek API key and debugging the API.
Modified atย 2025-03-12 03:23:10
Previous
Socket.IO
Next
Request History
Built with