流式播放旋转甜甜圈

GET/anim/donut
公开访问

先输出首帧,再以 interval 毫秒为间隔逐帧发送。使用 curl -N 禁用输出缓冲;适合至少 56 列、23 行且支持 ANSI 的终端。 访问类别:匿名 API,可携带 Token 使用独立额度

请求参数

framesquery
integer · 默认值:48 · 最小值:1 · 最大值:120
intervalquery
integer · 默认值:100 · 最小值:50 · 最大值:500
_colorquery
0、false、off 或 no 关闭颜色,保留控制光标的序列。
string · 0、false、off 或 no 关闭颜色,保留控制光标的序列。

响应

text/plain

{
  "type": "string"
}

响应示例

成功响应

curl -NsS 'https://oit.sh/anim/donut?frames=2'
HTTP 200
content-type: text/plain; charset=utf-8
content-encoding: gzip
cache-control: no-store

                  $@@@@@@$$$ $$$ @@@ @                  
               $$$$$$$$#####~#####$$$$$$$ $             
            $$$$####******* *********####$$$$           
         #######*******!!!!!!!!!!!*******#######        
        #####******!!==;;:::::::;;==!!!*****####*       
      *#####***!!!==;;~~~~-----~~~~;;==!!!***#####      
      **#*****!!=;;::--,,,.....,,,--:::;==!*****#**     
     *******!!=;;:~~-,.............,-~~:;==!!*******    
    !******!!!=;;:~-,....... .......,-~:;;=!!!******!   
    !******!!===;~-,....          ...-~:;==!!!******!;  
   =!!****!!!!=;:~-,..             .,-::;==!!!*****!!=  
   ;!!!****!.!!=;;:~,               -~:;==!!.!****!!!;  
   ;=!!!****.!!!==;;;:             :;==!!!!******!!!=;  
   :==!!*********!!!!!;          :=!!!********.**!!=;   
    :;!!!*******##**###***!! =!**########*#*****!!=;;   
    ~:==!!!***######$$$$$$$$$$$$$$$$$$#####***!!!==:    
     -;;=!!!***####$$$$@@@@@@@@@@@$$$$####***!!!==:     
       ~;;!!!***####$$$$$@@@@@@@$$$$$$####**!!==;~~     
        -:;==!!!**######$$$$$$$$$#####****!=!=;:~       
          ~:;===!!*****###########****!!!=;=;:-,        
            --::;===!!!*********!*!!!==;;:~~..          
              .,-~~:;;;====== ====;:;::~~,              
                     @ @@@@@@@@@@@@                     
                 $@@$$$$$$$$$$$$$@$$$$@$$               
             $$$$$$$#$##**********###$$$$$$$            
          #$$$$###******!!!!!!!!!!!!**####$$$$          
         ###$###**!!!===;;;;;;;;;===!!****######        
       #######***!!!=;:::~~~~~~~:::;==!*****#####*      
      *#####***!!=;;:~~---.....---~~;;==!!***#####*     
     !*####***!==;::~,,...........,-~::;=!!!***####*    
    !**###***!!=;;:~-,.............,-~:;==!!***###**!   
    !********!!==;:~,...         ...,-:;==!!****#***!   
   ;!*********!!=;:~,.             .,~:;=!!*.*******!=  
   =!!******.**!!=;;~               ~;;=!!**.*******!=  
   ;!!****##.****!!=;:             :;=!!****.*#****!!;  
   :=!!**#####*##****!=           =!!***##*#####**!!=:  
    ;=!***##############*!=   =!*##############***!=;   
    ~==!***#####$$$$$$$$$$$$$$$$$$$$$$$$$#####***!==:   
     -;=!*!*####$$$$$$@@@@@@@@@@@@@$$$$$#####*!*!=;:    
      ~:==!!**####$$$$$@@@@@@@@@@@$$$$$####**!!!=;~     
       -:;==!***#####$$$$$$$$$$$$$$$#####***===;:~      
         ~~;;=!!****#################****!!=;;~:        
           ~~:;;=!!.****#******#*****.!!=;;:~-          
             -.~::;==;!!!=!!!!!=!!!;==;::~-.            

错误示例

curl -NsS 'https://oit.sh/anim/donut?frames=-1&interval=100&_color=hello'
HTTP 400
content-type: application/json
content-encoding: gzip
cache-control: no-store

{
  "error": {
    "code": "INVALID_INPUT",
    "message": "参数无效",
    "issues": [
      {
        "location": "query",
        "field": "frames",
        "code": "invalid_format",
        "message": "格式要求:/^\\d+$/"
      }
    ]
  }
}

在线调试

Ctrl / ⌘ + Enter
curl -X GET 'https://oit.sh/anim/donut'

响应

等待请求

等待发送请求