docs.go 416 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203
  1. // Package docs Code generated by swaggo/swag. DO NOT EDIT
  2. package docs
  3. import "github.com/swaggo/swag"
  4. const docTemplate = `{
  5. "schemes": {{ marshal .Schemes }},
  6. "swagger": "2.0",
  7. "info": {
  8. "description": "{{escape .Description}}",
  9. "title": "{{.Title}}",
  10. "contact": {},
  11. "version": "{{.Version}}"
  12. },
  13. "host": "{{.Host}}",
  14. "basePath": "{{.BasePath}}",
  15. "paths": {
  16. "/api/channel/": {
  17. "post": {
  18. "security": [
  19. {
  20. "ApiKeyAuth": []
  21. }
  22. ],
  23. "description": "Adds a new channel to the system",
  24. "consumes": [
  25. "application/json"
  26. ],
  27. "produces": [
  28. "application/json"
  29. ],
  30. "tags": [
  31. "channel"
  32. ],
  33. "summary": "Add a single channel",
  34. "parameters": [
  35. {
  36. "description": "Channel information",
  37. "name": "channel",
  38. "in": "body",
  39. "required": true,
  40. "schema": {
  41. "$ref": "#/definitions/controller.AddChannelRequest"
  42. }
  43. }
  44. ],
  45. "responses": {
  46. "200": {
  47. "description": "OK",
  48. "schema": {
  49. "$ref": "#/definitions/middleware.APIResponse"
  50. }
  51. }
  52. }
  53. }
  54. },
  55. "/api/channel/{id}": {
  56. "get": {
  57. "security": [
  58. {
  59. "ApiKeyAuth": []
  60. }
  61. ],
  62. "description": "Returns detailed information about a specific channel",
  63. "produces": [
  64. "application/json"
  65. ],
  66. "tags": [
  67. "channel"
  68. ],
  69. "summary": "Get a channel by ID",
  70. "parameters": [
  71. {
  72. "type": "integer",
  73. "description": "Channel ID",
  74. "name": "id",
  75. "in": "path",
  76. "required": true
  77. }
  78. ],
  79. "responses": {
  80. "200": {
  81. "description": "OK",
  82. "schema": {
  83. "allOf": [
  84. {
  85. "$ref": "#/definitions/middleware.APIResponse"
  86. },
  87. {
  88. "type": "object",
  89. "properties": {
  90. "data": {
  91. "$ref": "#/definitions/model.Channel"
  92. }
  93. }
  94. }
  95. ]
  96. }
  97. }
  98. }
  99. },
  100. "put": {
  101. "security": [
  102. {
  103. "ApiKeyAuth": []
  104. }
  105. ],
  106. "description": "Updates an existing channel by its ID",
  107. "consumes": [
  108. "application/json"
  109. ],
  110. "produces": [
  111. "application/json"
  112. ],
  113. "tags": [
  114. "channel"
  115. ],
  116. "summary": "Update a channel",
  117. "parameters": [
  118. {
  119. "type": "integer",
  120. "description": "Channel ID",
  121. "name": "id",
  122. "in": "path",
  123. "required": true
  124. },
  125. {
  126. "description": "Updated channel information",
  127. "name": "channel",
  128. "in": "body",
  129. "required": true,
  130. "schema": {
  131. "$ref": "#/definitions/controller.AddChannelRequest"
  132. }
  133. }
  134. ],
  135. "responses": {
  136. "200": {
  137. "description": "OK",
  138. "schema": {
  139. "allOf": [
  140. {
  141. "$ref": "#/definitions/middleware.APIResponse"
  142. },
  143. {
  144. "type": "object",
  145. "properties": {
  146. "data": {
  147. "$ref": "#/definitions/model.Channel"
  148. }
  149. }
  150. }
  151. ]
  152. }
  153. }
  154. }
  155. },
  156. "delete": {
  157. "security": [
  158. {
  159. "ApiKeyAuth": []
  160. }
  161. ],
  162. "description": "Deletes a channel by its ID",
  163. "produces": [
  164. "application/json"
  165. ],
  166. "tags": [
  167. "channel"
  168. ],
  169. "summary": "Delete a channel",
  170. "parameters": [
  171. {
  172. "type": "integer",
  173. "description": "Channel ID",
  174. "name": "id",
  175. "in": "path",
  176. "required": true
  177. }
  178. ],
  179. "responses": {
  180. "200": {
  181. "description": "OK",
  182. "schema": {
  183. "$ref": "#/definitions/middleware.APIResponse"
  184. }
  185. }
  186. }
  187. }
  188. },
  189. "/api/channel/{id}/balance": {
  190. "get": {
  191. "security": [
  192. {
  193. "ApiKeyAuth": []
  194. }
  195. ],
  196. "description": "Updates the balance for a single channel",
  197. "produces": [
  198. "application/json"
  199. ],
  200. "tags": [
  201. "channel"
  202. ],
  203. "summary": "Update channel balance",
  204. "parameters": [
  205. {
  206. "type": "integer",
  207. "description": "Channel ID",
  208. "name": "id",
  209. "in": "path",
  210. "required": true
  211. }
  212. ],
  213. "responses": {
  214. "200": {
  215. "description": "OK",
  216. "schema": {
  217. "allOf": [
  218. {
  219. "$ref": "#/definitions/middleware.APIResponse"
  220. },
  221. {
  222. "type": "object",
  223. "properties": {
  224. "data": {
  225. "type": "number",
  226. "format": "float64"
  227. }
  228. }
  229. }
  230. ]
  231. }
  232. }
  233. }
  234. }
  235. },
  236. "/api/channel/{id}/status": {
  237. "post": {
  238. "security": [
  239. {
  240. "ApiKeyAuth": []
  241. }
  242. ],
  243. "description": "Updates the status of a channel by its ID",
  244. "consumes": [
  245. "application/json"
  246. ],
  247. "produces": [
  248. "application/json"
  249. ],
  250. "tags": [
  251. "channel"
  252. ],
  253. "summary": "Update channel status",
  254. "parameters": [
  255. {
  256. "type": "integer",
  257. "description": "Channel ID",
  258. "name": "id",
  259. "in": "path",
  260. "required": true
  261. },
  262. {
  263. "description": "Status information",
  264. "name": "status",
  265. "in": "body",
  266. "required": true,
  267. "schema": {
  268. "$ref": "#/definitions/controller.UpdateChannelStatusRequest"
  269. }
  270. }
  271. ],
  272. "responses": {
  273. "200": {
  274. "description": "OK",
  275. "schema": {
  276. "$ref": "#/definitions/middleware.APIResponse"
  277. }
  278. }
  279. }
  280. }
  281. },
  282. "/api/channel/{id}/test": {
  283. "get": {
  284. "security": [
  285. {
  286. "ApiKeyAuth": []
  287. }
  288. ],
  289. "description": "Tests all models in the channel",
  290. "produces": [
  291. "application/json"
  292. ],
  293. "tags": [
  294. "channel"
  295. ],
  296. "summary": "Test channel models",
  297. "parameters": [
  298. {
  299. "type": "integer",
  300. "description": "Channel ID",
  301. "name": "id",
  302. "in": "path",
  303. "required": true
  304. },
  305. {
  306. "type": "boolean",
  307. "description": "Return success",
  308. "name": "return_success",
  309. "in": "query"
  310. },
  311. {
  312. "type": "boolean",
  313. "description": "Success body",
  314. "name": "success_body",
  315. "in": "query"
  316. },
  317. {
  318. "type": "boolean",
  319. "description": "Stream",
  320. "name": "stream",
  321. "in": "query"
  322. }
  323. ],
  324. "responses": {
  325. "200": {
  326. "description": "OK",
  327. "schema": {
  328. "allOf": [
  329. {
  330. "$ref": "#/definitions/middleware.APIResponse"
  331. },
  332. {
  333. "type": "object",
  334. "properties": {
  335. "data": {
  336. "type": "array",
  337. "items": {
  338. "$ref": "#/definitions/controller.TestResult"
  339. }
  340. }
  341. }
  342. }
  343. ]
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "/api/channel/{id}/{model}": {
  350. "get": {
  351. "security": [
  352. {
  353. "ApiKeyAuth": []
  354. }
  355. ],
  356. "description": "Tests a single model in the channel",
  357. "produces": [
  358. "application/json"
  359. ],
  360. "tags": [
  361. "channel"
  362. ],
  363. "summary": "Test channel model",
  364. "parameters": [
  365. {
  366. "type": "integer",
  367. "description": "Channel ID",
  368. "name": "id",
  369. "in": "path",
  370. "required": true
  371. },
  372. {
  373. "type": "string",
  374. "description": "Model name",
  375. "name": "model",
  376. "in": "path",
  377. "required": true
  378. }
  379. ],
  380. "responses": {
  381. "200": {
  382. "description": "OK",
  383. "schema": {
  384. "allOf": [
  385. {
  386. "$ref": "#/definitions/middleware.APIResponse"
  387. },
  388. {
  389. "type": "object",
  390. "properties": {
  391. "data": {
  392. "$ref": "#/definitions/model.ChannelTest"
  393. }
  394. }
  395. }
  396. ]
  397. }
  398. }
  399. }
  400. }
  401. },
  402. "/api/channels/": {
  403. "get": {
  404. "security": [
  405. {
  406. "ApiKeyAuth": []
  407. }
  408. ],
  409. "description": "Returns a paginated list of channels with optional filters",
  410. "produces": [
  411. "application/json"
  412. ],
  413. "tags": [
  414. "channels"
  415. ],
  416. "summary": "Get channels with pagination",
  417. "parameters": [
  418. {
  419. "type": "integer",
  420. "description": "Page number",
  421. "name": "page",
  422. "in": "query"
  423. },
  424. {
  425. "type": "integer",
  426. "description": "Items per page",
  427. "name": "per_page",
  428. "in": "query"
  429. },
  430. {
  431. "type": "integer",
  432. "description": "Filter by id",
  433. "name": "id",
  434. "in": "query"
  435. },
  436. {
  437. "type": "string",
  438. "description": "Filter by name",
  439. "name": "name",
  440. "in": "query"
  441. },
  442. {
  443. "type": "string",
  444. "description": "Filter by key",
  445. "name": "key",
  446. "in": "query"
  447. },
  448. {
  449. "type": "integer",
  450. "description": "Filter by channel type",
  451. "name": "channel_type",
  452. "in": "query"
  453. },
  454. {
  455. "type": "string",
  456. "description": "Filter by base URL",
  457. "name": "base_url",
  458. "in": "query"
  459. },
  460. {
  461. "type": "string",
  462. "description": "Order by field",
  463. "name": "order",
  464. "in": "query"
  465. }
  466. ],
  467. "responses": {
  468. "200": {
  469. "description": "OK",
  470. "schema": {
  471. "allOf": [
  472. {
  473. "$ref": "#/definitions/middleware.APIResponse"
  474. },
  475. {
  476. "type": "object",
  477. "properties": {
  478. "data": {
  479. "type": "object",
  480. "additionalProperties": {
  481. "allOf": [
  482. {},
  483. {
  484. "type": "object",
  485. "properties": {
  486. "channels": {
  487. "type": "array",
  488. "items": {
  489. "$ref": "#/definitions/model.Channel"
  490. }
  491. },
  492. "total": {
  493. "type": "integer"
  494. }
  495. }
  496. }
  497. ]
  498. }
  499. }
  500. }
  501. }
  502. ]
  503. }
  504. }
  505. }
  506. },
  507. "post": {
  508. "security": [
  509. {
  510. "ApiKeyAuth": []
  511. }
  512. ],
  513. "description": "Adds multiple channels in a batch operation",
  514. "consumes": [
  515. "application/json"
  516. ],
  517. "produces": [
  518. "application/json"
  519. ],
  520. "tags": [
  521. "channels"
  522. ],
  523. "summary": "Add multiple channels",
  524. "parameters": [
  525. {
  526. "description": "Channel information",
  527. "name": "channels",
  528. "in": "body",
  529. "required": true,
  530. "schema": {
  531. "type": "array",
  532. "items": {
  533. "$ref": "#/definitions/controller.AddChannelRequest"
  534. }
  535. }
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "OK",
  541. "schema": {
  542. "$ref": "#/definitions/middleware.APIResponse"
  543. }
  544. }
  545. }
  546. }
  547. },
  548. "/api/channels/all": {
  549. "get": {
  550. "security": [
  551. {
  552. "ApiKeyAuth": []
  553. }
  554. ],
  555. "description": "Returns a list of all channels without pagination",
  556. "produces": [
  557. "application/json"
  558. ],
  559. "tags": [
  560. "channels"
  561. ],
  562. "summary": "Get all channels",
  563. "responses": {
  564. "200": {
  565. "description": "OK",
  566. "schema": {
  567. "allOf": [
  568. {
  569. "$ref": "#/definitions/middleware.APIResponse"
  570. },
  571. {
  572. "type": "object",
  573. "properties": {
  574. "data": {
  575. "type": "array",
  576. "items": {
  577. "$ref": "#/definitions/model.Channel"
  578. }
  579. }
  580. }
  581. }
  582. ]
  583. }
  584. }
  585. }
  586. }
  587. },
  588. "/api/channels/balance": {
  589. "get": {
  590. "security": [
  591. {
  592. "ApiKeyAuth": []
  593. }
  594. ],
  595. "description": "Updates the balance for all channels",
  596. "produces": [
  597. "application/json"
  598. ],
  599. "tags": [
  600. "channel"
  601. ],
  602. "summary": "Update all channels balance",
  603. "responses": {
  604. "200": {
  605. "description": "OK",
  606. "schema": {
  607. "$ref": "#/definitions/middleware.APIResponse"
  608. }
  609. }
  610. }
  611. }
  612. },
  613. "/api/channels/batch_delete": {
  614. "post": {
  615. "security": [
  616. {
  617. "ApiKeyAuth": []
  618. }
  619. ],
  620. "description": "Deletes multiple channels by their IDs",
  621. "consumes": [
  622. "application/json"
  623. ],
  624. "produces": [
  625. "application/json"
  626. ],
  627. "tags": [
  628. "channels"
  629. ],
  630. "summary": "Delete multiple channels",
  631. "parameters": [
  632. {
  633. "description": "Channel IDs",
  634. "name": "ids",
  635. "in": "body",
  636. "required": true,
  637. "schema": {
  638. "type": "array",
  639. "items": {
  640. "type": "integer"
  641. }
  642. }
  643. }
  644. ],
  645. "responses": {
  646. "200": {
  647. "description": "OK",
  648. "schema": {
  649. "$ref": "#/definitions/middleware.APIResponse"
  650. }
  651. }
  652. }
  653. }
  654. },
  655. "/api/channels/import/oneapi": {
  656. "post": {
  657. "security": [
  658. {
  659. "ApiKeyAuth": []
  660. }
  661. ],
  662. "description": "Imports channels from OneAPI",
  663. "produces": [
  664. "application/json"
  665. ],
  666. "tags": [
  667. "channels"
  668. ],
  669. "summary": "Import channel from OneAPI",
  670. "parameters": [
  671. {
  672. "description": "Import channel from OneAPI request",
  673. "name": "request",
  674. "in": "body",
  675. "required": true,
  676. "schema": {
  677. "$ref": "#/definitions/controller.ImportChannelFromOneAPIRequest"
  678. }
  679. }
  680. ],
  681. "responses": {
  682. "200": {
  683. "description": "OK",
  684. "schema": {
  685. "allOf": [
  686. {
  687. "$ref": "#/definitions/middleware.APIResponse"
  688. },
  689. {
  690. "type": "object",
  691. "properties": {
  692. "data": {
  693. "type": "array",
  694. "items": {}
  695. }
  696. }
  697. }
  698. ]
  699. }
  700. }
  701. }
  702. }
  703. },
  704. "/api/channels/search": {
  705. "get": {
  706. "security": [
  707. {
  708. "ApiKeyAuth": []
  709. }
  710. ],
  711. "description": "Search channels with keyword and optional filters",
  712. "produces": [
  713. "application/json"
  714. ],
  715. "tags": [
  716. "channels"
  717. ],
  718. "summary": "Search channels",
  719. "parameters": [
  720. {
  721. "type": "string",
  722. "description": "Search keyword",
  723. "name": "keyword",
  724. "in": "query",
  725. "required": true
  726. },
  727. {
  728. "type": "integer",
  729. "description": "Page number",
  730. "name": "page",
  731. "in": "query"
  732. },
  733. {
  734. "type": "integer",
  735. "description": "Items per page",
  736. "name": "per_page",
  737. "in": "query"
  738. },
  739. {
  740. "type": "integer",
  741. "description": "Filter by id",
  742. "name": "id",
  743. "in": "query"
  744. },
  745. {
  746. "type": "string",
  747. "description": "Filter by name",
  748. "name": "name",
  749. "in": "query"
  750. },
  751. {
  752. "type": "string",
  753. "description": "Filter by key",
  754. "name": "key",
  755. "in": "query"
  756. },
  757. {
  758. "type": "integer",
  759. "description": "Filter by channel type",
  760. "name": "channel_type",
  761. "in": "query"
  762. },
  763. {
  764. "type": "string",
  765. "description": "Filter by base URL",
  766. "name": "base_url",
  767. "in": "query"
  768. },
  769. {
  770. "type": "string",
  771. "description": "Order by field",
  772. "name": "order",
  773. "in": "query"
  774. }
  775. ],
  776. "responses": {
  777. "200": {
  778. "description": "OK",
  779. "schema": {
  780. "allOf": [
  781. {
  782. "$ref": "#/definitions/middleware.APIResponse"
  783. },
  784. {
  785. "type": "object",
  786. "properties": {
  787. "data": {
  788. "type": "object",
  789. "additionalProperties": {
  790. "allOf": [
  791. {},
  792. {
  793. "type": "object",
  794. "properties": {
  795. "channels": {
  796. "type": "array",
  797. "items": {
  798. "$ref": "#/definitions/model.Channel"
  799. }
  800. },
  801. "total": {
  802. "type": "integer"
  803. }
  804. }
  805. }
  806. ]
  807. }
  808. }
  809. }
  810. }
  811. ]
  812. }
  813. }
  814. }
  815. }
  816. },
  817. "/api/channels/test": {
  818. "get": {
  819. "security": [
  820. {
  821. "ApiKeyAuth": []
  822. }
  823. ],
  824. "description": "Tests all channels",
  825. "produces": [
  826. "application/json"
  827. ],
  828. "tags": [
  829. "channel"
  830. ],
  831. "summary": "Test all channels",
  832. "parameters": [
  833. {
  834. "type": "boolean",
  835. "description": "Test disabled",
  836. "name": "test_disabled",
  837. "in": "query"
  838. },
  839. {
  840. "type": "boolean",
  841. "description": "Return success",
  842. "name": "return_success",
  843. "in": "query"
  844. },
  845. {
  846. "type": "boolean",
  847. "description": "Success body",
  848. "name": "success_body",
  849. "in": "query"
  850. },
  851. {
  852. "type": "boolean",
  853. "description": "Stream",
  854. "name": "stream",
  855. "in": "query"
  856. }
  857. ],
  858. "responses": {
  859. "200": {
  860. "description": "OK",
  861. "schema": {
  862. "allOf": [
  863. {
  864. "$ref": "#/definitions/middleware.APIResponse"
  865. },
  866. {
  867. "type": "object",
  868. "properties": {
  869. "data": {
  870. "type": "array",
  871. "items": {
  872. "$ref": "#/definitions/controller.TestResult"
  873. }
  874. }
  875. }
  876. }
  877. ]
  878. }
  879. }
  880. }
  881. }
  882. },
  883. "/api/channels/type_metas": {
  884. "get": {
  885. "security": [
  886. {
  887. "ApiKeyAuth": []
  888. }
  889. ],
  890. "description": "Returns metadata for all channel types",
  891. "produces": [
  892. "application/json"
  893. ],
  894. "tags": [
  895. "channels"
  896. ],
  897. "summary": "Get channel type metadata",
  898. "responses": {
  899. "200": {
  900. "description": "OK",
  901. "schema": {
  902. "allOf": [
  903. {
  904. "$ref": "#/definitions/middleware.APIResponse"
  905. },
  906. {
  907. "type": "object",
  908. "properties": {
  909. "data": {
  910. "type": "object",
  911. "additionalProperties": {
  912. "$ref": "#/definitions/adaptors.AdaptorMeta"
  913. }
  914. }
  915. }
  916. }
  917. ]
  918. }
  919. }
  920. }
  921. }
  922. },
  923. "/api/dashboard/": {
  924. "get": {
  925. "security": [
  926. {
  927. "ApiKeyAuth": []
  928. }
  929. ],
  930. "description": "Returns the general dashboard data including usage statistics and metrics",
  931. "produces": [
  932. "application/json"
  933. ],
  934. "tags": [
  935. "dashboard"
  936. ],
  937. "summary": "Get dashboard data",
  938. "parameters": [
  939. {
  940. "type": "integer",
  941. "description": "Channel ID",
  942. "name": "channel",
  943. "in": "query"
  944. },
  945. {
  946. "type": "string",
  947. "description": "Model name",
  948. "name": "model",
  949. "in": "query"
  950. },
  951. {
  952. "type": "integer",
  953. "format": "int64",
  954. "description": "Start second timestamp",
  955. "name": "start_timestamp",
  956. "in": "query"
  957. },
  958. {
  959. "type": "integer",
  960. "format": "int64",
  961. "description": "End second timestamp",
  962. "name": "end_timestamp",
  963. "in": "query"
  964. },
  965. {
  966. "type": "string",
  967. "description": "Timezone, default is Local",
  968. "name": "timezone",
  969. "in": "query"
  970. },
  971. {
  972. "type": "string",
  973. "description": "Time span type (minute, hour, day, month)",
  974. "name": "timespan",
  975. "in": "query"
  976. }
  977. ],
  978. "responses": {
  979. "200": {
  980. "description": "OK",
  981. "schema": {
  982. "allOf": [
  983. {
  984. "$ref": "#/definitions/middleware.APIResponse"
  985. },
  986. {
  987. "type": "object",
  988. "properties": {
  989. "data": {
  990. "$ref": "#/definitions/model.DashboardResponse"
  991. }
  992. }
  993. }
  994. ]
  995. }
  996. }
  997. }
  998. }
  999. },
  1000. "/api/dashboard/{group}": {
  1001. "get": {
  1002. "security": [
  1003. {
  1004. "ApiKeyAuth": []
  1005. }
  1006. ],
  1007. "description": "Returns dashboard data and metrics specific to the given group",
  1008. "produces": [
  1009. "application/json"
  1010. ],
  1011. "tags": [
  1012. "dashboard"
  1013. ],
  1014. "summary": "Get dashboard data for a specific group",
  1015. "parameters": [
  1016. {
  1017. "type": "string",
  1018. "description": "Group",
  1019. "name": "group",
  1020. "in": "path",
  1021. "required": true
  1022. },
  1023. {
  1024. "type": "string",
  1025. "description": "Token name",
  1026. "name": "token_name",
  1027. "in": "query"
  1028. },
  1029. {
  1030. "type": "string",
  1031. "description": "Model or *",
  1032. "name": "model",
  1033. "in": "query"
  1034. },
  1035. {
  1036. "type": "integer",
  1037. "format": "int64",
  1038. "description": "Start second timestamp",
  1039. "name": "start_timestamp",
  1040. "in": "query"
  1041. },
  1042. {
  1043. "type": "integer",
  1044. "format": "int64",
  1045. "description": "End second timestamp",
  1046. "name": "end_timestamp",
  1047. "in": "query"
  1048. },
  1049. {
  1050. "type": "string",
  1051. "description": "Timezone, default is Local",
  1052. "name": "timezone",
  1053. "in": "query"
  1054. },
  1055. {
  1056. "type": "string",
  1057. "description": "Time span type (minute, hour, day, month)",
  1058. "name": "timespan",
  1059. "in": "query"
  1060. }
  1061. ],
  1062. "responses": {
  1063. "200": {
  1064. "description": "OK",
  1065. "schema": {
  1066. "allOf": [
  1067. {
  1068. "$ref": "#/definitions/middleware.APIResponse"
  1069. },
  1070. {
  1071. "type": "object",
  1072. "properties": {
  1073. "data": {
  1074. "$ref": "#/definitions/model.GroupDashboardResponse"
  1075. }
  1076. }
  1077. }
  1078. ]
  1079. }
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "/api/dashboard/{group}/models": {
  1085. "get": {
  1086. "security": [
  1087. {
  1088. "ApiKeyAuth": []
  1089. }
  1090. ],
  1091. "description": "Returns model-specific metrics and usage data for the given group",
  1092. "produces": [
  1093. "application/json"
  1094. ],
  1095. "tags": [
  1096. "dashboard"
  1097. ],
  1098. "summary": "Get model usage data for a specific group",
  1099. "parameters": [
  1100. {
  1101. "type": "string",
  1102. "description": "Group",
  1103. "name": "group",
  1104. "in": "path",
  1105. "required": true
  1106. }
  1107. ],
  1108. "responses": {
  1109. "200": {
  1110. "description": "OK",
  1111. "schema": {
  1112. "allOf": [
  1113. {
  1114. "$ref": "#/definitions/middleware.APIResponse"
  1115. },
  1116. {
  1117. "type": "object",
  1118. "properties": {
  1119. "data": {
  1120. "type": "array",
  1121. "items": {
  1122. "$ref": "#/definitions/controller.GroupModel"
  1123. }
  1124. }
  1125. }
  1126. }
  1127. ]
  1128. }
  1129. }
  1130. }
  1131. }
  1132. },
  1133. "/api/dashboardv2/": {
  1134. "get": {
  1135. "security": [
  1136. {
  1137. "ApiKeyAuth": []
  1138. }
  1139. ],
  1140. "description": "Returns model-specific metrics and usage data for the given channel",
  1141. "produces": [
  1142. "application/json"
  1143. ],
  1144. "tags": [
  1145. "dashboard"
  1146. ],
  1147. "summary": "Get model usage data for a specific channel",
  1148. "parameters": [
  1149. {
  1150. "type": "integer",
  1151. "description": "Channel ID",
  1152. "name": "channel",
  1153. "in": "query"
  1154. },
  1155. {
  1156. "type": "string",
  1157. "description": "Model name",
  1158. "name": "model",
  1159. "in": "query"
  1160. },
  1161. {
  1162. "type": "integer",
  1163. "format": "int64",
  1164. "description": "Start timestamp",
  1165. "name": "start_timestamp",
  1166. "in": "query"
  1167. },
  1168. {
  1169. "type": "integer",
  1170. "format": "int64",
  1171. "description": "End timestamp",
  1172. "name": "end_timestamp",
  1173. "in": "query"
  1174. },
  1175. {
  1176. "type": "string",
  1177. "description": "Timezone, default is Local",
  1178. "name": "timezone",
  1179. "in": "query"
  1180. },
  1181. {
  1182. "type": "string",
  1183. "description": "Time span type (minute, hour, day, month)",
  1184. "name": "timespan",
  1185. "in": "query"
  1186. }
  1187. ],
  1188. "responses": {
  1189. "200": {
  1190. "description": "OK",
  1191. "schema": {
  1192. "allOf": [
  1193. {
  1194. "$ref": "#/definitions/middleware.APIResponse"
  1195. },
  1196. {
  1197. "type": "object",
  1198. "properties": {
  1199. "data": {
  1200. "type": "array",
  1201. "items": {
  1202. "$ref": "#/definitions/model.TimeSummaryDataV2"
  1203. }
  1204. }
  1205. }
  1206. }
  1207. ]
  1208. }
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "/api/dashboardv2/{group}": {
  1214. "get": {
  1215. "security": [
  1216. {
  1217. "ApiKeyAuth": []
  1218. }
  1219. ],
  1220. "description": "Returns model-specific metrics and usage data for the given group",
  1221. "produces": [
  1222. "application/json"
  1223. ],
  1224. "tags": [
  1225. "dashboard"
  1226. ],
  1227. "summary": "Get model usage data for a specific group",
  1228. "parameters": [
  1229. {
  1230. "type": "string",
  1231. "description": "Group",
  1232. "name": "group",
  1233. "in": "path",
  1234. "required": true
  1235. },
  1236. {
  1237. "type": "string",
  1238. "description": "Token name",
  1239. "name": "token_name",
  1240. "in": "query"
  1241. },
  1242. {
  1243. "type": "string",
  1244. "description": "Model name",
  1245. "name": "model",
  1246. "in": "query"
  1247. },
  1248. {
  1249. "type": "integer",
  1250. "format": "int64",
  1251. "description": "Start timestamp",
  1252. "name": "start_timestamp",
  1253. "in": "query"
  1254. },
  1255. {
  1256. "type": "integer",
  1257. "format": "int64",
  1258. "description": "End timestamp",
  1259. "name": "end_timestamp",
  1260. "in": "query"
  1261. },
  1262. {
  1263. "type": "string",
  1264. "description": "Timezone, default is Local",
  1265. "name": "timezone",
  1266. "in": "query"
  1267. },
  1268. {
  1269. "type": "string",
  1270. "description": "Time span type (minute, hour, day, month)",
  1271. "name": "timespan",
  1272. "in": "query"
  1273. }
  1274. ],
  1275. "responses": {
  1276. "200": {
  1277. "description": "OK",
  1278. "schema": {
  1279. "allOf": [
  1280. {
  1281. "$ref": "#/definitions/middleware.APIResponse"
  1282. },
  1283. {
  1284. "type": "object",
  1285. "properties": {
  1286. "data": {
  1287. "type": "array",
  1288. "items": {
  1289. "$ref": "#/definitions/model.TimeSummaryDataV2"
  1290. }
  1291. }
  1292. }
  1293. }
  1294. ]
  1295. }
  1296. }
  1297. }
  1298. }
  1299. },
  1300. "/api/embedmcp/": {
  1301. "get": {
  1302. "security": [
  1303. {
  1304. "ApiKeyAuth": []
  1305. }
  1306. ],
  1307. "description": "Get embed mcp",
  1308. "consumes": [
  1309. "application/json"
  1310. ],
  1311. "produces": [
  1312. "application/json"
  1313. ],
  1314. "tags": [
  1315. "embedmcp"
  1316. ],
  1317. "summary": "Get embed mcp",
  1318. "responses": {
  1319. "200": {
  1320. "description": "OK",
  1321. "schema": {
  1322. "type": "array",
  1323. "items": {
  1324. "$ref": "#/definitions/controller.EmbedMCP"
  1325. }
  1326. }
  1327. }
  1328. }
  1329. },
  1330. "post": {
  1331. "security": [
  1332. {
  1333. "ApiKeyAuth": []
  1334. }
  1335. ],
  1336. "description": "Save embed mcp",
  1337. "consumes": [
  1338. "application/json"
  1339. ],
  1340. "produces": [
  1341. "application/json"
  1342. ],
  1343. "tags": [
  1344. "embedmcp"
  1345. ],
  1346. "summary": "Save embed mcp",
  1347. "parameters": [
  1348. {
  1349. "description": "Save embed mcp request",
  1350. "name": "body",
  1351. "in": "body",
  1352. "required": true,
  1353. "schema": {
  1354. "$ref": "#/definitions/controller.SaveEmbedMCPRequest"
  1355. }
  1356. }
  1357. ],
  1358. "responses": {
  1359. "200": {
  1360. "description": "OK"
  1361. }
  1362. }
  1363. }
  1364. },
  1365. "/api/group/{group}": {
  1366. "get": {
  1367. "security": [
  1368. {
  1369. "ApiKeyAuth": []
  1370. }
  1371. ],
  1372. "description": "Returns detailed information about a specific group",
  1373. "produces": [
  1374. "application/json"
  1375. ],
  1376. "tags": [
  1377. "group"
  1378. ],
  1379. "summary": "Get a group",
  1380. "parameters": [
  1381. {
  1382. "type": "string",
  1383. "description": "Group name",
  1384. "name": "group",
  1385. "in": "path",
  1386. "required": true
  1387. }
  1388. ],
  1389. "responses": {
  1390. "200": {
  1391. "description": "OK",
  1392. "schema": {
  1393. "allOf": [
  1394. {
  1395. "$ref": "#/definitions/middleware.APIResponse"
  1396. },
  1397. {
  1398. "type": "object",
  1399. "properties": {
  1400. "data": {
  1401. "$ref": "#/definitions/controller.GroupResponse"
  1402. }
  1403. }
  1404. }
  1405. ]
  1406. }
  1407. }
  1408. }
  1409. },
  1410. "put": {
  1411. "security": [
  1412. {
  1413. "ApiKeyAuth": []
  1414. }
  1415. ],
  1416. "description": "Updates an existing group with the given information",
  1417. "consumes": [
  1418. "application/json"
  1419. ],
  1420. "produces": [
  1421. "application/json"
  1422. ],
  1423. "tags": [
  1424. "group"
  1425. ],
  1426. "summary": "Update a group",
  1427. "parameters": [
  1428. {
  1429. "type": "string",
  1430. "description": "Group name",
  1431. "name": "group",
  1432. "in": "path",
  1433. "required": true
  1434. },
  1435. {
  1436. "description": "Updated group information",
  1437. "name": "data",
  1438. "in": "body",
  1439. "required": true,
  1440. "schema": {
  1441. "$ref": "#/definitions/controller.CreateGroupRequest"
  1442. }
  1443. }
  1444. ],
  1445. "responses": {
  1446. "200": {
  1447. "description": "OK",
  1448. "schema": {
  1449. "allOf": [
  1450. {
  1451. "$ref": "#/definitions/middleware.APIResponse"
  1452. },
  1453. {
  1454. "type": "object",
  1455. "properties": {
  1456. "data": {
  1457. "$ref": "#/definitions/model.Group"
  1458. }
  1459. }
  1460. }
  1461. ]
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "post": {
  1467. "security": [
  1468. {
  1469. "ApiKeyAuth": []
  1470. }
  1471. ],
  1472. "description": "Creates a new group with the given information",
  1473. "consumes": [
  1474. "application/json"
  1475. ],
  1476. "produces": [
  1477. "application/json"
  1478. ],
  1479. "tags": [
  1480. "group"
  1481. ],
  1482. "summary": "Create a new group",
  1483. "parameters": [
  1484. {
  1485. "type": "string",
  1486. "description": "Group name",
  1487. "name": "group",
  1488. "in": "path",
  1489. "required": true
  1490. },
  1491. {
  1492. "description": "Group information",
  1493. "name": "data",
  1494. "in": "body",
  1495. "required": true,
  1496. "schema": {
  1497. "$ref": "#/definitions/controller.CreateGroupRequest"
  1498. }
  1499. }
  1500. ],
  1501. "responses": {
  1502. "200": {
  1503. "description": "OK",
  1504. "schema": {
  1505. "allOf": [
  1506. {
  1507. "$ref": "#/definitions/middleware.APIResponse"
  1508. },
  1509. {
  1510. "type": "object",
  1511. "properties": {
  1512. "data": {
  1513. "$ref": "#/definitions/model.Group"
  1514. }
  1515. }
  1516. }
  1517. ]
  1518. }
  1519. }
  1520. }
  1521. },
  1522. "delete": {
  1523. "security": [
  1524. {
  1525. "ApiKeyAuth": []
  1526. }
  1527. ],
  1528. "description": "Deletes a group by its name",
  1529. "produces": [
  1530. "application/json"
  1531. ],
  1532. "tags": [
  1533. "group"
  1534. ],
  1535. "summary": "Delete a group",
  1536. "parameters": [
  1537. {
  1538. "type": "string",
  1539. "description": "Group name",
  1540. "name": "group",
  1541. "in": "path",
  1542. "required": true
  1543. }
  1544. ],
  1545. "responses": {
  1546. "200": {
  1547. "description": "OK",
  1548. "schema": {
  1549. "$ref": "#/definitions/middleware.APIResponse"
  1550. }
  1551. }
  1552. }
  1553. }
  1554. },
  1555. "/api/group/{group}/mcp": {
  1556. "get": {
  1557. "security": [
  1558. {
  1559. "ApiKeyAuth": []
  1560. }
  1561. ],
  1562. "description": "Get MCPs by group",
  1563. "produces": [
  1564. "application/json"
  1565. ],
  1566. "tags": [
  1567. "mcp",
  1568. "group"
  1569. ],
  1570. "summary": "Get MCPs by group",
  1571. "parameters": [
  1572. {
  1573. "type": "string",
  1574. "description": "Group ID",
  1575. "name": "group",
  1576. "in": "path",
  1577. "required": true
  1578. },
  1579. {
  1580. "type": "integer",
  1581. "description": "Page",
  1582. "name": "page",
  1583. "in": "query"
  1584. },
  1585. {
  1586. "type": "integer",
  1587. "description": "Per Page",
  1588. "name": "per_page",
  1589. "in": "query"
  1590. },
  1591. {
  1592. "type": "string",
  1593. "description": "MCP ID",
  1594. "name": "id",
  1595. "in": "query"
  1596. },
  1597. {
  1598. "type": "string",
  1599. "description": "hosted or local",
  1600. "name": "type",
  1601. "in": "query"
  1602. },
  1603. {
  1604. "type": "string",
  1605. "description": "Keyword",
  1606. "name": "keyword",
  1607. "in": "query"
  1608. }
  1609. ],
  1610. "responses": {
  1611. "200": {
  1612. "description": "OK",
  1613. "schema": {
  1614. "allOf": [
  1615. {
  1616. "$ref": "#/definitions/middleware.APIResponse"
  1617. },
  1618. {
  1619. "type": "object",
  1620. "properties": {
  1621. "data": {
  1622. "type": "array",
  1623. "items": {
  1624. "$ref": "#/definitions/controller.GroupPublicMCPResponse"
  1625. }
  1626. }
  1627. }
  1628. }
  1629. ]
  1630. }
  1631. }
  1632. }
  1633. }
  1634. },
  1635. "/api/group/{group}/mcp/{id}": {
  1636. "get": {
  1637. "security": [
  1638. {
  1639. "ApiKeyAuth": []
  1640. }
  1641. ],
  1642. "description": "Get a specific MCP by its ID",
  1643. "produces": [
  1644. "application/json"
  1645. ],
  1646. "tags": [
  1647. "mcp",
  1648. "group"
  1649. ],
  1650. "summary": "Get MCP by ID",
  1651. "parameters": [
  1652. {
  1653. "type": "string",
  1654. "description": "Group ID",
  1655. "name": "group",
  1656. "in": "path",
  1657. "required": true
  1658. },
  1659. {
  1660. "type": "string",
  1661. "description": "MCP ID",
  1662. "name": "id",
  1663. "in": "path",
  1664. "required": true
  1665. }
  1666. ],
  1667. "responses": {
  1668. "200": {
  1669. "description": "OK",
  1670. "schema": {
  1671. "allOf": [
  1672. {
  1673. "$ref": "#/definitions/middleware.APIResponse"
  1674. },
  1675. {
  1676. "type": "object",
  1677. "properties": {
  1678. "data": {
  1679. "$ref": "#/definitions/controller.GroupPublicMCPDetailResponse"
  1680. }
  1681. }
  1682. }
  1683. ]
  1684. }
  1685. }
  1686. }
  1687. }
  1688. },
  1689. "/api/group/{group}/model_config/{model}": {
  1690. "get": {
  1691. "security": [
  1692. {
  1693. "ApiKeyAuth": []
  1694. }
  1695. ],
  1696. "description": "Get group model config",
  1697. "produces": [
  1698. "application/json"
  1699. ],
  1700. "tags": [
  1701. "group"
  1702. ],
  1703. "summary": "Get group model config",
  1704. "parameters": [
  1705. {
  1706. "type": "string",
  1707. "description": "Group name",
  1708. "name": "group",
  1709. "in": "path",
  1710. "required": true
  1711. },
  1712. {
  1713. "type": "string",
  1714. "description": "Model name",
  1715. "name": "model",
  1716. "in": "path",
  1717. "required": true
  1718. }
  1719. ],
  1720. "responses": {
  1721. "200": {
  1722. "description": "OK",
  1723. "schema": {
  1724. "allOf": [
  1725. {
  1726. "$ref": "#/definitions/middleware.APIResponse"
  1727. },
  1728. {
  1729. "type": "object",
  1730. "properties": {
  1731. "data": {
  1732. "$ref": "#/definitions/model.GroupModelConfig"
  1733. }
  1734. }
  1735. }
  1736. ]
  1737. }
  1738. }
  1739. }
  1740. },
  1741. "put": {
  1742. "security": [
  1743. {
  1744. "ApiKeyAuth": []
  1745. }
  1746. ],
  1747. "description": "Update group model config",
  1748. "consumes": [
  1749. "application/json"
  1750. ],
  1751. "produces": [
  1752. "application/json"
  1753. ],
  1754. "tags": [
  1755. "group"
  1756. ],
  1757. "summary": "Update group model config",
  1758. "parameters": [
  1759. {
  1760. "type": "string",
  1761. "description": "Group name",
  1762. "name": "group",
  1763. "in": "path",
  1764. "required": true
  1765. },
  1766. {
  1767. "type": "string",
  1768. "description": "Model name",
  1769. "name": "model",
  1770. "in": "path",
  1771. "required": true
  1772. },
  1773. {
  1774. "description": "Group model config information",
  1775. "name": "data",
  1776. "in": "body",
  1777. "required": true,
  1778. "schema": {
  1779. "$ref": "#/definitions/controller.SaveGroupModelConfigRequest"
  1780. }
  1781. }
  1782. ],
  1783. "responses": {
  1784. "200": {
  1785. "description": "OK",
  1786. "schema": {
  1787. "$ref": "#/definitions/middleware.APIResponse"
  1788. }
  1789. }
  1790. }
  1791. },
  1792. "post": {
  1793. "security": [
  1794. {
  1795. "ApiKeyAuth": []
  1796. }
  1797. ],
  1798. "description": "Save group model config",
  1799. "consumes": [
  1800. "application/json"
  1801. ],
  1802. "produces": [
  1803. "application/json"
  1804. ],
  1805. "tags": [
  1806. "group"
  1807. ],
  1808. "summary": "Save group model config",
  1809. "parameters": [
  1810. {
  1811. "type": "string",
  1812. "description": "Group name",
  1813. "name": "group",
  1814. "in": "path",
  1815. "required": true
  1816. },
  1817. {
  1818. "description": "Group model config information",
  1819. "name": "data",
  1820. "in": "body",
  1821. "required": true,
  1822. "schema": {
  1823. "$ref": "#/definitions/controller.SaveGroupModelConfigRequest"
  1824. }
  1825. }
  1826. ],
  1827. "responses": {
  1828. "200": {
  1829. "description": "OK",
  1830. "schema": {
  1831. "$ref": "#/definitions/middleware.APIResponse"
  1832. }
  1833. }
  1834. }
  1835. },
  1836. "delete": {
  1837. "security": [
  1838. {
  1839. "ApiKeyAuth": []
  1840. }
  1841. ],
  1842. "description": "Delete group model config",
  1843. "produces": [
  1844. "application/json"
  1845. ],
  1846. "tags": [
  1847. "group"
  1848. ],
  1849. "summary": "Delete group model config",
  1850. "parameters": [
  1851. {
  1852. "type": "string",
  1853. "description": "Group name",
  1854. "name": "group",
  1855. "in": "path",
  1856. "required": true
  1857. },
  1858. {
  1859. "type": "string",
  1860. "description": "Model name",
  1861. "name": "model",
  1862. "in": "path",
  1863. "required": true
  1864. }
  1865. ],
  1866. "responses": {
  1867. "200": {
  1868. "description": "OK",
  1869. "schema": {
  1870. "$ref": "#/definitions/middleware.APIResponse"
  1871. }
  1872. }
  1873. }
  1874. }
  1875. },
  1876. "/api/group/{group}/model_configs/": {
  1877. "get": {
  1878. "security": [
  1879. {
  1880. "ApiKeyAuth": []
  1881. }
  1882. ],
  1883. "description": "Get group model configs",
  1884. "produces": [
  1885. "application/json"
  1886. ],
  1887. "tags": [
  1888. "group"
  1889. ],
  1890. "summary": "Get group model configs",
  1891. "parameters": [
  1892. {
  1893. "type": "string",
  1894. "description": "Group name",
  1895. "name": "group",
  1896. "in": "path",
  1897. "required": true
  1898. }
  1899. ],
  1900. "responses": {
  1901. "200": {
  1902. "description": "OK",
  1903. "schema": {
  1904. "allOf": [
  1905. {
  1906. "$ref": "#/definitions/middleware.APIResponse"
  1907. },
  1908. {
  1909. "type": "object",
  1910. "properties": {
  1911. "data": {
  1912. "type": "array",
  1913. "items": {
  1914. "$ref": "#/definitions/model.GroupModelConfig"
  1915. }
  1916. }
  1917. }
  1918. }
  1919. ]
  1920. }
  1921. }
  1922. }
  1923. },
  1924. "put": {
  1925. "security": [
  1926. {
  1927. "ApiKeyAuth": []
  1928. }
  1929. ],
  1930. "description": "Update group model configs",
  1931. "consumes": [
  1932. "application/json"
  1933. ],
  1934. "produces": [
  1935. "application/json"
  1936. ],
  1937. "tags": [
  1938. "group"
  1939. ],
  1940. "summary": "Update group model configs",
  1941. "parameters": [
  1942. {
  1943. "type": "string",
  1944. "description": "Group name",
  1945. "name": "group",
  1946. "in": "path",
  1947. "required": true
  1948. },
  1949. {
  1950. "description": "Group model config information",
  1951. "name": "data",
  1952. "in": "body",
  1953. "required": true,
  1954. "schema": {
  1955. "type": "array",
  1956. "items": {
  1957. "$ref": "#/definitions/controller.SaveGroupModelConfigRequest"
  1958. }
  1959. }
  1960. }
  1961. ],
  1962. "responses": {
  1963. "200": {
  1964. "description": "OK",
  1965. "schema": {
  1966. "$ref": "#/definitions/middleware.APIResponse"
  1967. }
  1968. }
  1969. }
  1970. },
  1971. "post": {
  1972. "security": [
  1973. {
  1974. "ApiKeyAuth": []
  1975. }
  1976. ],
  1977. "description": "Save group model configs",
  1978. "consumes": [
  1979. "application/json"
  1980. ],
  1981. "produces": [
  1982. "application/json"
  1983. ],
  1984. "tags": [
  1985. "group"
  1986. ],
  1987. "summary": "Save group model configs",
  1988. "parameters": [
  1989. {
  1990. "type": "string",
  1991. "description": "Group name",
  1992. "name": "group",
  1993. "in": "path",
  1994. "required": true
  1995. },
  1996. {
  1997. "description": "Group model config information",
  1998. "name": "data",
  1999. "in": "body",
  2000. "required": true,
  2001. "schema": {
  2002. "type": "array",
  2003. "items": {
  2004. "$ref": "#/definitions/controller.SaveGroupModelConfigRequest"
  2005. }
  2006. }
  2007. }
  2008. ],
  2009. "responses": {
  2010. "200": {
  2011. "description": "OK",
  2012. "schema": {
  2013. "$ref": "#/definitions/middleware.APIResponse"
  2014. }
  2015. }
  2016. }
  2017. },
  2018. "delete": {
  2019. "security": [
  2020. {
  2021. "ApiKeyAuth": []
  2022. }
  2023. ],
  2024. "description": "Delete group model configs",
  2025. "produces": [
  2026. "application/json"
  2027. ],
  2028. "tags": [
  2029. "group"
  2030. ],
  2031. "summary": "Delete group model configs",
  2032. "parameters": [
  2033. {
  2034. "type": "string",
  2035. "description": "Group name",
  2036. "name": "group",
  2037. "in": "path",
  2038. "required": true
  2039. },
  2040. {
  2041. "description": "Model names",
  2042. "name": "models",
  2043. "in": "body",
  2044. "required": true,
  2045. "schema": {
  2046. "type": "array",
  2047. "items": {
  2048. "type": "string"
  2049. }
  2050. }
  2051. }
  2052. ],
  2053. "responses": {
  2054. "200": {
  2055. "description": "OK",
  2056. "schema": {
  2057. "$ref": "#/definitions/middleware.APIResponse"
  2058. }
  2059. }
  2060. }
  2061. }
  2062. },
  2063. "/api/group/{group}/rpm_ratio": {
  2064. "post": {
  2065. "security": [
  2066. {
  2067. "ApiKeyAuth": []
  2068. }
  2069. ],
  2070. "description": "Updates the RPM (Requests Per Minute) ratio for a group",
  2071. "consumes": [
  2072. "application/json"
  2073. ],
  2074. "produces": [
  2075. "application/json"
  2076. ],
  2077. "tags": [
  2078. "group"
  2079. ],
  2080. "summary": "Update group RPM ratio",
  2081. "parameters": [
  2082. {
  2083. "type": "string",
  2084. "description": "Group name",
  2085. "name": "group",
  2086. "in": "path",
  2087. "required": true
  2088. },
  2089. {
  2090. "description": "RPM ratio information",
  2091. "name": "data",
  2092. "in": "body",
  2093. "required": true,
  2094. "schema": {
  2095. "$ref": "#/definitions/controller.UpdateGroupRPMRatioRequest"
  2096. }
  2097. }
  2098. ],
  2099. "responses": {
  2100. "200": {
  2101. "description": "OK",
  2102. "schema": {
  2103. "$ref": "#/definitions/middleware.APIResponse"
  2104. }
  2105. }
  2106. }
  2107. }
  2108. },
  2109. "/api/group/{group}/status": {
  2110. "post": {
  2111. "security": [
  2112. {
  2113. "ApiKeyAuth": []
  2114. }
  2115. ],
  2116. "description": "Updates the status of a group",
  2117. "consumes": [
  2118. "application/json"
  2119. ],
  2120. "produces": [
  2121. "application/json"
  2122. ],
  2123. "tags": [
  2124. "group"
  2125. ],
  2126. "summary": "Update group status",
  2127. "parameters": [
  2128. {
  2129. "type": "string",
  2130. "description": "Group name",
  2131. "name": "group",
  2132. "in": "path",
  2133. "required": true
  2134. },
  2135. {
  2136. "description": "Status information",
  2137. "name": "status",
  2138. "in": "body",
  2139. "required": true,
  2140. "schema": {
  2141. "$ref": "#/definitions/controller.UpdateGroupStatusRequest"
  2142. }
  2143. }
  2144. ],
  2145. "responses": {
  2146. "200": {
  2147. "description": "OK",
  2148. "schema": {
  2149. "$ref": "#/definitions/middleware.APIResponse"
  2150. }
  2151. }
  2152. }
  2153. }
  2154. },
  2155. "/api/group/{group}/tpm_ratio": {
  2156. "post": {
  2157. "security": [
  2158. {
  2159. "ApiKeyAuth": []
  2160. }
  2161. ],
  2162. "description": "Updates the TPM (Tokens Per Minute) ratio for a group",
  2163. "consumes": [
  2164. "application/json"
  2165. ],
  2166. "produces": [
  2167. "application/json"
  2168. ],
  2169. "tags": [
  2170. "group"
  2171. ],
  2172. "summary": "Update group TPM ratio",
  2173. "parameters": [
  2174. {
  2175. "type": "string",
  2176. "description": "Group name",
  2177. "name": "group",
  2178. "in": "path",
  2179. "required": true
  2180. },
  2181. {
  2182. "description": "TPM ratio information",
  2183. "name": "data",
  2184. "in": "body",
  2185. "required": true,
  2186. "schema": {
  2187. "$ref": "#/definitions/controller.UpdateGroupTPMRatioRequest"
  2188. }
  2189. }
  2190. ],
  2191. "responses": {
  2192. "200": {
  2193. "description": "OK",
  2194. "schema": {
  2195. "$ref": "#/definitions/middleware.APIResponse"
  2196. }
  2197. }
  2198. }
  2199. }
  2200. },
  2201. "/api/groups/": {
  2202. "get": {
  2203. "security": [
  2204. {
  2205. "ApiKeyAuth": []
  2206. }
  2207. ],
  2208. "description": "Returns a list of all groups with pagination",
  2209. "produces": [
  2210. "application/json"
  2211. ],
  2212. "tags": [
  2213. "groups"
  2214. ],
  2215. "summary": "Get all groups",
  2216. "parameters": [
  2217. {
  2218. "type": "integer",
  2219. "description": "Page number",
  2220. "name": "page",
  2221. "in": "query"
  2222. },
  2223. {
  2224. "type": "integer",
  2225. "description": "Items per page",
  2226. "name": "per_page",
  2227. "in": "query"
  2228. }
  2229. ],
  2230. "responses": {
  2231. "200": {
  2232. "description": "OK",
  2233. "schema": {
  2234. "allOf": [
  2235. {
  2236. "$ref": "#/definitions/middleware.APIResponse"
  2237. },
  2238. {
  2239. "type": "object",
  2240. "properties": {
  2241. "data": {
  2242. "type": "object",
  2243. "additionalProperties": {
  2244. "allOf": [
  2245. {},
  2246. {
  2247. "type": "object",
  2248. "properties": {
  2249. "groups": {
  2250. "type": "array",
  2251. "items": {
  2252. "$ref": "#/definitions/controller.GroupResponse"
  2253. }
  2254. },
  2255. "total": {
  2256. "type": "integer"
  2257. }
  2258. }
  2259. }
  2260. ]
  2261. }
  2262. }
  2263. }
  2264. }
  2265. ]
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "/api/groups/batch_delete": {
  2272. "post": {
  2273. "security": [
  2274. {
  2275. "ApiKeyAuth": []
  2276. }
  2277. ],
  2278. "description": "Deletes multiple groups by their IDs",
  2279. "consumes": [
  2280. "application/json"
  2281. ],
  2282. "produces": [
  2283. "application/json"
  2284. ],
  2285. "tags": [
  2286. "groups"
  2287. ],
  2288. "summary": "Delete multiple groups",
  2289. "parameters": [
  2290. {
  2291. "description": "Group IDs",
  2292. "name": "ids",
  2293. "in": "body",
  2294. "required": true,
  2295. "schema": {
  2296. "type": "array",
  2297. "items": {
  2298. "type": "string"
  2299. }
  2300. }
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "OK",
  2306. "schema": {
  2307. "$ref": "#/definitions/middleware.APIResponse"
  2308. }
  2309. }
  2310. }
  2311. }
  2312. },
  2313. "/api/groups/batch_status": {
  2314. "post": {
  2315. "security": [
  2316. {
  2317. "ApiKeyAuth": []
  2318. }
  2319. ],
  2320. "description": "Updates the status of multiple groups",
  2321. "consumes": [
  2322. "application/json"
  2323. ],
  2324. "produces": [
  2325. "application/json"
  2326. ],
  2327. "tags": [
  2328. "groups"
  2329. ],
  2330. "summary": "Update multiple groups status",
  2331. "parameters": [
  2332. {
  2333. "description": "Group IDs and status",
  2334. "name": "data",
  2335. "in": "body",
  2336. "required": true,
  2337. "schema": {
  2338. "$ref": "#/definitions/controller.UpdateGroupsStatusRequest"
  2339. }
  2340. }
  2341. ],
  2342. "responses": {
  2343. "200": {
  2344. "description": "OK",
  2345. "schema": {
  2346. "$ref": "#/definitions/middleware.APIResponse"
  2347. }
  2348. }
  2349. }
  2350. }
  2351. },
  2352. "/api/groups/ip_groups": {
  2353. "get": {
  2354. "security": [
  2355. {
  2356. "ApiKeyAuth": []
  2357. }
  2358. ],
  2359. "description": "Get IP group list",
  2360. "produces": [
  2361. "application/json"
  2362. ],
  2363. "tags": [
  2364. "groups"
  2365. ],
  2366. "summary": "Get IP group list",
  2367. "parameters": [
  2368. {
  2369. "type": "integer",
  2370. "description": "Threshold",
  2371. "name": "threshold",
  2372. "in": "query"
  2373. },
  2374. {
  2375. "type": "integer",
  2376. "description": "Start timestamp",
  2377. "name": "start_timestamp",
  2378. "in": "query"
  2379. },
  2380. {
  2381. "type": "integer",
  2382. "description": "End timestamp",
  2383. "name": "end_timestamp",
  2384. "in": "query"
  2385. }
  2386. ],
  2387. "responses": {
  2388. "200": {
  2389. "description": "OK",
  2390. "schema": {
  2391. "allOf": [
  2392. {
  2393. "$ref": "#/definitions/middleware.APIResponse"
  2394. },
  2395. {
  2396. "type": "object",
  2397. "properties": {
  2398. "data": {
  2399. "type": "object",
  2400. "additionalProperties": {
  2401. "type": "array",
  2402. "items": {
  2403. "type": "string"
  2404. }
  2405. }
  2406. }
  2407. }
  2408. }
  2409. ]
  2410. }
  2411. }
  2412. }
  2413. }
  2414. },
  2415. "/api/groups/search": {
  2416. "get": {
  2417. "security": [
  2418. {
  2419. "ApiKeyAuth": []
  2420. }
  2421. ],
  2422. "description": "Search groups with keyword and pagination",
  2423. "produces": [
  2424. "application/json"
  2425. ],
  2426. "tags": [
  2427. "groups"
  2428. ],
  2429. "summary": "Search groups",
  2430. "parameters": [
  2431. {
  2432. "type": "string",
  2433. "description": "Search keyword",
  2434. "name": "keyword",
  2435. "in": "query",
  2436. "required": true
  2437. },
  2438. {
  2439. "type": "integer",
  2440. "description": "Page number",
  2441. "name": "page",
  2442. "in": "query"
  2443. },
  2444. {
  2445. "type": "integer",
  2446. "description": "Items per page",
  2447. "name": "per_page",
  2448. "in": "query"
  2449. },
  2450. {
  2451. "type": "integer",
  2452. "description": "Status",
  2453. "name": "status",
  2454. "in": "query"
  2455. },
  2456. {
  2457. "type": "string",
  2458. "description": "Order",
  2459. "name": "order",
  2460. "in": "query"
  2461. }
  2462. ],
  2463. "responses": {
  2464. "200": {
  2465. "description": "OK",
  2466. "schema": {
  2467. "allOf": [
  2468. {
  2469. "$ref": "#/definitions/middleware.APIResponse"
  2470. },
  2471. {
  2472. "type": "object",
  2473. "properties": {
  2474. "data": {
  2475. "type": "object",
  2476. "additionalProperties": {
  2477. "allOf": [
  2478. {},
  2479. {
  2480. "type": "object",
  2481. "properties": {
  2482. "groups": {
  2483. "type": "array",
  2484. "items": {
  2485. "$ref": "#/definitions/controller.GroupResponse"
  2486. }
  2487. },
  2488. "total": {
  2489. "type": "integer"
  2490. }
  2491. }
  2492. }
  2493. ]
  2494. }
  2495. }
  2496. }
  2497. }
  2498. ]
  2499. }
  2500. }
  2501. }
  2502. }
  2503. },
  2504. "/api/log/{group}": {
  2505. "get": {
  2506. "security": [
  2507. {
  2508. "ApiKeyAuth": []
  2509. }
  2510. ],
  2511. "description": "Get logs for a specific group",
  2512. "produces": [
  2513. "application/json"
  2514. ],
  2515. "tags": [
  2516. "log"
  2517. ],
  2518. "summary": "Get group logs",
  2519. "parameters": [
  2520. {
  2521. "type": "string",
  2522. "description": "Group name",
  2523. "name": "group",
  2524. "in": "path",
  2525. "required": true
  2526. },
  2527. {
  2528. "type": "integer",
  2529. "description": "Page number",
  2530. "name": "page",
  2531. "in": "query"
  2532. },
  2533. {
  2534. "type": "integer",
  2535. "description": "Items per page",
  2536. "name": "per_page",
  2537. "in": "query"
  2538. },
  2539. {
  2540. "type": "integer",
  2541. "description": "Start timestamp (milliseconds)",
  2542. "name": "start_timestamp",
  2543. "in": "query"
  2544. },
  2545. {
  2546. "type": "integer",
  2547. "description": "End timestamp (milliseconds)",
  2548. "name": "end_timestamp",
  2549. "in": "query"
  2550. },
  2551. {
  2552. "type": "string",
  2553. "description": "Token name",
  2554. "name": "token_name",
  2555. "in": "query"
  2556. },
  2557. {
  2558. "type": "string",
  2559. "description": "Model name",
  2560. "name": "model_name",
  2561. "in": "query"
  2562. },
  2563. {
  2564. "type": "integer",
  2565. "description": "Channel ID",
  2566. "name": "channel",
  2567. "in": "query"
  2568. },
  2569. {
  2570. "type": "integer",
  2571. "description": "Token ID",
  2572. "name": "token_id",
  2573. "in": "query"
  2574. },
  2575. {
  2576. "type": "string",
  2577. "description": "Order",
  2578. "name": "order",
  2579. "in": "query"
  2580. },
  2581. {
  2582. "type": "string",
  2583. "description": "Request ID",
  2584. "name": "request_id",
  2585. "in": "query"
  2586. },
  2587. {
  2588. "type": "string",
  2589. "description": "Status code type",
  2590. "name": "code_type",
  2591. "in": "query"
  2592. },
  2593. {
  2594. "type": "integer",
  2595. "description": "Status code",
  2596. "name": "code",
  2597. "in": "query"
  2598. },
  2599. {
  2600. "type": "boolean",
  2601. "description": "With body",
  2602. "name": "with_body",
  2603. "in": "query"
  2604. },
  2605. {
  2606. "type": "string",
  2607. "description": "IP",
  2608. "name": "ip",
  2609. "in": "query"
  2610. },
  2611. {
  2612. "type": "string",
  2613. "description": "User",
  2614. "name": "user",
  2615. "in": "query"
  2616. }
  2617. ],
  2618. "responses": {
  2619. "200": {
  2620. "description": "OK",
  2621. "schema": {
  2622. "allOf": [
  2623. {
  2624. "$ref": "#/definitions/middleware.APIResponse"
  2625. },
  2626. {
  2627. "type": "object",
  2628. "properties": {
  2629. "data": {
  2630. "$ref": "#/definitions/model.GetGroupLogsResult"
  2631. }
  2632. }
  2633. }
  2634. ]
  2635. }
  2636. }
  2637. }
  2638. }
  2639. },
  2640. "/api/log/{group}/detail/{log_id}": {
  2641. "get": {
  2642. "security": [
  2643. {
  2644. "ApiKeyAuth": []
  2645. }
  2646. ],
  2647. "description": "Get detailed information about a specific log entry in a group",
  2648. "produces": [
  2649. "application/json"
  2650. ],
  2651. "tags": [
  2652. "log"
  2653. ],
  2654. "summary": "Get group log detail",
  2655. "parameters": [
  2656. {
  2657. "type": "string",
  2658. "description": "Group name",
  2659. "name": "group",
  2660. "in": "path",
  2661. "required": true
  2662. },
  2663. {
  2664. "type": "string",
  2665. "description": "Log ID",
  2666. "name": "log_id",
  2667. "in": "path",
  2668. "required": true
  2669. }
  2670. ],
  2671. "responses": {
  2672. "200": {
  2673. "description": "OK",
  2674. "schema": {
  2675. "allOf": [
  2676. {
  2677. "$ref": "#/definitions/middleware.APIResponse"
  2678. },
  2679. {
  2680. "type": "object",
  2681. "properties": {
  2682. "data": {
  2683. "$ref": "#/definitions/model.RequestDetail"
  2684. }
  2685. }
  2686. }
  2687. ]
  2688. }
  2689. }
  2690. }
  2691. }
  2692. },
  2693. "/api/log/{group}/search": {
  2694. "get": {
  2695. "security": [
  2696. {
  2697. "ApiKeyAuth": []
  2698. }
  2699. ],
  2700. "description": "Search logs for a specific group with filters",
  2701. "produces": [
  2702. "application/json"
  2703. ],
  2704. "tags": [
  2705. "log"
  2706. ],
  2707. "summary": "Search group logs",
  2708. "parameters": [
  2709. {
  2710. "type": "string",
  2711. "description": "Group name",
  2712. "name": "group",
  2713. "in": "path",
  2714. "required": true
  2715. },
  2716. {
  2717. "type": "string",
  2718. "description": "Keyword",
  2719. "name": "keyword",
  2720. "in": "query"
  2721. },
  2722. {
  2723. "type": "integer",
  2724. "description": "Page number",
  2725. "name": "page",
  2726. "in": "query"
  2727. },
  2728. {
  2729. "type": "integer",
  2730. "description": "Items per page",
  2731. "name": "per_page",
  2732. "in": "query"
  2733. },
  2734. {
  2735. "type": "integer",
  2736. "description": "Start timestamp (milliseconds)",
  2737. "name": "start_timestamp",
  2738. "in": "query"
  2739. },
  2740. {
  2741. "type": "integer",
  2742. "description": "End timestamp (milliseconds)",
  2743. "name": "end_timestamp",
  2744. "in": "query"
  2745. },
  2746. {
  2747. "type": "string",
  2748. "description": "Filter by token name",
  2749. "name": "token_name",
  2750. "in": "query"
  2751. },
  2752. {
  2753. "type": "string",
  2754. "description": "Filter by model name",
  2755. "name": "model_name",
  2756. "in": "query"
  2757. },
  2758. {
  2759. "type": "integer",
  2760. "description": "Filter by token id",
  2761. "name": "token_id",
  2762. "in": "query"
  2763. },
  2764. {
  2765. "type": "string",
  2766. "description": "Order",
  2767. "name": "order",
  2768. "in": "query"
  2769. },
  2770. {
  2771. "type": "string",
  2772. "description": "Request ID",
  2773. "name": "request_id",
  2774. "in": "query"
  2775. },
  2776. {
  2777. "type": "string",
  2778. "description": "Status code type",
  2779. "name": "code_type",
  2780. "in": "query"
  2781. },
  2782. {
  2783. "type": "integer",
  2784. "description": "Status code",
  2785. "name": "code",
  2786. "in": "query"
  2787. },
  2788. {
  2789. "type": "boolean",
  2790. "description": "With body",
  2791. "name": "with_body",
  2792. "in": "query"
  2793. },
  2794. {
  2795. "type": "string",
  2796. "description": "IP",
  2797. "name": "ip",
  2798. "in": "query"
  2799. },
  2800. {
  2801. "type": "string",
  2802. "description": "User",
  2803. "name": "user",
  2804. "in": "query"
  2805. }
  2806. ],
  2807. "responses": {
  2808. "200": {
  2809. "description": "OK",
  2810. "schema": {
  2811. "allOf": [
  2812. {
  2813. "$ref": "#/definitions/middleware.APIResponse"
  2814. },
  2815. {
  2816. "type": "object",
  2817. "properties": {
  2818. "data": {
  2819. "$ref": "#/definitions/model.GetGroupLogsResult"
  2820. }
  2821. }
  2822. }
  2823. ]
  2824. }
  2825. }
  2826. }
  2827. }
  2828. },
  2829. "/api/logs/": {
  2830. "get": {
  2831. "security": [
  2832. {
  2833. "ApiKeyAuth": []
  2834. }
  2835. ],
  2836. "description": "Returns a paginated list of all logs with optional filters",
  2837. "produces": [
  2838. "application/json"
  2839. ],
  2840. "tags": [
  2841. "logs"
  2842. ],
  2843. "summary": "Get all logs",
  2844. "parameters": [
  2845. {
  2846. "type": "integer",
  2847. "description": "Page number",
  2848. "name": "page",
  2849. "in": "query"
  2850. },
  2851. {
  2852. "type": "integer",
  2853. "description": "Items per page",
  2854. "name": "per_page",
  2855. "in": "query"
  2856. },
  2857. {
  2858. "type": "integer",
  2859. "description": "Start timestamp (milliseconds)",
  2860. "name": "start_timestamp",
  2861. "in": "query"
  2862. },
  2863. {
  2864. "type": "integer",
  2865. "description": "End timestamp (milliseconds)",
  2866. "name": "end_timestamp",
  2867. "in": "query"
  2868. },
  2869. {
  2870. "type": "string",
  2871. "description": "Model name",
  2872. "name": "model_name",
  2873. "in": "query"
  2874. },
  2875. {
  2876. "type": "integer",
  2877. "description": "Channel ID",
  2878. "name": "channel",
  2879. "in": "query"
  2880. },
  2881. {
  2882. "type": "string",
  2883. "description": "Order",
  2884. "name": "order",
  2885. "in": "query"
  2886. },
  2887. {
  2888. "type": "string",
  2889. "description": "Request ID",
  2890. "name": "request_id",
  2891. "in": "query"
  2892. },
  2893. {
  2894. "type": "string",
  2895. "description": "Status code type",
  2896. "name": "code_type",
  2897. "in": "query"
  2898. },
  2899. {
  2900. "type": "integer",
  2901. "description": "Status code",
  2902. "name": "code",
  2903. "in": "query"
  2904. },
  2905. {
  2906. "type": "boolean",
  2907. "description": "With body",
  2908. "name": "with_body",
  2909. "in": "query"
  2910. },
  2911. {
  2912. "type": "string",
  2913. "description": "IP",
  2914. "name": "ip",
  2915. "in": "query"
  2916. },
  2917. {
  2918. "type": "string",
  2919. "description": "User",
  2920. "name": "user",
  2921. "in": "query"
  2922. }
  2923. ],
  2924. "responses": {
  2925. "200": {
  2926. "description": "OK",
  2927. "schema": {
  2928. "allOf": [
  2929. {
  2930. "$ref": "#/definitions/middleware.APIResponse"
  2931. },
  2932. {
  2933. "type": "object",
  2934. "properties": {
  2935. "data": {
  2936. "$ref": "#/definitions/model.GetLogsResult"
  2937. }
  2938. }
  2939. }
  2940. ]
  2941. }
  2942. }
  2943. }
  2944. },
  2945. "delete": {
  2946. "security": [
  2947. {
  2948. "ApiKeyAuth": []
  2949. }
  2950. ],
  2951. "description": "Deletes logs older than the specified retention period",
  2952. "produces": [
  2953. "application/json"
  2954. ],
  2955. "tags": [
  2956. "logs"
  2957. ],
  2958. "summary": "Delete historical logs",
  2959. "parameters": [
  2960. {
  2961. "type": "integer",
  2962. "description": "Timestamp (milliseconds)",
  2963. "name": "timestamp",
  2964. "in": "query",
  2965. "required": true
  2966. }
  2967. ],
  2968. "responses": {
  2969. "200": {
  2970. "description": "OK",
  2971. "schema": {
  2972. "allOf": [
  2973. {
  2974. "$ref": "#/definitions/middleware.APIResponse"
  2975. },
  2976. {
  2977. "type": "object",
  2978. "properties": {
  2979. "data": {
  2980. "type": "integer"
  2981. }
  2982. }
  2983. }
  2984. ]
  2985. }
  2986. }
  2987. }
  2988. }
  2989. },
  2990. "/api/logs/consume_error": {
  2991. "get": {
  2992. "security": [
  2993. {
  2994. "ApiKeyAuth": []
  2995. }
  2996. ],
  2997. "description": "Search for logs with consumption errors",
  2998. "produces": [
  2999. "application/json"
  3000. ],
  3001. "tags": [
  3002. "logs"
  3003. ],
  3004. "summary": "Search consumption errors",
  3005. "parameters": [
  3006. {
  3007. "type": "integer",
  3008. "description": "Page number",
  3009. "name": "page",
  3010. "in": "query"
  3011. },
  3012. {
  3013. "type": "integer",
  3014. "description": "Items per page",
  3015. "name": "per_page",
  3016. "in": "query"
  3017. },
  3018. {
  3019. "type": "integer",
  3020. "description": "Start timestamp (milliseconds)",
  3021. "name": "start_timestamp",
  3022. "in": "query"
  3023. },
  3024. {
  3025. "type": "integer",
  3026. "description": "End timestamp (milliseconds)",
  3027. "name": "end_timestamp",
  3028. "in": "query"
  3029. },
  3030. {
  3031. "type": "string",
  3032. "description": "Keyword",
  3033. "name": "keyword",
  3034. "in": "query"
  3035. },
  3036. {
  3037. "type": "string",
  3038. "description": "Group",
  3039. "name": "group",
  3040. "in": "query"
  3041. },
  3042. {
  3043. "type": "string",
  3044. "description": "Token name",
  3045. "name": "token_name",
  3046. "in": "query"
  3047. },
  3048. {
  3049. "type": "string",
  3050. "description": "Model name",
  3051. "name": "model_name",
  3052. "in": "query"
  3053. },
  3054. {
  3055. "type": "string",
  3056. "description": "Content",
  3057. "name": "content",
  3058. "in": "query"
  3059. },
  3060. {
  3061. "type": "integer",
  3062. "description": "Token ID",
  3063. "name": "token_id",
  3064. "in": "query"
  3065. },
  3066. {
  3067. "type": "string",
  3068. "description": "Order",
  3069. "name": "order",
  3070. "in": "query"
  3071. },
  3072. {
  3073. "type": "string",
  3074. "description": "Request ID",
  3075. "name": "request_id",
  3076. "in": "query"
  3077. }
  3078. ],
  3079. "responses": {
  3080. "200": {
  3081. "description": "OK",
  3082. "schema": {
  3083. "allOf": [
  3084. {
  3085. "$ref": "#/definitions/middleware.APIResponse"
  3086. },
  3087. {
  3088. "type": "object",
  3089. "properties": {
  3090. "data": {
  3091. "type": "object",
  3092. "additionalProperties": {
  3093. "allOf": [
  3094. {},
  3095. {
  3096. "type": "object",
  3097. "properties": {
  3098. "logs": {
  3099. "type": "array",
  3100. "items": {
  3101. "$ref": "#/definitions/model.RequestDetail"
  3102. }
  3103. },
  3104. "total": {
  3105. "type": "integer"
  3106. }
  3107. }
  3108. }
  3109. ]
  3110. }
  3111. }
  3112. }
  3113. }
  3114. ]
  3115. }
  3116. }
  3117. }
  3118. }
  3119. },
  3120. "/api/logs/detail/{log_id}": {
  3121. "get": {
  3122. "security": [
  3123. {
  3124. "ApiKeyAuth": []
  3125. }
  3126. ],
  3127. "description": "Get detailed information about a specific log entry",
  3128. "produces": [
  3129. "application/json"
  3130. ],
  3131. "tags": [
  3132. "logs"
  3133. ],
  3134. "summary": "Get log detail",
  3135. "parameters": [
  3136. {
  3137. "type": "string",
  3138. "description": "Log ID",
  3139. "name": "log_id",
  3140. "in": "path",
  3141. "required": true
  3142. }
  3143. ],
  3144. "responses": {
  3145. "200": {
  3146. "description": "OK",
  3147. "schema": {
  3148. "allOf": [
  3149. {
  3150. "$ref": "#/definitions/middleware.APIResponse"
  3151. },
  3152. {
  3153. "type": "object",
  3154. "properties": {
  3155. "data": {
  3156. "$ref": "#/definitions/model.RequestDetail"
  3157. }
  3158. }
  3159. }
  3160. ]
  3161. }
  3162. }
  3163. }
  3164. }
  3165. },
  3166. "/api/logs/search": {
  3167. "get": {
  3168. "security": [
  3169. {
  3170. "ApiKeyAuth": []
  3171. }
  3172. ],
  3173. "description": "Search logs with various filters",
  3174. "produces": [
  3175. "application/json"
  3176. ],
  3177. "tags": [
  3178. "logs"
  3179. ],
  3180. "summary": "Search logs",
  3181. "parameters": [
  3182. {
  3183. "type": "string",
  3184. "description": "Keyword",
  3185. "name": "keyword",
  3186. "in": "query"
  3187. },
  3188. {
  3189. "type": "integer",
  3190. "description": "Page number",
  3191. "name": "page",
  3192. "in": "query"
  3193. },
  3194. {
  3195. "type": "integer",
  3196. "description": "Items per page",
  3197. "name": "per_page",
  3198. "in": "query"
  3199. },
  3200. {
  3201. "type": "integer",
  3202. "description": "Start timestamp (milliseconds)",
  3203. "name": "start_timestamp",
  3204. "in": "query"
  3205. },
  3206. {
  3207. "type": "integer",
  3208. "description": "End timestamp (milliseconds)",
  3209. "name": "end_timestamp",
  3210. "in": "query"
  3211. },
  3212. {
  3213. "type": "string",
  3214. "description": "Filter by model name",
  3215. "name": "model_name",
  3216. "in": "query"
  3217. },
  3218. {
  3219. "type": "integer",
  3220. "description": "Filter by channel",
  3221. "name": "channel",
  3222. "in": "query"
  3223. },
  3224. {
  3225. "type": "integer",
  3226. "description": "Filter by token id",
  3227. "name": "token_id",
  3228. "in": "query"
  3229. },
  3230. {
  3231. "type": "string",
  3232. "description": "Order",
  3233. "name": "order",
  3234. "in": "query"
  3235. },
  3236. {
  3237. "type": "string",
  3238. "description": "Request ID",
  3239. "name": "request_id",
  3240. "in": "query"
  3241. },
  3242. {
  3243. "type": "string",
  3244. "description": "Status code type",
  3245. "name": "code_type",
  3246. "in": "query"
  3247. },
  3248. {
  3249. "type": "integer",
  3250. "description": "Status code",
  3251. "name": "code",
  3252. "in": "query"
  3253. },
  3254. {
  3255. "type": "boolean",
  3256. "description": "With body",
  3257. "name": "with_body",
  3258. "in": "query"
  3259. },
  3260. {
  3261. "type": "string",
  3262. "description": "IP",
  3263. "name": "ip",
  3264. "in": "query"
  3265. },
  3266. {
  3267. "type": "string",
  3268. "description": "User",
  3269. "name": "user",
  3270. "in": "query"
  3271. }
  3272. ],
  3273. "responses": {
  3274. "200": {
  3275. "description": "OK",
  3276. "schema": {
  3277. "allOf": [
  3278. {
  3279. "$ref": "#/definitions/middleware.APIResponse"
  3280. },
  3281. {
  3282. "type": "object",
  3283. "properties": {
  3284. "data": {
  3285. "$ref": "#/definitions/model.GetLogsResult"
  3286. }
  3287. }
  3288. }
  3289. ]
  3290. }
  3291. }
  3292. }
  3293. }
  3294. },
  3295. "/api/mcp/group/all": {
  3296. "get": {
  3297. "security": [
  3298. {
  3299. "ApiKeyAuth": []
  3300. }
  3301. ],
  3302. "description": "Get all Group MCPs with filtering",
  3303. "produces": [
  3304. "application/json"
  3305. ],
  3306. "tags": [
  3307. "mcp"
  3308. ],
  3309. "summary": "Get all Group MCPs",
  3310. "parameters": [
  3311. {
  3312. "type": "integer",
  3313. "description": "MCP status",
  3314. "name": "status",
  3315. "in": "query"
  3316. }
  3317. ],
  3318. "responses": {
  3319. "200": {
  3320. "description": "OK",
  3321. "schema": {
  3322. "allOf": [
  3323. {
  3324. "$ref": "#/definitions/middleware.APIResponse"
  3325. },
  3326. {
  3327. "type": "object",
  3328. "properties": {
  3329. "data": {
  3330. "type": "array",
  3331. "items": {
  3332. "$ref": "#/definitions/controller.GroupMCPResponse"
  3333. }
  3334. }
  3335. }
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. }
  3342. },
  3343. "/api/mcp/group/{group}": {
  3344. "get": {
  3345. "security": [
  3346. {
  3347. "ApiKeyAuth": []
  3348. }
  3349. ],
  3350. "description": "Get a list of Group MCPs with pagination and filtering",
  3351. "produces": [
  3352. "application/json"
  3353. ],
  3354. "tags": [
  3355. "mcp"
  3356. ],
  3357. "summary": "Get Group MCPs",
  3358. "parameters": [
  3359. {
  3360. "type": "string",
  3361. "description": "Group ID",
  3362. "name": "group",
  3363. "in": "path",
  3364. "required": true
  3365. },
  3366. {
  3367. "type": "integer",
  3368. "description": "Page number",
  3369. "name": "page",
  3370. "in": "query"
  3371. },
  3372. {
  3373. "type": "integer",
  3374. "description": "Items per page",
  3375. "name": "per_page",
  3376. "in": "query"
  3377. },
  3378. {
  3379. "type": "string",
  3380. "description": "MCP id",
  3381. "name": "id",
  3382. "in": "query"
  3383. },
  3384. {
  3385. "type": "string",
  3386. "description": "MCP type, mcp_proxy_sse, mcp_proxy_streamable, mcp_openapi",
  3387. "name": "type",
  3388. "in": "query"
  3389. },
  3390. {
  3391. "type": "string",
  3392. "description": "Search keyword",
  3393. "name": "keyword",
  3394. "in": "query"
  3395. },
  3396. {
  3397. "type": "integer",
  3398. "description": "MCP status",
  3399. "name": "status",
  3400. "in": "query"
  3401. }
  3402. ],
  3403. "responses": {
  3404. "200": {
  3405. "description": "OK",
  3406. "schema": {
  3407. "allOf": [
  3408. {
  3409. "$ref": "#/definitions/middleware.APIResponse"
  3410. },
  3411. {
  3412. "type": "object",
  3413. "properties": {
  3414. "data": {
  3415. "type": "array",
  3416. "items": {
  3417. "$ref": "#/definitions/controller.GroupMCPResponse"
  3418. }
  3419. }
  3420. }
  3421. }
  3422. ]
  3423. }
  3424. }
  3425. }
  3426. },
  3427. "post": {
  3428. "security": [
  3429. {
  3430. "ApiKeyAuth": []
  3431. }
  3432. ],
  3433. "description": "Create a new Group MCP",
  3434. "consumes": [
  3435. "application/json"
  3436. ],
  3437. "produces": [
  3438. "application/json"
  3439. ],
  3440. "tags": [
  3441. "mcp"
  3442. ],
  3443. "summary": "Create Group MCP",
  3444. "parameters": [
  3445. {
  3446. "type": "string",
  3447. "description": "Group ID",
  3448. "name": "group",
  3449. "in": "path",
  3450. "required": true
  3451. },
  3452. {
  3453. "description": "Group MCP object",
  3454. "name": "mcp",
  3455. "in": "body",
  3456. "required": true,
  3457. "schema": {
  3458. "$ref": "#/definitions/model.GroupMCP"
  3459. }
  3460. }
  3461. ],
  3462. "responses": {
  3463. "200": {
  3464. "description": "OK",
  3465. "schema": {
  3466. "allOf": [
  3467. {
  3468. "$ref": "#/definitions/middleware.APIResponse"
  3469. },
  3470. {
  3471. "type": "object",
  3472. "properties": {
  3473. "data": {
  3474. "$ref": "#/definitions/controller.GroupMCPResponse"
  3475. }
  3476. }
  3477. }
  3478. ]
  3479. }
  3480. }
  3481. }
  3482. }
  3483. },
  3484. "/api/mcp/group/{group}/{id}": {
  3485. "get": {
  3486. "security": [
  3487. {
  3488. "ApiKeyAuth": []
  3489. }
  3490. ],
  3491. "description": "Get a specific Group MCP by its ID and Group ID",
  3492. "produces": [
  3493. "application/json"
  3494. ],
  3495. "tags": [
  3496. "mcp"
  3497. ],
  3498. "summary": "Get Group MCP by ID",
  3499. "parameters": [
  3500. {
  3501. "type": "string",
  3502. "description": "MCP ID",
  3503. "name": "id",
  3504. "in": "path",
  3505. "required": true
  3506. },
  3507. {
  3508. "type": "string",
  3509. "description": "Group ID",
  3510. "name": "group",
  3511. "in": "path",
  3512. "required": true
  3513. }
  3514. ],
  3515. "responses": {
  3516. "200": {
  3517. "description": "OK",
  3518. "schema": {
  3519. "allOf": [
  3520. {
  3521. "$ref": "#/definitions/middleware.APIResponse"
  3522. },
  3523. {
  3524. "type": "object",
  3525. "properties": {
  3526. "data": {
  3527. "$ref": "#/definitions/controller.GroupMCPResponse"
  3528. }
  3529. }
  3530. }
  3531. ]
  3532. }
  3533. }
  3534. }
  3535. },
  3536. "put": {
  3537. "security": [
  3538. {
  3539. "ApiKeyAuth": []
  3540. }
  3541. ],
  3542. "description": "Update an existing Group MCP",
  3543. "consumes": [
  3544. "application/json"
  3545. ],
  3546. "produces": [
  3547. "application/json"
  3548. ],
  3549. "tags": [
  3550. "mcp"
  3551. ],
  3552. "summary": "Update Group MCP",
  3553. "parameters": [
  3554. {
  3555. "type": "string",
  3556. "description": "MCP ID",
  3557. "name": "id",
  3558. "in": "path",
  3559. "required": true
  3560. },
  3561. {
  3562. "type": "string",
  3563. "description": "Group ID",
  3564. "name": "group",
  3565. "in": "path",
  3566. "required": true
  3567. },
  3568. {
  3569. "description": "Group MCP object",
  3570. "name": "mcp",
  3571. "in": "body",
  3572. "required": true,
  3573. "schema": {
  3574. "$ref": "#/definitions/model.GroupMCP"
  3575. }
  3576. }
  3577. ],
  3578. "responses": {
  3579. "200": {
  3580. "description": "OK",
  3581. "schema": {
  3582. "allOf": [
  3583. {
  3584. "$ref": "#/definitions/middleware.APIResponse"
  3585. },
  3586. {
  3587. "type": "object",
  3588. "properties": {
  3589. "data": {
  3590. "$ref": "#/definitions/controller.GroupMCPResponse"
  3591. }
  3592. }
  3593. }
  3594. ]
  3595. }
  3596. }
  3597. }
  3598. },
  3599. "delete": {
  3600. "security": [
  3601. {
  3602. "ApiKeyAuth": []
  3603. }
  3604. ],
  3605. "description": "Delete a Group MCP by ID and Group ID",
  3606. "produces": [
  3607. "application/json"
  3608. ],
  3609. "tags": [
  3610. "mcp"
  3611. ],
  3612. "summary": "Delete Group MCP",
  3613. "parameters": [
  3614. {
  3615. "type": "string",
  3616. "description": "MCP ID",
  3617. "name": "id",
  3618. "in": "path",
  3619. "required": true
  3620. },
  3621. {
  3622. "type": "string",
  3623. "description": "Group ID",
  3624. "name": "group",
  3625. "in": "path",
  3626. "required": true
  3627. }
  3628. ],
  3629. "responses": {
  3630. "200": {
  3631. "description": "OK",
  3632. "schema": {
  3633. "$ref": "#/definitions/middleware.APIResponse"
  3634. }
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "/api/mcp/group/{group}/{id}/status": {
  3640. "post": {
  3641. "security": [
  3642. {
  3643. "ApiKeyAuth": []
  3644. }
  3645. ],
  3646. "description": "Update the status of a Group MCP",
  3647. "consumes": [
  3648. "application/json"
  3649. ],
  3650. "produces": [
  3651. "application/json"
  3652. ],
  3653. "tags": [
  3654. "mcp"
  3655. ],
  3656. "summary": "Update Group MCP status",
  3657. "parameters": [
  3658. {
  3659. "type": "string",
  3660. "description": "MCP ID",
  3661. "name": "id",
  3662. "in": "path",
  3663. "required": true
  3664. },
  3665. {
  3666. "type": "string",
  3667. "description": "Group ID",
  3668. "name": "group",
  3669. "in": "path",
  3670. "required": true
  3671. },
  3672. {
  3673. "description": "MCP status",
  3674. "name": "status",
  3675. "in": "body",
  3676. "required": true,
  3677. "schema": {
  3678. "$ref": "#/definitions/controller.UpdateGroupMCPStatusRequest"
  3679. }
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "OK",
  3685. "schema": {
  3686. "$ref": "#/definitions/middleware.APIResponse"
  3687. }
  3688. }
  3689. }
  3690. }
  3691. },
  3692. "/api/mcp/public/": {
  3693. "post": {
  3694. "security": [
  3695. {
  3696. "ApiKeyAuth": []
  3697. }
  3698. ],
  3699. "description": "Create a new MCP",
  3700. "consumes": [
  3701. "application/json"
  3702. ],
  3703. "produces": [
  3704. "application/json"
  3705. ],
  3706. "tags": [
  3707. "mcp"
  3708. ],
  3709. "summary": "Create MCP",
  3710. "parameters": [
  3711. {
  3712. "description": "MCP object",
  3713. "name": "mcp",
  3714. "in": "body",
  3715. "required": true,
  3716. "schema": {
  3717. "$ref": "#/definitions/model.PublicMCP"
  3718. }
  3719. }
  3720. ],
  3721. "responses": {
  3722. "200": {
  3723. "description": "OK",
  3724. "schema": {
  3725. "allOf": [
  3726. {
  3727. "$ref": "#/definitions/middleware.APIResponse"
  3728. },
  3729. {
  3730. "type": "object",
  3731. "properties": {
  3732. "data": {
  3733. "$ref": "#/definitions/controller.PublicMCPResponse"
  3734. }
  3735. }
  3736. }
  3737. ]
  3738. }
  3739. }
  3740. }
  3741. }
  3742. },
  3743. "/api/mcp/public/{id}": {
  3744. "get": {
  3745. "security": [
  3746. {
  3747. "ApiKeyAuth": []
  3748. }
  3749. ],
  3750. "description": "Get a specific MCP by its ID",
  3751. "produces": [
  3752. "application/json"
  3753. ],
  3754. "tags": [
  3755. "mcp"
  3756. ],
  3757. "summary": "Get MCP by ID",
  3758. "parameters": [
  3759. {
  3760. "type": "string",
  3761. "description": "MCP ID",
  3762. "name": "id",
  3763. "in": "path",
  3764. "required": true
  3765. }
  3766. ],
  3767. "responses": {
  3768. "200": {
  3769. "description": "OK",
  3770. "schema": {
  3771. "allOf": [
  3772. {
  3773. "$ref": "#/definitions/middleware.APIResponse"
  3774. },
  3775. {
  3776. "type": "object",
  3777. "properties": {
  3778. "data": {
  3779. "$ref": "#/definitions/controller.PublicMCPResponse"
  3780. }
  3781. }
  3782. }
  3783. ]
  3784. }
  3785. }
  3786. }
  3787. },
  3788. "put": {
  3789. "security": [
  3790. {
  3791. "ApiKeyAuth": []
  3792. }
  3793. ],
  3794. "description": "Save a MCP",
  3795. "consumes": [
  3796. "application/json"
  3797. ],
  3798. "produces": [
  3799. "application/json"
  3800. ],
  3801. "tags": [
  3802. "mcp"
  3803. ],
  3804. "summary": "Save MCP",
  3805. "parameters": [
  3806. {
  3807. "type": "string",
  3808. "description": "MCP ID",
  3809. "name": "id",
  3810. "in": "path",
  3811. "required": true
  3812. },
  3813. {
  3814. "description": "MCP object",
  3815. "name": "mcp",
  3816. "in": "body",
  3817. "required": true,
  3818. "schema": {
  3819. "$ref": "#/definitions/model.PublicMCP"
  3820. }
  3821. }
  3822. ],
  3823. "responses": {
  3824. "200": {
  3825. "description": "OK",
  3826. "schema": {
  3827. "allOf": [
  3828. {
  3829. "$ref": "#/definitions/middleware.APIResponse"
  3830. },
  3831. {
  3832. "type": "object",
  3833. "properties": {
  3834. "data": {
  3835. "$ref": "#/definitions/controller.PublicMCPResponse"
  3836. }
  3837. }
  3838. }
  3839. ]
  3840. }
  3841. }
  3842. }
  3843. },
  3844. "post": {
  3845. "security": [
  3846. {
  3847. "ApiKeyAuth": []
  3848. }
  3849. ],
  3850. "description": "Update an existing MCP",
  3851. "consumes": [
  3852. "application/json"
  3853. ],
  3854. "produces": [
  3855. "application/json"
  3856. ],
  3857. "tags": [
  3858. "mcp"
  3859. ],
  3860. "summary": "Update MCP",
  3861. "parameters": [
  3862. {
  3863. "type": "string",
  3864. "description": "MCP ID",
  3865. "name": "id",
  3866. "in": "path",
  3867. "required": true
  3868. },
  3869. {
  3870. "description": "MCP object",
  3871. "name": "mcp",
  3872. "in": "body",
  3873. "required": true,
  3874. "schema": {
  3875. "$ref": "#/definitions/model.PublicMCP"
  3876. }
  3877. }
  3878. ],
  3879. "responses": {
  3880. "200": {
  3881. "description": "OK",
  3882. "schema": {
  3883. "allOf": [
  3884. {
  3885. "$ref": "#/definitions/middleware.APIResponse"
  3886. },
  3887. {
  3888. "type": "object",
  3889. "properties": {
  3890. "data": {
  3891. "$ref": "#/definitions/controller.PublicMCPResponse"
  3892. }
  3893. }
  3894. }
  3895. ]
  3896. }
  3897. }
  3898. }
  3899. },
  3900. "delete": {
  3901. "security": [
  3902. {
  3903. "ApiKeyAuth": []
  3904. }
  3905. ],
  3906. "description": "Delete an MCP by ID",
  3907. "produces": [
  3908. "application/json"
  3909. ],
  3910. "tags": [
  3911. "mcp"
  3912. ],
  3913. "summary": "Delete MCP",
  3914. "parameters": [
  3915. {
  3916. "type": "string",
  3917. "description": "MCP ID",
  3918. "name": "id",
  3919. "in": "path",
  3920. "required": true
  3921. }
  3922. ],
  3923. "responses": {
  3924. "200": {
  3925. "description": "OK",
  3926. "schema": {
  3927. "$ref": "#/definitions/middleware.APIResponse"
  3928. }
  3929. }
  3930. }
  3931. }
  3932. },
  3933. "/api/mcp/public/{id}/group/{group}/params": {
  3934. "get": {
  3935. "security": [
  3936. {
  3937. "ApiKeyAuth": []
  3938. }
  3939. ],
  3940. "description": "Get reusing parameters for a specific group and MCP",
  3941. "produces": [
  3942. "application/json"
  3943. ],
  3944. "tags": [
  3945. "mcp"
  3946. ],
  3947. "summary": "Get group MCP reusing parameters",
  3948. "parameters": [
  3949. {
  3950. "type": "string",
  3951. "description": "MCP ID",
  3952. "name": "id",
  3953. "in": "path",
  3954. "required": true
  3955. },
  3956. {
  3957. "type": "string",
  3958. "description": "Group ID",
  3959. "name": "group",
  3960. "in": "path",
  3961. "required": true
  3962. }
  3963. ],
  3964. "responses": {
  3965. "200": {
  3966. "description": "OK",
  3967. "schema": {
  3968. "allOf": [
  3969. {
  3970. "$ref": "#/definitions/middleware.APIResponse"
  3971. },
  3972. {
  3973. "type": "object",
  3974. "properties": {
  3975. "data": {
  3976. "$ref": "#/definitions/model.PublicMCPReusingParam"
  3977. }
  3978. }
  3979. }
  3980. ]
  3981. }
  3982. }
  3983. }
  3984. },
  3985. "post": {
  3986. "security": [
  3987. {
  3988. "ApiKeyAuth": []
  3989. }
  3990. ],
  3991. "description": "Create or update reusing parameters for a specific group and MCP",
  3992. "consumes": [
  3993. "application/json"
  3994. ],
  3995. "produces": [
  3996. "application/json"
  3997. ],
  3998. "tags": [
  3999. "mcp"
  4000. ],
  4001. "summary": "Create or update group MCP reusing parameters",
  4002. "parameters": [
  4003. {
  4004. "type": "string",
  4005. "description": "MCP ID",
  4006. "name": "id",
  4007. "in": "path",
  4008. "required": true
  4009. },
  4010. {
  4011. "type": "string",
  4012. "description": "Group ID",
  4013. "name": "group",
  4014. "in": "path",
  4015. "required": true
  4016. },
  4017. {
  4018. "description": "Reusing parameters",
  4019. "name": "params",
  4020. "in": "body",
  4021. "required": true,
  4022. "schema": {
  4023. "$ref": "#/definitions/model.PublicMCPReusingParam"
  4024. }
  4025. }
  4026. ],
  4027. "responses": {
  4028. "200": {
  4029. "description": "OK",
  4030. "schema": {
  4031. "$ref": "#/definitions/middleware.APIResponse"
  4032. }
  4033. }
  4034. }
  4035. }
  4036. },
  4037. "/api/mcp/public/{id}/status": {
  4038. "post": {
  4039. "security": [
  4040. {
  4041. "ApiKeyAuth": []
  4042. }
  4043. ],
  4044. "description": "Update the status of an MCP",
  4045. "consumes": [
  4046. "application/json"
  4047. ],
  4048. "produces": [
  4049. "application/json"
  4050. ],
  4051. "tags": [
  4052. "mcp"
  4053. ],
  4054. "summary": "Update MCP status",
  4055. "parameters": [
  4056. {
  4057. "type": "string",
  4058. "description": "MCP ID",
  4059. "name": "id",
  4060. "in": "path",
  4061. "required": true
  4062. },
  4063. {
  4064. "description": "MCP status",
  4065. "name": "status",
  4066. "in": "body",
  4067. "required": true,
  4068. "schema": {
  4069. "$ref": "#/definitions/controller.UpdatePublicMCPStatusRequest"
  4070. }
  4071. }
  4072. ],
  4073. "responses": {
  4074. "200": {
  4075. "description": "OK",
  4076. "schema": {
  4077. "$ref": "#/definitions/middleware.APIResponse"
  4078. }
  4079. }
  4080. }
  4081. }
  4082. },
  4083. "/api/mcp/publics/": {
  4084. "get": {
  4085. "security": [
  4086. {
  4087. "ApiKeyAuth": []
  4088. }
  4089. ],
  4090. "description": "Get a list of MCPs with pagination and filtering",
  4091. "produces": [
  4092. "application/json"
  4093. ],
  4094. "tags": [
  4095. "mcp"
  4096. ],
  4097. "summary": "Get MCPs",
  4098. "parameters": [
  4099. {
  4100. "type": "integer",
  4101. "description": "Page number",
  4102. "name": "page",
  4103. "in": "query"
  4104. },
  4105. {
  4106. "type": "integer",
  4107. "description": "Items per page",
  4108. "name": "per_page",
  4109. "in": "query"
  4110. },
  4111. {
  4112. "type": "string",
  4113. "description": "hosted or local",
  4114. "name": "type",
  4115. "in": "query"
  4116. },
  4117. {
  4118. "type": "string",
  4119. "description": "MCP id",
  4120. "name": "id",
  4121. "in": "query"
  4122. },
  4123. {
  4124. "type": "string",
  4125. "description": "Search keyword",
  4126. "name": "keyword",
  4127. "in": "query"
  4128. },
  4129. {
  4130. "type": "integer",
  4131. "description": "MCP status",
  4132. "name": "status",
  4133. "in": "query"
  4134. }
  4135. ],
  4136. "responses": {
  4137. "200": {
  4138. "description": "OK",
  4139. "schema": {
  4140. "allOf": [
  4141. {
  4142. "$ref": "#/definitions/middleware.APIResponse"
  4143. },
  4144. {
  4145. "type": "object",
  4146. "properties": {
  4147. "data": {
  4148. "type": "array",
  4149. "items": {
  4150. "$ref": "#/definitions/controller.PublicMCPResponse"
  4151. }
  4152. }
  4153. }
  4154. }
  4155. ]
  4156. }
  4157. }
  4158. }
  4159. },
  4160. "post": {
  4161. "security": [
  4162. {
  4163. "ApiKeyAuth": []
  4164. }
  4165. ],
  4166. "description": "Save a list of MCPs",
  4167. "consumes": [
  4168. "application/json"
  4169. ],
  4170. "produces": [
  4171. "application/json"
  4172. ],
  4173. "tags": [
  4174. "mcp"
  4175. ],
  4176. "summary": "Save MCPs",
  4177. "parameters": [
  4178. {
  4179. "description": "MCP object",
  4180. "name": "mcp",
  4181. "in": "body",
  4182. "required": true,
  4183. "schema": {
  4184. "type": "array",
  4185. "items": {
  4186. "$ref": "#/definitions/model.PublicMCP"
  4187. }
  4188. }
  4189. }
  4190. ],
  4191. "responses": {
  4192. "200": {
  4193. "description": "OK",
  4194. "schema": {
  4195. "$ref": "#/definitions/middleware.APIResponse"
  4196. }
  4197. }
  4198. }
  4199. }
  4200. },
  4201. "/api/mcp/publics/all": {
  4202. "get": {
  4203. "security": [
  4204. {
  4205. "ApiKeyAuth": []
  4206. }
  4207. ],
  4208. "description": "Get all MCPs with filtering",
  4209. "produces": [
  4210. "application/json"
  4211. ],
  4212. "tags": [
  4213. "mcp"
  4214. ],
  4215. "summary": "Get all MCPs",
  4216. "parameters": [
  4217. {
  4218. "type": "integer",
  4219. "description": "MCP status",
  4220. "name": "status",
  4221. "in": "query"
  4222. }
  4223. ],
  4224. "responses": {
  4225. "200": {
  4226. "description": "OK",
  4227. "schema": {
  4228. "allOf": [
  4229. {
  4230. "$ref": "#/definitions/middleware.APIResponse"
  4231. },
  4232. {
  4233. "type": "object",
  4234. "properties": {
  4235. "data": {
  4236. "type": "array",
  4237. "items": {
  4238. "$ref": "#/definitions/controller.PublicMCPResponse"
  4239. }
  4240. }
  4241. }
  4242. }
  4243. ]
  4244. }
  4245. }
  4246. }
  4247. }
  4248. },
  4249. "/api/model_config/{model}": {
  4250. "get": {
  4251. "security": [
  4252. {
  4253. "ApiKeyAuth": []
  4254. }
  4255. ],
  4256. "description": "Returns a model config",
  4257. "produces": [
  4258. "application/json"
  4259. ],
  4260. "tags": [
  4261. "modelconfig"
  4262. ],
  4263. "summary": "Get model config",
  4264. "parameters": [
  4265. {
  4266. "type": "string",
  4267. "description": "Model name",
  4268. "name": "model",
  4269. "in": "path",
  4270. "required": true
  4271. }
  4272. ],
  4273. "responses": {
  4274. "200": {
  4275. "description": "OK",
  4276. "schema": {
  4277. "allOf": [
  4278. {
  4279. "$ref": "#/definitions/middleware.APIResponse"
  4280. },
  4281. {
  4282. "type": "object",
  4283. "properties": {
  4284. "data": {
  4285. "$ref": "#/definitions/model.ModelConfig"
  4286. }
  4287. }
  4288. }
  4289. ]
  4290. }
  4291. }
  4292. }
  4293. },
  4294. "post": {
  4295. "security": [
  4296. {
  4297. "ApiKeyAuth": []
  4298. }
  4299. ],
  4300. "description": "Saves a model config",
  4301. "produces": [
  4302. "application/json"
  4303. ],
  4304. "tags": [
  4305. "modelconfig"
  4306. ],
  4307. "summary": "Save model config",
  4308. "parameters": [
  4309. {
  4310. "description": "Model config",
  4311. "name": "config",
  4312. "in": "body",
  4313. "required": true,
  4314. "schema": {
  4315. "$ref": "#/definitions/controller.SaveModelConfigsRequest"
  4316. }
  4317. }
  4318. ],
  4319. "responses": {
  4320. "200": {
  4321. "description": "OK",
  4322. "schema": {
  4323. "$ref": "#/definitions/middleware.APIResponse"
  4324. }
  4325. }
  4326. }
  4327. },
  4328. "delete": {
  4329. "security": [
  4330. {
  4331. "ApiKeyAuth": []
  4332. }
  4333. ],
  4334. "description": "Deletes a model config",
  4335. "produces": [
  4336. "application/json"
  4337. ],
  4338. "tags": [
  4339. "modelconfig"
  4340. ],
  4341. "summary": "Delete model config",
  4342. "parameters": [
  4343. {
  4344. "type": "string",
  4345. "description": "Model name",
  4346. "name": "model",
  4347. "in": "path",
  4348. "required": true
  4349. }
  4350. ],
  4351. "responses": {
  4352. "200": {
  4353. "description": "OK",
  4354. "schema": {
  4355. "$ref": "#/definitions/middleware.APIResponse"
  4356. }
  4357. }
  4358. }
  4359. }
  4360. },
  4361. "/api/model_configs/": {
  4362. "get": {
  4363. "security": [
  4364. {
  4365. "ApiKeyAuth": []
  4366. }
  4367. ],
  4368. "description": "Returns a list of model configs with pagination",
  4369. "produces": [
  4370. "application/json"
  4371. ],
  4372. "tags": [
  4373. "modelconfig"
  4374. ],
  4375. "summary": "Get model configs",
  4376. "parameters": [
  4377. {
  4378. "type": "string",
  4379. "description": "Model name",
  4380. "name": "model",
  4381. "in": "query"
  4382. }
  4383. ],
  4384. "responses": {
  4385. "200": {
  4386. "description": "OK",
  4387. "schema": {
  4388. "allOf": [
  4389. {
  4390. "$ref": "#/definitions/middleware.APIResponse"
  4391. },
  4392. {
  4393. "type": "object",
  4394. "properties": {
  4395. "data": {
  4396. "type": "object",
  4397. "additionalProperties": {
  4398. "allOf": [
  4399. {},
  4400. {
  4401. "type": "object",
  4402. "properties": {
  4403. "configs": {
  4404. "type": "array",
  4405. "items": {
  4406. "$ref": "#/definitions/model.ModelConfig"
  4407. }
  4408. },
  4409. "total": {
  4410. "type": "integer"
  4411. }
  4412. }
  4413. }
  4414. ]
  4415. }
  4416. }
  4417. }
  4418. }
  4419. ]
  4420. }
  4421. }
  4422. }
  4423. },
  4424. "post": {
  4425. "security": [
  4426. {
  4427. "ApiKeyAuth": []
  4428. }
  4429. ],
  4430. "description": "Saves a list of model configs",
  4431. "produces": [
  4432. "application/json"
  4433. ],
  4434. "tags": [
  4435. "modelconfig"
  4436. ],
  4437. "summary": "Save model configs",
  4438. "parameters": [
  4439. {
  4440. "description": "Model configs",
  4441. "name": "configs",
  4442. "in": "body",
  4443. "required": true,
  4444. "schema": {
  4445. "type": "array",
  4446. "items": {
  4447. "$ref": "#/definitions/controller.SaveModelConfigsRequest"
  4448. }
  4449. }
  4450. }
  4451. ],
  4452. "responses": {
  4453. "200": {
  4454. "description": "OK",
  4455. "schema": {
  4456. "$ref": "#/definitions/middleware.APIResponse"
  4457. }
  4458. }
  4459. }
  4460. }
  4461. },
  4462. "/api/model_configs/all": {
  4463. "get": {
  4464. "security": [
  4465. {
  4466. "ApiKeyAuth": []
  4467. }
  4468. ],
  4469. "description": "Returns a list of all model configs",
  4470. "produces": [
  4471. "application/json"
  4472. ],
  4473. "tags": [
  4474. "modelconfig"
  4475. ],
  4476. "summary": "Get all model configs",
  4477. "responses": {
  4478. "200": {
  4479. "description": "OK",
  4480. "schema": {
  4481. "allOf": [
  4482. {
  4483. "$ref": "#/definitions/middleware.APIResponse"
  4484. },
  4485. {
  4486. "type": "object",
  4487. "properties": {
  4488. "data": {
  4489. "type": "array",
  4490. "items": {
  4491. "$ref": "#/definitions/model.ModelConfig"
  4492. }
  4493. }
  4494. }
  4495. }
  4496. ]
  4497. }
  4498. }
  4499. }
  4500. }
  4501. },
  4502. "/api/model_configs/batch_delete": {
  4503. "post": {
  4504. "security": [
  4505. {
  4506. "ApiKeyAuth": []
  4507. }
  4508. ],
  4509. "description": "Deletes a list of model configs",
  4510. "produces": [
  4511. "application/json"
  4512. ],
  4513. "tags": [
  4514. "modelconfig"
  4515. ],
  4516. "summary": "Delete model configs",
  4517. "parameters": [
  4518. {
  4519. "description": "Model names",
  4520. "name": "models",
  4521. "in": "body",
  4522. "required": true,
  4523. "schema": {
  4524. "type": "array",
  4525. "items": {
  4526. "type": "string"
  4527. }
  4528. }
  4529. }
  4530. ],
  4531. "responses": {
  4532. "200": {
  4533. "description": "OK",
  4534. "schema": {
  4535. "$ref": "#/definitions/middleware.APIResponse"
  4536. }
  4537. }
  4538. }
  4539. }
  4540. },
  4541. "/api/model_configs/contains": {
  4542. "post": {
  4543. "security": [
  4544. {
  4545. "ApiKeyAuth": []
  4546. }
  4547. ],
  4548. "description": "Returns a list of model configs by models contains",
  4549. "produces": [
  4550. "application/json"
  4551. ],
  4552. "tags": [
  4553. "modelconfig"
  4554. ],
  4555. "summary": "Get model configs by models contains",
  4556. "parameters": [
  4557. {
  4558. "description": "Models",
  4559. "name": "models",
  4560. "in": "body",
  4561. "required": true,
  4562. "schema": {
  4563. "$ref": "#/definitions/controller.GetModelConfigsByModelsContainsRequest"
  4564. }
  4565. }
  4566. ],
  4567. "responses": {
  4568. "200": {
  4569. "description": "OK",
  4570. "schema": {
  4571. "allOf": [
  4572. {
  4573. "$ref": "#/definitions/middleware.APIResponse"
  4574. },
  4575. {
  4576. "type": "object",
  4577. "properties": {
  4578. "data": {
  4579. "type": "array",
  4580. "items": {
  4581. "$ref": "#/definitions/model.ModelConfig"
  4582. }
  4583. }
  4584. }
  4585. }
  4586. ]
  4587. }
  4588. }
  4589. }
  4590. }
  4591. },
  4592. "/api/model_configs/search": {
  4593. "get": {
  4594. "security": [
  4595. {
  4596. "ApiKeyAuth": []
  4597. }
  4598. ],
  4599. "description": "Returns a list of model configs by keyword",
  4600. "produces": [
  4601. "application/json"
  4602. ],
  4603. "tags": [
  4604. "modelconfig"
  4605. ],
  4606. "summary": "Search model configs",
  4607. "parameters": [
  4608. {
  4609. "type": "string",
  4610. "description": "Keyword",
  4611. "name": "keyword",
  4612. "in": "query"
  4613. },
  4614. {
  4615. "type": "string",
  4616. "description": "Model name",
  4617. "name": "model",
  4618. "in": "query"
  4619. },
  4620. {
  4621. "type": "string",
  4622. "description": "Owner",
  4623. "name": "owner",
  4624. "in": "query"
  4625. },
  4626. {
  4627. "type": "integer",
  4628. "description": "Page",
  4629. "name": "page",
  4630. "in": "query"
  4631. },
  4632. {
  4633. "type": "integer",
  4634. "description": "Per page",
  4635. "name": "per_page",
  4636. "in": "query"
  4637. }
  4638. ],
  4639. "responses": {
  4640. "200": {
  4641. "description": "OK",
  4642. "schema": {
  4643. "allOf": [
  4644. {
  4645. "$ref": "#/definitions/middleware.APIResponse"
  4646. },
  4647. {
  4648. "type": "object",
  4649. "properties": {
  4650. "data": {
  4651. "type": "object",
  4652. "additionalProperties": {
  4653. "allOf": [
  4654. {},
  4655. {
  4656. "type": "object",
  4657. "properties": {
  4658. "configs": {
  4659. "type": "array",
  4660. "items": {
  4661. "$ref": "#/definitions/model.ModelConfig"
  4662. }
  4663. },
  4664. "total": {
  4665. "type": "integer"
  4666. }
  4667. }
  4668. }
  4669. ]
  4670. }
  4671. }
  4672. }
  4673. }
  4674. ]
  4675. }
  4676. }
  4677. }
  4678. }
  4679. },
  4680. "/api/models/builtin": {
  4681. "get": {
  4682. "security": [
  4683. {
  4684. "ApiKeyAuth": []
  4685. }
  4686. ],
  4687. "description": "Returns a list of builtin models",
  4688. "produces": [
  4689. "application/json"
  4690. ],
  4691. "tags": [
  4692. "model"
  4693. ],
  4694. "summary": "Get builtin models",
  4695. "responses": {
  4696. "200": {
  4697. "description": "OK",
  4698. "schema": {
  4699. "allOf": [
  4700. {
  4701. "$ref": "#/definitions/middleware.APIResponse"
  4702. },
  4703. {
  4704. "type": "object",
  4705. "properties": {
  4706. "data": {
  4707. "type": "array",
  4708. "items": {
  4709. "$ref": "#/definitions/controller.BuiltinModelConfig"
  4710. }
  4711. }
  4712. }
  4713. }
  4714. ]
  4715. }
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "/api/models/builtin/channel": {
  4721. "get": {
  4722. "security": [
  4723. {
  4724. "ApiKeyAuth": []
  4725. }
  4726. ],
  4727. "description": "Returns a list of channel builtin models",
  4728. "produces": [
  4729. "application/json"
  4730. ],
  4731. "tags": [
  4732. "model"
  4733. ],
  4734. "summary": "Get channel builtin models",
  4735. "responses": {
  4736. "200": {
  4737. "description": "OK",
  4738. "schema": {
  4739. "allOf": [
  4740. {
  4741. "$ref": "#/definitions/middleware.APIResponse"
  4742. },
  4743. {
  4744. "type": "object",
  4745. "properties": {
  4746. "data": {
  4747. "type": "object",
  4748. "additionalProperties": {
  4749. "type": "array",
  4750. "items": {
  4751. "$ref": "#/definitions/controller.BuiltinModelConfig"
  4752. }
  4753. }
  4754. }
  4755. }
  4756. }
  4757. ]
  4758. }
  4759. }
  4760. }
  4761. }
  4762. },
  4763. "/api/models/builtin/channel/{type}": {
  4764. "get": {
  4765. "security": [
  4766. {
  4767. "ApiKeyAuth": []
  4768. }
  4769. ],
  4770. "description": "Returns a list of channel builtin models by type",
  4771. "produces": [
  4772. "application/json"
  4773. ],
  4774. "tags": [
  4775. "model"
  4776. ],
  4777. "summary": "Get channel builtin models by type",
  4778. "parameters": [
  4779. {
  4780. "enum": [
  4781. 1,
  4782. 3,
  4783. 4,
  4784. 12,
  4785. 13,
  4786. 14,
  4787. 15,
  4788. 16,
  4789. 17,
  4790. 18,
  4791. 19,
  4792. 20,
  4793. 23,
  4794. 24,
  4795. 25,
  4796. 26,
  4797. 27,
  4798. 28,
  4799. 29,
  4800. 30,
  4801. 31,
  4802. 32,
  4803. 33,
  4804. 34,
  4805. 35,
  4806. 36,
  4807. 37,
  4808. 40,
  4809. 41,
  4810. 42,
  4811. 43,
  4812. 44,
  4813. 45,
  4814. 46,
  4815. 47,
  4816. 48,
  4817. 49
  4818. ],
  4819. "type": "integer",
  4820. "description": "Channel type",
  4821. "name": "type",
  4822. "in": "path",
  4823. "required": true
  4824. }
  4825. ],
  4826. "responses": {
  4827. "200": {
  4828. "description": "OK",
  4829. "schema": {
  4830. "allOf": [
  4831. {
  4832. "$ref": "#/definitions/middleware.APIResponse"
  4833. },
  4834. {
  4835. "type": "object",
  4836. "properties": {
  4837. "data": {
  4838. "type": "array",
  4839. "items": {
  4840. "$ref": "#/definitions/controller.BuiltinModelConfig"
  4841. }
  4842. }
  4843. }
  4844. }
  4845. ]
  4846. }
  4847. }
  4848. }
  4849. }
  4850. },
  4851. "/api/models/default": {
  4852. "get": {
  4853. "security": [
  4854. {
  4855. "ApiKeyAuth": []
  4856. }
  4857. ],
  4858. "description": "Returns a list of channel default models and mapping",
  4859. "produces": [
  4860. "application/json"
  4861. ],
  4862. "tags": [
  4863. "model"
  4864. ],
  4865. "summary": "Get channel default models and mapping",
  4866. "responses": {
  4867. "200": {
  4868. "description": "OK",
  4869. "schema": {
  4870. "allOf": [
  4871. {
  4872. "$ref": "#/definitions/middleware.APIResponse"
  4873. },
  4874. {
  4875. "type": "object",
  4876. "properties": {
  4877. "data": {
  4878. "type": "object",
  4879. "additionalProperties": {
  4880. "allOf": [
  4881. {},
  4882. {
  4883. "type": "object",
  4884. "properties": {
  4885. "mapping": {
  4886. "type": "object",
  4887. "additionalProperties": {
  4888. "type": "string"
  4889. }
  4890. },
  4891. "models": {
  4892. "type": "array",
  4893. "items": {
  4894. "type": "string"
  4895. }
  4896. }
  4897. }
  4898. }
  4899. ]
  4900. }
  4901. }
  4902. }
  4903. }
  4904. ]
  4905. }
  4906. }
  4907. }
  4908. }
  4909. },
  4910. "/api/models/default/{type}": {
  4911. "get": {
  4912. "security": [
  4913. {
  4914. "ApiKeyAuth": []
  4915. }
  4916. ],
  4917. "description": "Returns a list of channel default models and mapping by type",
  4918. "produces": [
  4919. "application/json"
  4920. ],
  4921. "tags": [
  4922. "model"
  4923. ],
  4924. "summary": "Get channel default models and mapping by type",
  4925. "parameters": [
  4926. {
  4927. "type": "string",
  4928. "description": "Channel type",
  4929. "name": "type",
  4930. "in": "path",
  4931. "required": true
  4932. }
  4933. ],
  4934. "responses": {
  4935. "200": {
  4936. "description": "OK",
  4937. "schema": {
  4938. "allOf": [
  4939. {
  4940. "$ref": "#/definitions/middleware.APIResponse"
  4941. },
  4942. {
  4943. "type": "object",
  4944. "properties": {
  4945. "data": {
  4946. "type": "object",
  4947. "additionalProperties": {
  4948. "allOf": [
  4949. {},
  4950. {
  4951. "type": "object",
  4952. "properties": {
  4953. "mapping": {
  4954. "type": "object",
  4955. "additionalProperties": {
  4956. "type": "string"
  4957. }
  4958. },
  4959. "models": {
  4960. "type": "array",
  4961. "items": {
  4962. "type": "string"
  4963. }
  4964. }
  4965. }
  4966. }
  4967. ]
  4968. }
  4969. }
  4970. }
  4971. }
  4972. ]
  4973. }
  4974. }
  4975. }
  4976. }
  4977. },
  4978. "/api/models/enabled": {
  4979. "get": {
  4980. "security": [
  4981. {
  4982. "ApiKeyAuth": []
  4983. }
  4984. ],
  4985. "description": "Returns a list of enabled models",
  4986. "produces": [
  4987. "application/json"
  4988. ],
  4989. "tags": [
  4990. "model"
  4991. ],
  4992. "summary": "Get enabled models",
  4993. "responses": {
  4994. "200": {
  4995. "description": "OK",
  4996. "schema": {
  4997. "allOf": [
  4998. {
  4999. "$ref": "#/definitions/middleware.APIResponse"
  5000. },
  5001. {
  5002. "type": "object",
  5003. "properties": {
  5004. "data": {
  5005. "type": "object",
  5006. "additionalProperties": {
  5007. "type": "array",
  5008. "items": {
  5009. "$ref": "#/definitions/model.ModelConfig"
  5010. }
  5011. }
  5012. }
  5013. }
  5014. }
  5015. ]
  5016. }
  5017. }
  5018. }
  5019. }
  5020. },
  5021. "/api/models/enabled/{set}": {
  5022. "get": {
  5023. "security": [
  5024. {
  5025. "ApiKeyAuth": []
  5026. }
  5027. ],
  5028. "description": "Returns a list of enabled models by set",
  5029. "produces": [
  5030. "application/json"
  5031. ],
  5032. "tags": [
  5033. "model"
  5034. ],
  5035. "summary": "Get enabled models by set",
  5036. "parameters": [
  5037. {
  5038. "type": "string",
  5039. "description": "Models set",
  5040. "name": "set",
  5041. "in": "path",
  5042. "required": true
  5043. }
  5044. ],
  5045. "responses": {
  5046. "200": {
  5047. "description": "OK",
  5048. "schema": {
  5049. "allOf": [
  5050. {
  5051. "$ref": "#/definitions/middleware.APIResponse"
  5052. },
  5053. {
  5054. "type": "object",
  5055. "properties": {
  5056. "data": {
  5057. "type": "array",
  5058. "items": {
  5059. "$ref": "#/definitions/model.ModelConfig"
  5060. }
  5061. }
  5062. }
  5063. }
  5064. ]
  5065. }
  5066. }
  5067. }
  5068. }
  5069. },
  5070. "/api/models/sets": {
  5071. "get": {
  5072. "security": [
  5073. {
  5074. "ApiKeyAuth": []
  5075. }
  5076. ],
  5077. "description": "Returns a list of enabled models and channels sets",
  5078. "produces": [
  5079. "application/json"
  5080. ],
  5081. "tags": [
  5082. "model"
  5083. ],
  5084. "summary": "Get enabled models and channels sets",
  5085. "responses": {
  5086. "200": {
  5087. "description": "OK",
  5088. "schema": {
  5089. "allOf": [
  5090. {
  5091. "$ref": "#/definitions/middleware.APIResponse"
  5092. },
  5093. {
  5094. "type": "object",
  5095. "properties": {
  5096. "data": {
  5097. "type": "object",
  5098. "additionalProperties": {
  5099. "type": "object",
  5100. "additionalProperties": {
  5101. "type": "array",
  5102. "items": {
  5103. "$ref": "#/definitions/controller.EnabledModelChannel"
  5104. }
  5105. }
  5106. }
  5107. }
  5108. }
  5109. }
  5110. ]
  5111. }
  5112. }
  5113. }
  5114. }
  5115. },
  5116. "/api/monitor/": {
  5117. "get": {
  5118. "security": [
  5119. {
  5120. "ApiKeyAuth": []
  5121. }
  5122. ],
  5123. "description": "Returns a list of all channel model error rates",
  5124. "produces": [
  5125. "application/json"
  5126. ],
  5127. "tags": [
  5128. "monitor"
  5129. ],
  5130. "summary": "Get all channel model error rates",
  5131. "responses": {
  5132. "200": {
  5133. "description": "OK",
  5134. "schema": {
  5135. "allOf": [
  5136. {
  5137. "$ref": "#/definitions/middleware.APIResponse"
  5138. },
  5139. {
  5140. "type": "object",
  5141. "properties": {
  5142. "data": {
  5143. "type": "object",
  5144. "additionalProperties": {
  5145. "type": "object",
  5146. "additionalProperties": {
  5147. "type": "number",
  5148. "format": "float64"
  5149. }
  5150. }
  5151. }
  5152. }
  5153. }
  5154. ]
  5155. }
  5156. }
  5157. }
  5158. },
  5159. "delete": {
  5160. "security": [
  5161. {
  5162. "ApiKeyAuth": []
  5163. }
  5164. ],
  5165. "description": "Clears all model errors",
  5166. "produces": [
  5167. "application/json"
  5168. ],
  5169. "tags": [
  5170. "monitor"
  5171. ],
  5172. "summary": "Clear all model errors",
  5173. "responses": {
  5174. "200": {
  5175. "description": "OK",
  5176. "schema": {
  5177. "$ref": "#/definitions/middleware.APIResponse"
  5178. }
  5179. }
  5180. }
  5181. }
  5182. },
  5183. "/api/monitor/banned_channels": {
  5184. "get": {
  5185. "security": [
  5186. {
  5187. "ApiKeyAuth": []
  5188. }
  5189. ],
  5190. "description": "Returns a list of all banned model channels",
  5191. "produces": [
  5192. "application/json"
  5193. ],
  5194. "tags": [
  5195. "monitor"
  5196. ],
  5197. "summary": "Get all banned model channels",
  5198. "responses": {
  5199. "200": {
  5200. "description": "OK",
  5201. "schema": {
  5202. "allOf": [
  5203. {
  5204. "$ref": "#/definitions/middleware.APIResponse"
  5205. },
  5206. {
  5207. "type": "object",
  5208. "properties": {
  5209. "data": {
  5210. "type": "object",
  5211. "additionalProperties": {
  5212. "type": "array",
  5213. "items": {
  5214. "type": "integer",
  5215. "format": "int64"
  5216. }
  5217. }
  5218. }
  5219. }
  5220. }
  5221. ]
  5222. }
  5223. }
  5224. }
  5225. }
  5226. },
  5227. "/api/monitor/models": {
  5228. "get": {
  5229. "security": [
  5230. {
  5231. "ApiKeyAuth": []
  5232. }
  5233. ],
  5234. "description": "Returns a list of models error rate",
  5235. "produces": [
  5236. "application/json"
  5237. ],
  5238. "tags": [
  5239. "monitor"
  5240. ],
  5241. "summary": "Get models error rate",
  5242. "responses": {
  5243. "200": {
  5244. "description": "OK",
  5245. "schema": {
  5246. "allOf": [
  5247. {
  5248. "$ref": "#/definitions/middleware.APIResponse"
  5249. },
  5250. {
  5251. "type": "object",
  5252. "properties": {
  5253. "data": {
  5254. "type": "object",
  5255. "additionalProperties": {
  5256. "type": "number",
  5257. "format": "float64"
  5258. }
  5259. }
  5260. }
  5261. }
  5262. ]
  5263. }
  5264. }
  5265. }
  5266. }
  5267. },
  5268. "/api/monitor/{id}": {
  5269. "get": {
  5270. "security": [
  5271. {
  5272. "ApiKeyAuth": []
  5273. }
  5274. ],
  5275. "description": "Returns a list of channel model error rates",
  5276. "produces": [
  5277. "application/json"
  5278. ],
  5279. "tags": [
  5280. "monitor"
  5281. ],
  5282. "summary": "Get channel model error rates",
  5283. "parameters": [
  5284. {
  5285. "type": "integer",
  5286. "description": "Channel ID",
  5287. "name": "id",
  5288. "in": "path",
  5289. "required": true
  5290. }
  5291. ],
  5292. "responses": {
  5293. "200": {
  5294. "description": "OK",
  5295. "schema": {
  5296. "allOf": [
  5297. {
  5298. "$ref": "#/definitions/middleware.APIResponse"
  5299. },
  5300. {
  5301. "type": "object",
  5302. "properties": {
  5303. "data": {
  5304. "type": "array",
  5305. "items": {
  5306. "type": "object",
  5307. "additionalProperties": {
  5308. "type": "number",
  5309. "format": "float64"
  5310. }
  5311. }
  5312. }
  5313. }
  5314. }
  5315. ]
  5316. }
  5317. }
  5318. }
  5319. },
  5320. "delete": {
  5321. "security": [
  5322. {
  5323. "ApiKeyAuth": []
  5324. }
  5325. ],
  5326. "description": "Clears all model errors for a specific channel",
  5327. "produces": [
  5328. "application/json"
  5329. ],
  5330. "tags": [
  5331. "monitor"
  5332. ],
  5333. "summary": "Clear channel all model errors",
  5334. "parameters": [
  5335. {
  5336. "type": "integer",
  5337. "description": "Channel ID",
  5338. "name": "id",
  5339. "in": "path",
  5340. "required": true
  5341. }
  5342. ],
  5343. "responses": {
  5344. "200": {
  5345. "description": "OK",
  5346. "schema": {
  5347. "$ref": "#/definitions/middleware.APIResponse"
  5348. }
  5349. }
  5350. }
  5351. }
  5352. },
  5353. "/api/monitor/{id}/{model}": {
  5354. "delete": {
  5355. "security": [
  5356. {
  5357. "ApiKeyAuth": []
  5358. }
  5359. ],
  5360. "description": "Clears model errors for a specific channel and model",
  5361. "produces": [
  5362. "application/json"
  5363. ],
  5364. "tags": [
  5365. "monitor"
  5366. ],
  5367. "summary": "Clear channel model errors",
  5368. "parameters": [
  5369. {
  5370. "type": "integer",
  5371. "description": "Channel ID",
  5372. "name": "id",
  5373. "in": "path",
  5374. "required": true
  5375. },
  5376. {
  5377. "type": "string",
  5378. "description": "Model name",
  5379. "name": "model",
  5380. "in": "path",
  5381. "required": true
  5382. }
  5383. ],
  5384. "responses": {
  5385. "200": {
  5386. "description": "OK",
  5387. "schema": {
  5388. "$ref": "#/definitions/middleware.APIResponse"
  5389. }
  5390. }
  5391. }
  5392. }
  5393. },
  5394. "/api/option/": {
  5395. "get": {
  5396. "security": [
  5397. {
  5398. "ApiKeyAuth": []
  5399. }
  5400. ],
  5401. "description": "Returns a list of options",
  5402. "produces": [
  5403. "application/json"
  5404. ],
  5405. "tags": [
  5406. "option"
  5407. ],
  5408. "summary": "Get options",
  5409. "responses": {
  5410. "200": {
  5411. "description": "OK",
  5412. "schema": {
  5413. "allOf": [
  5414. {
  5415. "$ref": "#/definitions/middleware.APIResponse"
  5416. },
  5417. {
  5418. "type": "object",
  5419. "properties": {
  5420. "data": {
  5421. "type": "object",
  5422. "additionalProperties": {
  5423. "type": "string"
  5424. }
  5425. }
  5426. }
  5427. }
  5428. ]
  5429. }
  5430. }
  5431. }
  5432. },
  5433. "put": {
  5434. "security": [
  5435. {
  5436. "ApiKeyAuth": []
  5437. }
  5438. ],
  5439. "description": "Updates a single option",
  5440. "produces": [
  5441. "application/json"
  5442. ],
  5443. "tags": [
  5444. "option"
  5445. ],
  5446. "summary": "Update option",
  5447. "parameters": [
  5448. {
  5449. "description": "Option value",
  5450. "name": "value",
  5451. "in": "body",
  5452. "required": true,
  5453. "schema": {
  5454. "$ref": "#/definitions/model.Option"
  5455. }
  5456. }
  5457. ],
  5458. "responses": {
  5459. "200": {
  5460. "description": "OK",
  5461. "schema": {
  5462. "$ref": "#/definitions/middleware.APIResponse"
  5463. }
  5464. }
  5465. }
  5466. },
  5467. "post": {
  5468. "security": [
  5469. {
  5470. "ApiKeyAuth": []
  5471. }
  5472. ],
  5473. "description": "Updates a single option",
  5474. "produces": [
  5475. "application/json"
  5476. ],
  5477. "tags": [
  5478. "option"
  5479. ],
  5480. "summary": "Update option",
  5481. "parameters": [
  5482. {
  5483. "description": "Option value",
  5484. "name": "value",
  5485. "in": "body",
  5486. "required": true,
  5487. "schema": {
  5488. "$ref": "#/definitions/model.Option"
  5489. }
  5490. }
  5491. ],
  5492. "responses": {
  5493. "200": {
  5494. "description": "OK",
  5495. "schema": {
  5496. "$ref": "#/definitions/middleware.APIResponse"
  5497. }
  5498. }
  5499. }
  5500. }
  5501. },
  5502. "/api/option/batch": {
  5503. "post": {
  5504. "security": [
  5505. {
  5506. "ApiKeyAuth": []
  5507. }
  5508. ],
  5509. "description": "Updates multiple options",
  5510. "produces": [
  5511. "application/json"
  5512. ],
  5513. "tags": [
  5514. "option"
  5515. ],
  5516. "summary": "Update options",
  5517. "parameters": [
  5518. {
  5519. "description": "Options",
  5520. "name": "options",
  5521. "in": "body",
  5522. "required": true,
  5523. "schema": {
  5524. "type": "object",
  5525. "additionalProperties": {
  5526. "type": "string"
  5527. }
  5528. }
  5529. }
  5530. ],
  5531. "responses": {
  5532. "200": {
  5533. "description": "OK",
  5534. "schema": {
  5535. "$ref": "#/definitions/middleware.APIResponse"
  5536. }
  5537. }
  5538. }
  5539. }
  5540. },
  5541. "/api/option/{key}": {
  5542. "get": {
  5543. "security": [
  5544. {
  5545. "ApiKeyAuth": []
  5546. }
  5547. ],
  5548. "description": "Returns a single option",
  5549. "produces": [
  5550. "application/json"
  5551. ],
  5552. "tags": [
  5553. "option"
  5554. ],
  5555. "summary": "Get option",
  5556. "parameters": [
  5557. {
  5558. "type": "string",
  5559. "description": "Option key",
  5560. "name": "key",
  5561. "in": "path",
  5562. "required": true
  5563. }
  5564. ],
  5565. "responses": {
  5566. "200": {
  5567. "description": "OK",
  5568. "schema": {
  5569. "allOf": [
  5570. {
  5571. "$ref": "#/definitions/middleware.APIResponse"
  5572. },
  5573. {
  5574. "type": "object",
  5575. "properties": {
  5576. "data": {
  5577. "$ref": "#/definitions/model.Option"
  5578. }
  5579. }
  5580. }
  5581. ]
  5582. }
  5583. }
  5584. }
  5585. },
  5586. "put": {
  5587. "security": [
  5588. {
  5589. "ApiKeyAuth": []
  5590. }
  5591. ],
  5592. "description": "Updates a single option by key",
  5593. "produces": [
  5594. "application/json"
  5595. ],
  5596. "tags": [
  5597. "option"
  5598. ],
  5599. "summary": "Update option by key",
  5600. "parameters": [
  5601. {
  5602. "type": "string",
  5603. "description": "Option key",
  5604. "name": "key",
  5605. "in": "path",
  5606. "required": true
  5607. },
  5608. {
  5609. "description": "Option value",
  5610. "name": "value",
  5611. "in": "body",
  5612. "required": true,
  5613. "schema": {
  5614. "type": "string"
  5615. }
  5616. }
  5617. ],
  5618. "responses": {
  5619. "200": {
  5620. "description": "OK",
  5621. "schema": {
  5622. "$ref": "#/definitions/middleware.APIResponse"
  5623. }
  5624. }
  5625. }
  5626. }
  5627. },
  5628. "/api/status": {
  5629. "get": {
  5630. "description": "Returns the status of the server",
  5631. "produces": [
  5632. "application/json"
  5633. ],
  5634. "tags": [
  5635. "misc"
  5636. ],
  5637. "summary": "Get status",
  5638. "responses": {
  5639. "200": {
  5640. "description": "OK",
  5641. "schema": {
  5642. "allOf": [
  5643. {
  5644. "$ref": "#/definitions/middleware.APIResponse"
  5645. },
  5646. {
  5647. "type": "object",
  5648. "properties": {
  5649. "data": {
  5650. "$ref": "#/definitions/controller.StatusData"
  5651. }
  5652. }
  5653. }
  5654. ]
  5655. }
  5656. }
  5657. }
  5658. }
  5659. },
  5660. "/api/test-embedmcp/{id}": {
  5661. "get": {
  5662. "security": [
  5663. {
  5664. "ApiKeyAuth": []
  5665. }
  5666. ],
  5667. "description": "Test Embed MCP Streamable Server with various HTTP methods",
  5668. "consumes": [
  5669. "application/json"
  5670. ],
  5671. "produces": [
  5672. "application/json"
  5673. ],
  5674. "tags": [
  5675. "embedmcp"
  5676. ],
  5677. "summary": "Test Embed MCP Streamable Server",
  5678. "parameters": [
  5679. {
  5680. "type": "string",
  5681. "description": "MCP ID",
  5682. "name": "id",
  5683. "in": "path",
  5684. "required": true
  5685. },
  5686. {
  5687. "type": "string",
  5688. "description": "Initial configuration parameters (e.g. config[host]=http://localhost:3000)",
  5689. "name": "config[key]",
  5690. "in": "query"
  5691. },
  5692. {
  5693. "type": "string",
  5694. "description": "Reusing configuration parameters (e.g., reusing[authorization]=apikey)",
  5695. "name": "reusing[key]",
  5696. "in": "query"
  5697. }
  5698. ],
  5699. "responses": {
  5700. "200": {
  5701. "description": "OK"
  5702. },
  5703. "400": {
  5704. "description": "Bad Request"
  5705. }
  5706. }
  5707. },
  5708. "post": {
  5709. "security": [
  5710. {
  5711. "ApiKeyAuth": []
  5712. }
  5713. ],
  5714. "description": "Test Embed MCP Streamable Server with various HTTP methods",
  5715. "consumes": [
  5716. "application/json"
  5717. ],
  5718. "produces": [
  5719. "application/json"
  5720. ],
  5721. "tags": [
  5722. "embedmcp"
  5723. ],
  5724. "summary": "Test Embed MCP Streamable Server",
  5725. "parameters": [
  5726. {
  5727. "type": "string",
  5728. "description": "MCP ID",
  5729. "name": "id",
  5730. "in": "path",
  5731. "required": true
  5732. },
  5733. {
  5734. "type": "string",
  5735. "description": "Initial configuration parameters (e.g. config[host]=http://localhost:3000)",
  5736. "name": "config[key]",
  5737. "in": "query"
  5738. },
  5739. {
  5740. "type": "string",
  5741. "description": "Reusing configuration parameters (e.g., reusing[authorization]=apikey)",
  5742. "name": "reusing[key]",
  5743. "in": "query"
  5744. }
  5745. ],
  5746. "responses": {
  5747. "200": {
  5748. "description": "OK"
  5749. },
  5750. "400": {
  5751. "description": "Bad Request"
  5752. }
  5753. }
  5754. },
  5755. "delete": {
  5756. "security": [
  5757. {
  5758. "ApiKeyAuth": []
  5759. }
  5760. ],
  5761. "description": "Test Embed MCP Streamable Server with various HTTP methods",
  5762. "consumes": [
  5763. "application/json"
  5764. ],
  5765. "produces": [
  5766. "application/json"
  5767. ],
  5768. "tags": [
  5769. "embedmcp"
  5770. ],
  5771. "summary": "Test Embed MCP Streamable Server",
  5772. "parameters": [
  5773. {
  5774. "type": "string",
  5775. "description": "MCP ID",
  5776. "name": "id",
  5777. "in": "path",
  5778. "required": true
  5779. },
  5780. {
  5781. "type": "string",
  5782. "description": "Initial configuration parameters (e.g. config[host]=http://localhost:3000)",
  5783. "name": "config[key]",
  5784. "in": "query"
  5785. },
  5786. {
  5787. "type": "string",
  5788. "description": "Reusing configuration parameters (e.g., reusing[authorization]=apikey)",
  5789. "name": "reusing[key]",
  5790. "in": "query"
  5791. }
  5792. ],
  5793. "responses": {
  5794. "200": {
  5795. "description": "OK"
  5796. },
  5797. "400": {
  5798. "description": "Bad Request"
  5799. }
  5800. }
  5801. }
  5802. },
  5803. "/api/test-embedmcp/{id}/sse": {
  5804. "get": {
  5805. "security": [
  5806. {
  5807. "ApiKeyAuth": []
  5808. }
  5809. ],
  5810. "description": "Test Embed MCP SSE Server",
  5811. "tags": [
  5812. "embedmcp"
  5813. ],
  5814. "summary": "Test Embed MCP SSE Server",
  5815. "parameters": [
  5816. {
  5817. "type": "string",
  5818. "description": "MCP ID",
  5819. "name": "id",
  5820. "in": "path",
  5821. "required": true
  5822. },
  5823. {
  5824. "type": "string",
  5825. "description": "Initial configuration parameters (e.g. config[host]=http://localhost:3000)",
  5826. "name": "config[key]",
  5827. "in": "query"
  5828. },
  5829. {
  5830. "type": "string",
  5831. "description": "Reusing configuration parameters (e.g. reusing[authorization]=apikey)",
  5832. "name": "reusing[key]",
  5833. "in": "query"
  5834. }
  5835. ],
  5836. "responses": {
  5837. "200": {
  5838. "description": "OK"
  5839. },
  5840. "400": {
  5841. "description": "Bad Request"
  5842. }
  5843. }
  5844. }
  5845. },
  5846. "/api/test-publicmcp/{group}/{id}/sse": {
  5847. "get": {
  5848. "security": [
  5849. {
  5850. "ApiKeyAuth": []
  5851. }
  5852. ],
  5853. "summary": "Test Public MCP SSE Server",
  5854. "parameters": [
  5855. {
  5856. "type": "string",
  5857. "description": "Group ID",
  5858. "name": "group",
  5859. "in": "path",
  5860. "required": true
  5861. },
  5862. {
  5863. "type": "string",
  5864. "description": "MCP ID",
  5865. "name": "id",
  5866. "in": "path",
  5867. "required": true
  5868. }
  5869. ],
  5870. "responses": {}
  5871. }
  5872. },
  5873. "/api/token/{group}": {
  5874. "post": {
  5875. "security": [
  5876. {
  5877. "ApiKeyAuth": []
  5878. }
  5879. ],
  5880. "description": "Adds a new token to a specific group",
  5881. "consumes": [
  5882. "application/json"
  5883. ],
  5884. "produces": [
  5885. "application/json"
  5886. ],
  5887. "tags": [
  5888. "token"
  5889. ],
  5890. "summary": "Add group token",
  5891. "parameters": [
  5892. {
  5893. "type": "string",
  5894. "description": "Group name",
  5895. "name": "group",
  5896. "in": "path",
  5897. "required": true
  5898. },
  5899. {
  5900. "type": "boolean",
  5901. "description": "Auto create group",
  5902. "name": "auto_create_group",
  5903. "in": "query"
  5904. },
  5905. {
  5906. "type": "boolean",
  5907. "description": "Ignore exist",
  5908. "name": "ignore_exist",
  5909. "in": "query"
  5910. },
  5911. {
  5912. "description": "Token information",
  5913. "name": "token",
  5914. "in": "body",
  5915. "required": true,
  5916. "schema": {
  5917. "$ref": "#/definitions/controller.AddTokenRequest"
  5918. }
  5919. }
  5920. ],
  5921. "responses": {
  5922. "200": {
  5923. "description": "OK",
  5924. "schema": {
  5925. "allOf": [
  5926. {
  5927. "$ref": "#/definitions/middleware.APIResponse"
  5928. },
  5929. {
  5930. "type": "object",
  5931. "properties": {
  5932. "data": {
  5933. "$ref": "#/definitions/controller.TokenResponse"
  5934. }
  5935. }
  5936. }
  5937. ]
  5938. }
  5939. }
  5940. }
  5941. }
  5942. },
  5943. "/api/token/{group}/batch_delete": {
  5944. "post": {
  5945. "security": [
  5946. {
  5947. "ApiKeyAuth": []
  5948. }
  5949. ],
  5950. "description": "Deletes multiple tokens from a specific group",
  5951. "produces": [
  5952. "application/json"
  5953. ],
  5954. "tags": [
  5955. "token"
  5956. ],
  5957. "summary": "Delete group tokens",
  5958. "parameters": [
  5959. {
  5960. "type": "string",
  5961. "description": "Group name",
  5962. "name": "group",
  5963. "in": "path",
  5964. "required": true
  5965. },
  5966. {
  5967. "description": "Token IDs",
  5968. "name": "ids",
  5969. "in": "body",
  5970. "required": true,
  5971. "schema": {
  5972. "type": "array",
  5973. "items": {
  5974. "type": "integer"
  5975. }
  5976. }
  5977. }
  5978. ],
  5979. "responses": {
  5980. "200": {
  5981. "description": "OK",
  5982. "schema": {
  5983. "$ref": "#/definitions/middleware.APIResponse"
  5984. }
  5985. }
  5986. }
  5987. }
  5988. },
  5989. "/api/token/{group}/search": {
  5990. "get": {
  5991. "security": [
  5992. {
  5993. "ApiKeyAuth": []
  5994. }
  5995. ],
  5996. "description": "Returns a paginated list of tokens for a specific group based on search criteria",
  5997. "produces": [
  5998. "application/json"
  5999. ],
  6000. "tags": [
  6001. "token"
  6002. ],
  6003. "summary": "Search tokens for a specific group",
  6004. "parameters": [
  6005. {
  6006. "type": "string",
  6007. "description": "Group name",
  6008. "name": "group",
  6009. "in": "path",
  6010. "required": true
  6011. },
  6012. {
  6013. "type": "string",
  6014. "description": "Keyword",
  6015. "name": "keyword",
  6016. "in": "query"
  6017. },
  6018. {
  6019. "type": "integer",
  6020. "description": "Page number",
  6021. "name": "page",
  6022. "in": "query"
  6023. },
  6024. {
  6025. "type": "integer",
  6026. "description": "Items per page",
  6027. "name": "per_page",
  6028. "in": "query"
  6029. },
  6030. {
  6031. "type": "string",
  6032. "description": "Order",
  6033. "name": "order",
  6034. "in": "query"
  6035. },
  6036. {
  6037. "type": "string",
  6038. "description": "Name",
  6039. "name": "name",
  6040. "in": "query"
  6041. },
  6042. {
  6043. "type": "string",
  6044. "description": "Key",
  6045. "name": "key",
  6046. "in": "query"
  6047. },
  6048. {
  6049. "type": "integer",
  6050. "description": "Status",
  6051. "name": "status",
  6052. "in": "query"
  6053. }
  6054. ],
  6055. "responses": {
  6056. "200": {
  6057. "description": "OK",
  6058. "schema": {
  6059. "allOf": [
  6060. {
  6061. "$ref": "#/definitions/middleware.APIResponse"
  6062. },
  6063. {
  6064. "type": "object",
  6065. "properties": {
  6066. "data": {
  6067. "type": "object",
  6068. "additionalProperties": {
  6069. "allOf": [
  6070. {},
  6071. {
  6072. "type": "object",
  6073. "properties": {
  6074. "tokens": {
  6075. "type": "array",
  6076. "items": {
  6077. "$ref": "#/definitions/controller.TokenResponse"
  6078. }
  6079. },
  6080. "total": {
  6081. "type": "integer"
  6082. }
  6083. }
  6084. }
  6085. ]
  6086. }
  6087. }
  6088. }
  6089. }
  6090. ]
  6091. }
  6092. }
  6093. }
  6094. }
  6095. },
  6096. "/api/token/{group}/{id}": {
  6097. "get": {
  6098. "security": [
  6099. {
  6100. "ApiKeyAuth": []
  6101. }
  6102. ],
  6103. "description": "Returns detailed information about a specific token for a specific group",
  6104. "produces": [
  6105. "application/json"
  6106. ],
  6107. "tags": [
  6108. "token"
  6109. ],
  6110. "summary": "Get token by ID for a specific group",
  6111. "parameters": [
  6112. {
  6113. "type": "string",
  6114. "description": "Group name",
  6115. "name": "group",
  6116. "in": "path",
  6117. "required": true
  6118. },
  6119. {
  6120. "type": "integer",
  6121. "description": "Token ID",
  6122. "name": "id",
  6123. "in": "path",
  6124. "required": true
  6125. }
  6126. ],
  6127. "responses": {
  6128. "200": {
  6129. "description": "OK",
  6130. "schema": {
  6131. "allOf": [
  6132. {
  6133. "$ref": "#/definitions/middleware.APIResponse"
  6134. },
  6135. {
  6136. "type": "object",
  6137. "properties": {
  6138. "data": {
  6139. "$ref": "#/definitions/controller.TokenResponse"
  6140. }
  6141. }
  6142. }
  6143. ]
  6144. }
  6145. }
  6146. }
  6147. },
  6148. "put": {
  6149. "security": [
  6150. {
  6151. "ApiKeyAuth": []
  6152. }
  6153. ],
  6154. "description": "Updates an existing token in a specific group",
  6155. "consumes": [
  6156. "application/json"
  6157. ],
  6158. "produces": [
  6159. "application/json"
  6160. ],
  6161. "tags": [
  6162. "token"
  6163. ],
  6164. "summary": "Update group token",
  6165. "parameters": [
  6166. {
  6167. "type": "string",
  6168. "description": "Group name",
  6169. "name": "group",
  6170. "in": "path",
  6171. "required": true
  6172. },
  6173. {
  6174. "type": "integer",
  6175. "description": "Token ID",
  6176. "name": "id",
  6177. "in": "path",
  6178. "required": true
  6179. },
  6180. {
  6181. "description": "Updated token information",
  6182. "name": "token",
  6183. "in": "body",
  6184. "required": true,
  6185. "schema": {
  6186. "$ref": "#/definitions/controller.AddTokenRequest"
  6187. }
  6188. }
  6189. ],
  6190. "responses": {
  6191. "200": {
  6192. "description": "OK",
  6193. "schema": {
  6194. "allOf": [
  6195. {
  6196. "$ref": "#/definitions/middleware.APIResponse"
  6197. },
  6198. {
  6199. "type": "object",
  6200. "properties": {
  6201. "data": {
  6202. "$ref": "#/definitions/controller.TokenResponse"
  6203. }
  6204. }
  6205. }
  6206. ]
  6207. }
  6208. }
  6209. }
  6210. },
  6211. "delete": {
  6212. "security": [
  6213. {
  6214. "ApiKeyAuth": []
  6215. }
  6216. ],
  6217. "description": "Deletes a specific token from a group",
  6218. "produces": [
  6219. "application/json"
  6220. ],
  6221. "tags": [
  6222. "token"
  6223. ],
  6224. "summary": "Delete group token",
  6225. "parameters": [
  6226. {
  6227. "type": "string",
  6228. "description": "Group name",
  6229. "name": "group",
  6230. "in": "path",
  6231. "required": true
  6232. },
  6233. {
  6234. "type": "integer",
  6235. "description": "Token ID",
  6236. "name": "id",
  6237. "in": "path",
  6238. "required": true
  6239. }
  6240. ],
  6241. "responses": {
  6242. "200": {
  6243. "description": "OK",
  6244. "schema": {
  6245. "$ref": "#/definitions/middleware.APIResponse"
  6246. }
  6247. }
  6248. }
  6249. }
  6250. },
  6251. "/api/token/{group}/{id}/name": {
  6252. "post": {
  6253. "security": [
  6254. {
  6255. "ApiKeyAuth": []
  6256. }
  6257. ],
  6258. "description": "Updates the name of a token in a specific group",
  6259. "consumes": [
  6260. "application/json"
  6261. ],
  6262. "produces": [
  6263. "application/json"
  6264. ],
  6265. "tags": [
  6266. "token"
  6267. ],
  6268. "summary": "Update group token name",
  6269. "parameters": [
  6270. {
  6271. "type": "string",
  6272. "description": "Group name",
  6273. "name": "group",
  6274. "in": "path",
  6275. "required": true
  6276. },
  6277. {
  6278. "type": "integer",
  6279. "description": "Token ID",
  6280. "name": "id",
  6281. "in": "path",
  6282. "required": true
  6283. },
  6284. {
  6285. "description": "Name information",
  6286. "name": "name",
  6287. "in": "body",
  6288. "required": true,
  6289. "schema": {
  6290. "$ref": "#/definitions/controller.UpdateTokenNameRequest"
  6291. }
  6292. }
  6293. ],
  6294. "responses": {
  6295. "200": {
  6296. "description": "OK",
  6297. "schema": {
  6298. "$ref": "#/definitions/middleware.APIResponse"
  6299. }
  6300. }
  6301. }
  6302. }
  6303. },
  6304. "/api/token/{group}/{id}/status": {
  6305. "post": {
  6306. "security": [
  6307. {
  6308. "ApiKeyAuth": []
  6309. }
  6310. ],
  6311. "description": "Updates the status of a token in a specific group",
  6312. "consumes": [
  6313. "application/json"
  6314. ],
  6315. "produces": [
  6316. "application/json"
  6317. ],
  6318. "tags": [
  6319. "token"
  6320. ],
  6321. "summary": "Update group token status",
  6322. "parameters": [
  6323. {
  6324. "type": "string",
  6325. "description": "Group name",
  6326. "name": "group",
  6327. "in": "path",
  6328. "required": true
  6329. },
  6330. {
  6331. "type": "integer",
  6332. "description": "Token ID",
  6333. "name": "id",
  6334. "in": "path",
  6335. "required": true
  6336. },
  6337. {
  6338. "description": "Status information",
  6339. "name": "status",
  6340. "in": "body",
  6341. "required": true,
  6342. "schema": {
  6343. "$ref": "#/definitions/controller.UpdateTokenStatusRequest"
  6344. }
  6345. }
  6346. ],
  6347. "responses": {
  6348. "200": {
  6349. "description": "OK",
  6350. "schema": {
  6351. "$ref": "#/definitions/middleware.APIResponse"
  6352. }
  6353. }
  6354. }
  6355. }
  6356. },
  6357. "/api/tokens/": {
  6358. "get": {
  6359. "security": [
  6360. {
  6361. "ApiKeyAuth": []
  6362. }
  6363. ],
  6364. "description": "Returns a paginated list of all tokens",
  6365. "produces": [
  6366. "application/json"
  6367. ],
  6368. "tags": [
  6369. "tokens"
  6370. ],
  6371. "summary": "Get all tokens",
  6372. "parameters": [
  6373. {
  6374. "type": "integer",
  6375. "description": "Page number",
  6376. "name": "page",
  6377. "in": "query"
  6378. },
  6379. {
  6380. "type": "integer",
  6381. "description": "Items per page",
  6382. "name": "per_page",
  6383. "in": "query"
  6384. },
  6385. {
  6386. "type": "string",
  6387. "description": "Group name",
  6388. "name": "group",
  6389. "in": "query"
  6390. },
  6391. {
  6392. "type": "string",
  6393. "description": "Order",
  6394. "name": "order",
  6395. "in": "query"
  6396. },
  6397. {
  6398. "type": "integer",
  6399. "description": "Status",
  6400. "name": "status",
  6401. "in": "query"
  6402. }
  6403. ],
  6404. "responses": {
  6405. "200": {
  6406. "description": "OK",
  6407. "schema": {
  6408. "allOf": [
  6409. {
  6410. "$ref": "#/definitions/middleware.APIResponse"
  6411. },
  6412. {
  6413. "type": "object",
  6414. "properties": {
  6415. "data": {
  6416. "type": "object",
  6417. "additionalProperties": {
  6418. "allOf": [
  6419. {},
  6420. {
  6421. "type": "object",
  6422. "properties": {
  6423. "tokens": {
  6424. "type": "array",
  6425. "items": {
  6426. "$ref": "#/definitions/controller.TokenResponse"
  6427. }
  6428. },
  6429. "total": {
  6430. "type": "integer"
  6431. }
  6432. }
  6433. }
  6434. ]
  6435. }
  6436. }
  6437. }
  6438. }
  6439. ]
  6440. }
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "/api/tokens/batch_delete": {
  6446. "post": {
  6447. "security": [
  6448. {
  6449. "ApiKeyAuth": []
  6450. }
  6451. ],
  6452. "description": "Deletes multiple tokens by their IDs",
  6453. "consumes": [
  6454. "application/json"
  6455. ],
  6456. "produces": [
  6457. "application/json"
  6458. ],
  6459. "tags": [
  6460. "tokens"
  6461. ],
  6462. "summary": "Delete multiple tokens",
  6463. "parameters": [
  6464. {
  6465. "description": "Token IDs",
  6466. "name": "ids",
  6467. "in": "body",
  6468. "required": true,
  6469. "schema": {
  6470. "type": "array",
  6471. "items": {
  6472. "type": "integer"
  6473. }
  6474. }
  6475. }
  6476. ],
  6477. "responses": {
  6478. "200": {
  6479. "description": "OK",
  6480. "schema": {
  6481. "$ref": "#/definitions/middleware.APIResponse"
  6482. }
  6483. }
  6484. }
  6485. }
  6486. },
  6487. "/api/tokens/search": {
  6488. "get": {
  6489. "security": [
  6490. {
  6491. "ApiKeyAuth": []
  6492. }
  6493. ],
  6494. "description": "Returns a paginated list of tokens based on search criteria",
  6495. "produces": [
  6496. "application/json"
  6497. ],
  6498. "tags": [
  6499. "tokens"
  6500. ],
  6501. "summary": "Search tokens",
  6502. "parameters": [
  6503. {
  6504. "type": "string",
  6505. "description": "Keyword",
  6506. "name": "keyword",
  6507. "in": "query"
  6508. },
  6509. {
  6510. "type": "integer",
  6511. "description": "Page number",
  6512. "name": "page",
  6513. "in": "query"
  6514. },
  6515. {
  6516. "type": "integer",
  6517. "description": "Items per page",
  6518. "name": "per_page",
  6519. "in": "query"
  6520. },
  6521. {
  6522. "type": "string",
  6523. "description": "Order",
  6524. "name": "order",
  6525. "in": "query"
  6526. },
  6527. {
  6528. "type": "string",
  6529. "description": "Name",
  6530. "name": "name",
  6531. "in": "query"
  6532. },
  6533. {
  6534. "type": "string",
  6535. "description": "Key",
  6536. "name": "key",
  6537. "in": "query"
  6538. },
  6539. {
  6540. "type": "integer",
  6541. "description": "Status",
  6542. "name": "status",
  6543. "in": "query"
  6544. },
  6545. {
  6546. "type": "string",
  6547. "description": "Group",
  6548. "name": "group",
  6549. "in": "query"
  6550. }
  6551. ],
  6552. "responses": {
  6553. "200": {
  6554. "description": "OK",
  6555. "schema": {
  6556. "allOf": [
  6557. {
  6558. "$ref": "#/definitions/middleware.APIResponse"
  6559. },
  6560. {
  6561. "type": "object",
  6562. "properties": {
  6563. "data": {
  6564. "type": "object",
  6565. "additionalProperties": {
  6566. "allOf": [
  6567. {},
  6568. {
  6569. "type": "object",
  6570. "properties": {
  6571. "tokens": {
  6572. "type": "array",
  6573. "items": {
  6574. "$ref": "#/definitions/controller.TokenResponse"
  6575. }
  6576. },
  6577. "total": {
  6578. "type": "integer"
  6579. }
  6580. }
  6581. }
  6582. ]
  6583. }
  6584. }
  6585. }
  6586. }
  6587. ]
  6588. }
  6589. }
  6590. }
  6591. }
  6592. },
  6593. "/api/tokens/{group}": {
  6594. "get": {
  6595. "security": [
  6596. {
  6597. "ApiKeyAuth": []
  6598. }
  6599. ],
  6600. "description": "Returns a paginated list of all tokens for a specific group",
  6601. "produces": [
  6602. "application/json"
  6603. ],
  6604. "tags": [
  6605. "tokens"
  6606. ],
  6607. "summary": "Get all tokens for a specific group",
  6608. "parameters": [
  6609. {
  6610. "type": "string",
  6611. "description": "Group name",
  6612. "name": "group",
  6613. "in": "path",
  6614. "required": true
  6615. },
  6616. {
  6617. "type": "integer",
  6618. "description": "Page number",
  6619. "name": "page",
  6620. "in": "query"
  6621. },
  6622. {
  6623. "type": "integer",
  6624. "description": "Items per page",
  6625. "name": "per_page",
  6626. "in": "query"
  6627. },
  6628. {
  6629. "type": "string",
  6630. "description": "Order",
  6631. "name": "order",
  6632. "in": "query"
  6633. },
  6634. {
  6635. "type": "integer",
  6636. "description": "Status",
  6637. "name": "status",
  6638. "in": "query"
  6639. }
  6640. ],
  6641. "responses": {
  6642. "200": {
  6643. "description": "OK",
  6644. "schema": {
  6645. "allOf": [
  6646. {
  6647. "$ref": "#/definitions/middleware.APIResponse"
  6648. },
  6649. {
  6650. "type": "object",
  6651. "properties": {
  6652. "data": {
  6653. "type": "object",
  6654. "additionalProperties": {
  6655. "allOf": [
  6656. {},
  6657. {
  6658. "type": "object",
  6659. "properties": {
  6660. "tokens": {
  6661. "type": "array",
  6662. "items": {
  6663. "$ref": "#/definitions/controller.TokenResponse"
  6664. }
  6665. },
  6666. "total": {
  6667. "type": "integer"
  6668. }
  6669. }
  6670. }
  6671. ]
  6672. }
  6673. }
  6674. }
  6675. }
  6676. ]
  6677. }
  6678. }
  6679. }
  6680. }
  6681. },
  6682. "/api/tokens/{id}": {
  6683. "get": {
  6684. "security": [
  6685. {
  6686. "ApiKeyAuth": []
  6687. }
  6688. ],
  6689. "description": "Returns detailed information about a specific token",
  6690. "produces": [
  6691. "application/json"
  6692. ],
  6693. "tags": [
  6694. "tokens"
  6695. ],
  6696. "summary": "Get token by ID",
  6697. "parameters": [
  6698. {
  6699. "type": "integer",
  6700. "description": "Token ID",
  6701. "name": "id",
  6702. "in": "path",
  6703. "required": true
  6704. }
  6705. ],
  6706. "responses": {
  6707. "200": {
  6708. "description": "OK",
  6709. "schema": {
  6710. "allOf": [
  6711. {
  6712. "$ref": "#/definitions/middleware.APIResponse"
  6713. },
  6714. {
  6715. "type": "object",
  6716. "properties": {
  6717. "data": {
  6718. "$ref": "#/definitions/controller.TokenResponse"
  6719. }
  6720. }
  6721. }
  6722. ]
  6723. }
  6724. }
  6725. }
  6726. },
  6727. "put": {
  6728. "security": [
  6729. {
  6730. "ApiKeyAuth": []
  6731. }
  6732. ],
  6733. "description": "Updates an existing token's information",
  6734. "consumes": [
  6735. "application/json"
  6736. ],
  6737. "produces": [
  6738. "application/json"
  6739. ],
  6740. "tags": [
  6741. "tokens"
  6742. ],
  6743. "summary": "Update token",
  6744. "parameters": [
  6745. {
  6746. "type": "integer",
  6747. "description": "Token ID",
  6748. "name": "id",
  6749. "in": "path",
  6750. "required": true
  6751. },
  6752. {
  6753. "description": "Updated token information",
  6754. "name": "token",
  6755. "in": "body",
  6756. "required": true,
  6757. "schema": {
  6758. "$ref": "#/definitions/controller.AddTokenRequest"
  6759. }
  6760. }
  6761. ],
  6762. "responses": {
  6763. "200": {
  6764. "description": "OK",
  6765. "schema": {
  6766. "allOf": [
  6767. {
  6768. "$ref": "#/definitions/middleware.APIResponse"
  6769. },
  6770. {
  6771. "type": "object",
  6772. "properties": {
  6773. "data": {
  6774. "$ref": "#/definitions/controller.TokenResponse"
  6775. }
  6776. }
  6777. }
  6778. ]
  6779. }
  6780. }
  6781. }
  6782. },
  6783. "delete": {
  6784. "security": [
  6785. {
  6786. "ApiKeyAuth": []
  6787. }
  6788. ],
  6789. "description": "Deletes a specific token by ID",
  6790. "produces": [
  6791. "application/json"
  6792. ],
  6793. "tags": [
  6794. "tokens"
  6795. ],
  6796. "summary": "Delete token",
  6797. "parameters": [
  6798. {
  6799. "type": "integer",
  6800. "description": "Token ID",
  6801. "name": "id",
  6802. "in": "path",
  6803. "required": true
  6804. }
  6805. ],
  6806. "responses": {
  6807. "200": {
  6808. "description": "OK",
  6809. "schema": {
  6810. "$ref": "#/definitions/middleware.APIResponse"
  6811. }
  6812. }
  6813. }
  6814. }
  6815. },
  6816. "/api/tokens/{id}/name": {
  6817. "post": {
  6818. "security": [
  6819. {
  6820. "ApiKeyAuth": []
  6821. }
  6822. ],
  6823. "description": "Updates the name of a specific token",
  6824. "consumes": [
  6825. "application/json"
  6826. ],
  6827. "produces": [
  6828. "application/json"
  6829. ],
  6830. "tags": [
  6831. "tokens"
  6832. ],
  6833. "summary": "Update token name",
  6834. "parameters": [
  6835. {
  6836. "type": "integer",
  6837. "description": "Token ID",
  6838. "name": "id",
  6839. "in": "path",
  6840. "required": true
  6841. },
  6842. {
  6843. "description": "Name information",
  6844. "name": "name",
  6845. "in": "body",
  6846. "required": true,
  6847. "schema": {
  6848. "$ref": "#/definitions/controller.UpdateTokenNameRequest"
  6849. }
  6850. }
  6851. ],
  6852. "responses": {
  6853. "200": {
  6854. "description": "OK",
  6855. "schema": {
  6856. "$ref": "#/definitions/middleware.APIResponse"
  6857. }
  6858. }
  6859. }
  6860. }
  6861. },
  6862. "/api/tokens/{id}/status": {
  6863. "post": {
  6864. "security": [
  6865. {
  6866. "ApiKeyAuth": []
  6867. }
  6868. ],
  6869. "description": "Updates the status of a specific token",
  6870. "consumes": [
  6871. "application/json"
  6872. ],
  6873. "produces": [
  6874. "application/json"
  6875. ],
  6876. "tags": [
  6877. "tokens"
  6878. ],
  6879. "summary": "Update token status",
  6880. "parameters": [
  6881. {
  6882. "type": "integer",
  6883. "description": "Token ID",
  6884. "name": "id",
  6885. "in": "path",
  6886. "required": true
  6887. },
  6888. {
  6889. "description": "Status information",
  6890. "name": "status",
  6891. "in": "body",
  6892. "required": true,
  6893. "schema": {
  6894. "$ref": "#/definitions/controller.UpdateTokenStatusRequest"
  6895. }
  6896. }
  6897. ],
  6898. "responses": {
  6899. "200": {
  6900. "description": "OK",
  6901. "schema": {
  6902. "$ref": "#/definitions/middleware.APIResponse"
  6903. }
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "/mcp": {
  6909. "get": {
  6910. "security": [
  6911. {
  6912. "ApiKeyAuth": []
  6913. }
  6914. ],
  6915. "summary": "Host MCP Streamable Server",
  6916. "responses": {}
  6917. },
  6918. "post": {
  6919. "security": [
  6920. {
  6921. "ApiKeyAuth": []
  6922. }
  6923. ],
  6924. "summary": "Host MCP Streamable Server",
  6925. "responses": {}
  6926. },
  6927. "delete": {
  6928. "security": [
  6929. {
  6930. "ApiKeyAuth": []
  6931. }
  6932. ],
  6933. "summary": "Host MCP Streamable Server",
  6934. "responses": {}
  6935. }
  6936. },
  6937. "/mcp/group/{id}": {
  6938. "get": {
  6939. "security": [
  6940. {
  6941. "ApiKeyAuth": []
  6942. }
  6943. ],
  6944. "summary": "Group MCP Streamable Server",
  6945. "responses": {}
  6946. },
  6947. "post": {
  6948. "security": [
  6949. {
  6950. "ApiKeyAuth": []
  6951. }
  6952. ],
  6953. "summary": "Group MCP Streamable Server",
  6954. "responses": {}
  6955. },
  6956. "delete": {
  6957. "security": [
  6958. {
  6959. "ApiKeyAuth": []
  6960. }
  6961. ],
  6962. "summary": "Group MCP Streamable Server",
  6963. "responses": {}
  6964. }
  6965. },
  6966. "/mcp/group/{id}/sse": {
  6967. "get": {
  6968. "security": [
  6969. {
  6970. "ApiKeyAuth": []
  6971. }
  6972. ],
  6973. "summary": "Group MCP SSE Server",
  6974. "responses": {}
  6975. }
  6976. },
  6977. "/mcp/public/{id}": {
  6978. "get": {
  6979. "security": [
  6980. {
  6981. "ApiKeyAuth": []
  6982. }
  6983. ],
  6984. "summary": "Public MCP Streamable Server",
  6985. "responses": {}
  6986. },
  6987. "post": {
  6988. "security": [
  6989. {
  6990. "ApiKeyAuth": []
  6991. }
  6992. ],
  6993. "summary": "Public MCP Streamable Server",
  6994. "responses": {}
  6995. },
  6996. "delete": {
  6997. "security": [
  6998. {
  6999. "ApiKeyAuth": []
  7000. }
  7001. ],
  7002. "summary": "Public MCP Streamable Server",
  7003. "responses": {}
  7004. }
  7005. },
  7006. "/mcp/public/{id}/sse": {
  7007. "get": {
  7008. "security": [
  7009. {
  7010. "ApiKeyAuth": []
  7011. }
  7012. ],
  7013. "summary": "Public MCP SSE Server",
  7014. "responses": {}
  7015. }
  7016. },
  7017. "/message": {
  7018. "post": {
  7019. "summary": "MCP SSE Message",
  7020. "responses": {}
  7021. }
  7022. },
  7023. "/sse": {
  7024. "get": {
  7025. "security": [
  7026. {
  7027. "ApiKeyAuth": []
  7028. }
  7029. ],
  7030. "summary": "Public MCP SSE Server",
  7031. "responses": {}
  7032. }
  7033. },
  7034. "/v1/audio/speech": {
  7035. "post": {
  7036. "security": [
  7037. {
  7038. "ApiKeyAuth": []
  7039. }
  7040. ],
  7041. "description": "AudioSpeech",
  7042. "produces": [
  7043. "application/json"
  7044. ],
  7045. "tags": [
  7046. "relay"
  7047. ],
  7048. "summary": "AudioSpeech",
  7049. "parameters": [
  7050. {
  7051. "description": "Request",
  7052. "name": "request",
  7053. "in": "body",
  7054. "required": true,
  7055. "schema": {
  7056. "$ref": "#/definitions/model.TextToSpeechRequest"
  7057. }
  7058. },
  7059. {
  7060. "type": "string",
  7061. "description": "Optional Aiproxy-Channel header",
  7062. "name": "Aiproxy-Channel",
  7063. "in": "header"
  7064. }
  7065. ],
  7066. "responses": {
  7067. "200": {
  7068. "description": "audio binary",
  7069. "schema": {
  7070. "type": "file"
  7071. },
  7072. "headers": {
  7073. "X-RateLimit-Limit-Requests": {
  7074. "type": "integer",
  7075. "description": "X-RateLimit-Limit-Requests"
  7076. },
  7077. "X-RateLimit-Limit-Tokens": {
  7078. "type": "integer",
  7079. "description": "X-RateLimit-Limit-Tokens"
  7080. },
  7081. "X-RateLimit-Remaining-Requests": {
  7082. "type": "integer",
  7083. "description": "X-RateLimit-Remaining-Requests"
  7084. },
  7085. "X-RateLimit-Remaining-Tokens": {
  7086. "type": "integer",
  7087. "description": "X-RateLimit-Remaining-Tokens"
  7088. },
  7089. "X-RateLimit-Reset-Requests": {
  7090. "type": "string",
  7091. "description": "X-RateLimit-Reset-Requests"
  7092. },
  7093. "X-RateLimit-Reset-Tokens": {
  7094. "type": "string",
  7095. "description": "X-RateLimit-Reset-Tokens"
  7096. }
  7097. }
  7098. }
  7099. }
  7100. }
  7101. },
  7102. "/v1/audio/transcriptions": {
  7103. "post": {
  7104. "security": [
  7105. {
  7106. "ApiKeyAuth": []
  7107. }
  7108. ],
  7109. "description": "AudioTranscription",
  7110. "produces": [
  7111. "application/json"
  7112. ],
  7113. "tags": [
  7114. "relay"
  7115. ],
  7116. "summary": "AudioTranscription",
  7117. "parameters": [
  7118. {
  7119. "type": "string",
  7120. "description": "Model",
  7121. "name": "model",
  7122. "in": "formData",
  7123. "required": true
  7124. },
  7125. {
  7126. "type": "file",
  7127. "description": "File",
  7128. "name": "file",
  7129. "in": "formData",
  7130. "required": true
  7131. },
  7132. {
  7133. "type": "string",
  7134. "description": "Optional Aiproxy-Channel header",
  7135. "name": "Aiproxy-Channel",
  7136. "in": "header"
  7137. }
  7138. ],
  7139. "responses": {
  7140. "200": {
  7141. "description": "OK",
  7142. "schema": {
  7143. "$ref": "#/definitions/model.SttJSONResponse"
  7144. },
  7145. "headers": {
  7146. "X-RateLimit-Limit-Requests": {
  7147. "type": "integer",
  7148. "description": "X-RateLimit-Limit-Requests"
  7149. },
  7150. "X-RateLimit-Limit-Tokens": {
  7151. "type": "integer",
  7152. "description": "X-RateLimit-Limit-Tokens"
  7153. },
  7154. "X-RateLimit-Remaining-Requests": {
  7155. "type": "integer",
  7156. "description": "X-RateLimit-Remaining-Requests"
  7157. },
  7158. "X-RateLimit-Remaining-Tokens": {
  7159. "type": "integer",
  7160. "description": "X-RateLimit-Remaining-Tokens"
  7161. },
  7162. "X-RateLimit-Reset-Requests": {
  7163. "type": "string",
  7164. "description": "X-RateLimit-Reset-Requests"
  7165. },
  7166. "X-RateLimit-Reset-Tokens": {
  7167. "type": "string",
  7168. "description": "X-RateLimit-Reset-Tokens"
  7169. }
  7170. }
  7171. }
  7172. }
  7173. }
  7174. },
  7175. "/v1/audio/translations": {
  7176. "post": {
  7177. "security": [
  7178. {
  7179. "ApiKeyAuth": []
  7180. }
  7181. ],
  7182. "description": "AudioTranslation",
  7183. "produces": [
  7184. "application/json"
  7185. ],
  7186. "tags": [
  7187. "relay"
  7188. ],
  7189. "summary": "AudioTranslation",
  7190. "parameters": [
  7191. {
  7192. "type": "string",
  7193. "description": "Model",
  7194. "name": "model",
  7195. "in": "formData",
  7196. "required": true
  7197. },
  7198. {
  7199. "type": "file",
  7200. "description": "File",
  7201. "name": "file",
  7202. "in": "formData",
  7203. "required": true
  7204. },
  7205. {
  7206. "type": "string",
  7207. "description": "Optional Aiproxy-Channel header",
  7208. "name": "Aiproxy-Channel",
  7209. "in": "header"
  7210. }
  7211. ],
  7212. "responses": {
  7213. "200": {
  7214. "description": "OK",
  7215. "schema": {
  7216. "$ref": "#/definitions/model.SttJSONResponse"
  7217. },
  7218. "headers": {
  7219. "X-RateLimit-Limit-Requests": {
  7220. "type": "integer",
  7221. "description": "X-RateLimit-Limit-Requests"
  7222. },
  7223. "X-RateLimit-Limit-Tokens": {
  7224. "type": "integer",
  7225. "description": "X-RateLimit-Limit-Tokens"
  7226. },
  7227. "X-RateLimit-Remaining-Requests": {
  7228. "type": "integer",
  7229. "description": "X-RateLimit-Remaining-Requests"
  7230. },
  7231. "X-RateLimit-Remaining-Tokens": {
  7232. "type": "integer",
  7233. "description": "X-RateLimit-Remaining-Tokens"
  7234. },
  7235. "X-RateLimit-Reset-Requests": {
  7236. "type": "string",
  7237. "description": "X-RateLimit-Reset-Requests"
  7238. },
  7239. "X-RateLimit-Reset-Tokens": {
  7240. "type": "string",
  7241. "description": "X-RateLimit-Reset-Tokens"
  7242. }
  7243. }
  7244. }
  7245. }
  7246. }
  7247. },
  7248. "/v1/chat/completions": {
  7249. "post": {
  7250. "security": [
  7251. {
  7252. "ApiKeyAuth": []
  7253. }
  7254. ],
  7255. "description": "ChatCompletions",
  7256. "produces": [
  7257. "application/json"
  7258. ],
  7259. "tags": [
  7260. "relay"
  7261. ],
  7262. "summary": "ChatCompletions",
  7263. "parameters": [
  7264. {
  7265. "description": "Request",
  7266. "name": "request",
  7267. "in": "body",
  7268. "required": true,
  7269. "schema": {
  7270. "$ref": "#/definitions/model.GeneralOpenAIRequest"
  7271. }
  7272. },
  7273. {
  7274. "type": "string",
  7275. "description": "Optional Aiproxy-Channel header",
  7276. "name": "Aiproxy-Channel",
  7277. "in": "header"
  7278. }
  7279. ],
  7280. "responses": {
  7281. "200": {
  7282. "description": "OK",
  7283. "schema": {
  7284. "$ref": "#/definitions/model.TextResponse"
  7285. },
  7286. "headers": {
  7287. "X-RateLimit-Limit-Requests": {
  7288. "type": "integer",
  7289. "description": "X-RateLimit-Limit-Requests"
  7290. },
  7291. "X-RateLimit-Limit-Tokens": {
  7292. "type": "integer",
  7293. "description": "X-RateLimit-Limit-Tokens"
  7294. },
  7295. "X-RateLimit-Remaining-Requests": {
  7296. "type": "integer",
  7297. "description": "X-RateLimit-Remaining-Requests"
  7298. },
  7299. "X-RateLimit-Remaining-Tokens": {
  7300. "type": "integer",
  7301. "description": "X-RateLimit-Remaining-Tokens"
  7302. },
  7303. "X-RateLimit-Reset-Requests": {
  7304. "type": "string",
  7305. "description": "X-RateLimit-Reset-Requests"
  7306. },
  7307. "X-RateLimit-Reset-Tokens": {
  7308. "type": "string",
  7309. "description": "X-RateLimit-Reset-Tokens"
  7310. }
  7311. }
  7312. }
  7313. }
  7314. }
  7315. },
  7316. "/v1/completions": {
  7317. "post": {
  7318. "security": [
  7319. {
  7320. "ApiKeyAuth": []
  7321. }
  7322. ],
  7323. "description": "Completions",
  7324. "produces": [
  7325. "application/json"
  7326. ],
  7327. "tags": [
  7328. "relay"
  7329. ],
  7330. "summary": "Completions",
  7331. "parameters": [
  7332. {
  7333. "description": "Request",
  7334. "name": "request",
  7335. "in": "body",
  7336. "required": true,
  7337. "schema": {
  7338. "$ref": "#/definitions/model.GeneralOpenAIRequest"
  7339. }
  7340. },
  7341. {
  7342. "type": "string",
  7343. "description": "Optional Aiproxy-Channel header",
  7344. "name": "Aiproxy-Channel",
  7345. "in": "header"
  7346. }
  7347. ],
  7348. "responses": {
  7349. "200": {
  7350. "description": "OK",
  7351. "schema": {
  7352. "$ref": "#/definitions/model.TextResponse"
  7353. },
  7354. "headers": {
  7355. "X-RateLimit-Limit-Requests": {
  7356. "type": "integer",
  7357. "description": "X-RateLimit-Limit-Requests"
  7358. },
  7359. "X-RateLimit-Limit-Tokens": {
  7360. "type": "integer",
  7361. "description": "X-RateLimit-Limit-Tokens"
  7362. },
  7363. "X-RateLimit-Remaining-Requests": {
  7364. "type": "integer",
  7365. "description": "X-RateLimit-Remaining-Requests"
  7366. },
  7367. "X-RateLimit-Remaining-Tokens": {
  7368. "type": "integer",
  7369. "description": "X-RateLimit-Remaining-Tokens"
  7370. },
  7371. "X-RateLimit-Reset-Requests": {
  7372. "type": "string",
  7373. "description": "X-RateLimit-Reset-Requests"
  7374. },
  7375. "X-RateLimit-Reset-Tokens": {
  7376. "type": "string",
  7377. "description": "X-RateLimit-Reset-Tokens"
  7378. }
  7379. }
  7380. }
  7381. }
  7382. }
  7383. },
  7384. "/v1/dashboard/billing/subscription": {
  7385. "get": {
  7386. "security": [
  7387. {
  7388. "ApiKeyAuth": []
  7389. }
  7390. ],
  7391. "description": "Get subscription",
  7392. "produces": [
  7393. "application/json"
  7394. ],
  7395. "tags": [
  7396. "relay"
  7397. ],
  7398. "summary": "Get subscription",
  7399. "responses": {
  7400. "200": {
  7401. "description": "OK",
  7402. "schema": {
  7403. "$ref": "#/definitions/openai.SubscriptionResponse"
  7404. }
  7405. }
  7406. }
  7407. }
  7408. },
  7409. "/v1/dashboard/billing/usage": {
  7410. "get": {
  7411. "security": [
  7412. {
  7413. "ApiKeyAuth": []
  7414. }
  7415. ],
  7416. "description": "Get usage",
  7417. "produces": [
  7418. "application/json"
  7419. ],
  7420. "tags": [
  7421. "relay"
  7422. ],
  7423. "summary": "Get usage",
  7424. "responses": {
  7425. "200": {
  7426. "description": "OK",
  7427. "schema": {
  7428. "$ref": "#/definitions/openai.UsageResponse"
  7429. }
  7430. }
  7431. }
  7432. }
  7433. },
  7434. "/v1/embeddings": {
  7435. "post": {
  7436. "security": [
  7437. {
  7438. "ApiKeyAuth": []
  7439. }
  7440. ],
  7441. "description": "Embeddings",
  7442. "produces": [
  7443. "application/json"
  7444. ],
  7445. "tags": [
  7446. "relay"
  7447. ],
  7448. "summary": "Embeddings",
  7449. "parameters": [
  7450. {
  7451. "description": "Request",
  7452. "name": "request",
  7453. "in": "body",
  7454. "required": true,
  7455. "schema": {
  7456. "$ref": "#/definitions/model.EmbeddingRequest"
  7457. }
  7458. },
  7459. {
  7460. "type": "string",
  7461. "description": "Optional Aiproxy-Channel header",
  7462. "name": "Aiproxy-Channel",
  7463. "in": "header"
  7464. }
  7465. ],
  7466. "responses": {
  7467. "200": {
  7468. "description": "OK",
  7469. "schema": {
  7470. "$ref": "#/definitions/model.EmbeddingResponse"
  7471. },
  7472. "headers": {
  7473. "X-RateLimit-Limit-Requests": {
  7474. "type": "integer",
  7475. "description": "X-RateLimit-Limit-Requests"
  7476. },
  7477. "X-RateLimit-Limit-Tokens": {
  7478. "type": "integer",
  7479. "description": "X-RateLimit-Limit-Tokens"
  7480. },
  7481. "X-RateLimit-Remaining-Requests": {
  7482. "type": "integer",
  7483. "description": "X-RateLimit-Remaining-Requests"
  7484. },
  7485. "X-RateLimit-Remaining-Tokens": {
  7486. "type": "integer",
  7487. "description": "X-RateLimit-Remaining-Tokens"
  7488. },
  7489. "X-RateLimit-Reset-Requests": {
  7490. "type": "string",
  7491. "description": "X-RateLimit-Reset-Requests"
  7492. },
  7493. "X-RateLimit-Reset-Tokens": {
  7494. "type": "string",
  7495. "description": "X-RateLimit-Reset-Tokens"
  7496. }
  7497. }
  7498. }
  7499. }
  7500. }
  7501. },
  7502. "/v1/images/edits": {
  7503. "post": {
  7504. "security": [
  7505. {
  7506. "ApiKeyAuth": []
  7507. }
  7508. ],
  7509. "description": "ImagesEdits",
  7510. "produces": [
  7511. "application/json"
  7512. ],
  7513. "tags": [
  7514. "relay"
  7515. ],
  7516. "summary": "ImagesEdits",
  7517. "parameters": [
  7518. {
  7519. "type": "string",
  7520. "description": "Prompt",
  7521. "name": "prompt",
  7522. "in": "formData",
  7523. "required": true
  7524. },
  7525. {
  7526. "type": "string",
  7527. "description": "Model",
  7528. "name": "model",
  7529. "in": "formData",
  7530. "required": true
  7531. },
  7532. {
  7533. "type": "file",
  7534. "description": "Images",
  7535. "name": "image",
  7536. "in": "formData",
  7537. "required": true
  7538. },
  7539. {
  7540. "type": "string",
  7541. "description": "Optional Aiproxy-Channel header",
  7542. "name": "Aiproxy-Channel",
  7543. "in": "header"
  7544. }
  7545. ],
  7546. "responses": {
  7547. "200": {
  7548. "description": "OK",
  7549. "schema": {
  7550. "$ref": "#/definitions/model.SttJSONResponse"
  7551. },
  7552. "headers": {
  7553. "X-RateLimit-Limit-Requests": {
  7554. "type": "integer",
  7555. "description": "X-RateLimit-Limit-Requests"
  7556. },
  7557. "X-RateLimit-Limit-Tokens": {
  7558. "type": "integer",
  7559. "description": "X-RateLimit-Limit-Tokens"
  7560. },
  7561. "X-RateLimit-Remaining-Requests": {
  7562. "type": "integer",
  7563. "description": "X-RateLimit-Remaining-Requests"
  7564. },
  7565. "X-RateLimit-Remaining-Tokens": {
  7566. "type": "integer",
  7567. "description": "X-RateLimit-Remaining-Tokens"
  7568. },
  7569. "X-RateLimit-Reset-Requests": {
  7570. "type": "string",
  7571. "description": "X-RateLimit-Reset-Requests"
  7572. },
  7573. "X-RateLimit-Reset-Tokens": {
  7574. "type": "string",
  7575. "description": "X-RateLimit-Reset-Tokens"
  7576. }
  7577. }
  7578. }
  7579. }
  7580. }
  7581. },
  7582. "/v1/images/generations": {
  7583. "post": {
  7584. "security": [
  7585. {
  7586. "ApiKeyAuth": []
  7587. }
  7588. ],
  7589. "description": "ImagesGenerations",
  7590. "produces": [
  7591. "application/json"
  7592. ],
  7593. "tags": [
  7594. "relay"
  7595. ],
  7596. "summary": "ImagesGenerations",
  7597. "parameters": [
  7598. {
  7599. "description": "Request",
  7600. "name": "request",
  7601. "in": "body",
  7602. "required": true,
  7603. "schema": {
  7604. "$ref": "#/definitions/model.ImageRequest"
  7605. }
  7606. },
  7607. {
  7608. "type": "string",
  7609. "description": "Optional Aiproxy-Channel header",
  7610. "name": "Aiproxy-Channel",
  7611. "in": "header"
  7612. }
  7613. ],
  7614. "responses": {
  7615. "200": {
  7616. "description": "OK",
  7617. "schema": {
  7618. "$ref": "#/definitions/model.ImageResponse"
  7619. },
  7620. "headers": {
  7621. "X-RateLimit-Limit-Requests": {
  7622. "type": "integer",
  7623. "description": "X-RateLimit-Limit-Requests"
  7624. },
  7625. "X-RateLimit-Limit-Tokens": {
  7626. "type": "integer",
  7627. "description": "X-RateLimit-Limit-Tokens"
  7628. },
  7629. "X-RateLimit-Remaining-Requests": {
  7630. "type": "integer",
  7631. "description": "X-RateLimit-Remaining-Requests"
  7632. },
  7633. "X-RateLimit-Remaining-Tokens": {
  7634. "type": "integer",
  7635. "description": "X-RateLimit-Remaining-Tokens"
  7636. },
  7637. "X-RateLimit-Reset-Requests": {
  7638. "type": "string",
  7639. "description": "X-RateLimit-Reset-Requests"
  7640. },
  7641. "X-RateLimit-Reset-Tokens": {
  7642. "type": "string",
  7643. "description": "X-RateLimit-Reset-Tokens"
  7644. }
  7645. }
  7646. }
  7647. }
  7648. }
  7649. },
  7650. "/v1/messages": {
  7651. "post": {
  7652. "security": [
  7653. {
  7654. "ApiKeyAuth": []
  7655. }
  7656. ],
  7657. "description": "Anthropic",
  7658. "produces": [
  7659. "application/json"
  7660. ],
  7661. "tags": [
  7662. "relay"
  7663. ],
  7664. "summary": "Anthropic",
  7665. "parameters": [
  7666. {
  7667. "description": "Request",
  7668. "name": "request",
  7669. "in": "body",
  7670. "required": true,
  7671. "schema": {
  7672. "$ref": "#/definitions/model.AnthropicMessageRequest"
  7673. }
  7674. },
  7675. {
  7676. "type": "string",
  7677. "description": "Optional Aiproxy-Channel header",
  7678. "name": "Aiproxy-Channel",
  7679. "in": "header"
  7680. }
  7681. ],
  7682. "responses": {
  7683. "200": {
  7684. "description": "OK",
  7685. "schema": {
  7686. "$ref": "#/definitions/model.TextResponse"
  7687. },
  7688. "headers": {
  7689. "X-RateLimit-Limit-Requests": {
  7690. "type": "integer",
  7691. "description": "X-RateLimit-Limit-Requests"
  7692. },
  7693. "X-RateLimit-Limit-Tokens": {
  7694. "type": "integer",
  7695. "description": "X-RateLimit-Limit-Tokens"
  7696. },
  7697. "X-RateLimit-Remaining-Requests": {
  7698. "type": "integer",
  7699. "description": "X-RateLimit-Remaining-Requests"
  7700. },
  7701. "X-RateLimit-Remaining-Tokens": {
  7702. "type": "integer",
  7703. "description": "X-RateLimit-Remaining-Tokens"
  7704. },
  7705. "X-RateLimit-Reset-Requests": {
  7706. "type": "string",
  7707. "description": "X-RateLimit-Reset-Requests"
  7708. },
  7709. "X-RateLimit-Reset-Tokens": {
  7710. "type": "string",
  7711. "description": "X-RateLimit-Reset-Tokens"
  7712. }
  7713. }
  7714. }
  7715. }
  7716. }
  7717. },
  7718. "/v1/models": {
  7719. "get": {
  7720. "security": [
  7721. {
  7722. "ApiKeyAuth": []
  7723. }
  7724. ],
  7725. "description": "List all models",
  7726. "produces": [
  7727. "application/json"
  7728. ],
  7729. "tags": [
  7730. "relay"
  7731. ],
  7732. "summary": "List models",
  7733. "responses": {
  7734. "200": {
  7735. "description": "OK",
  7736. "schema": {
  7737. "type": "object",
  7738. "properties": {
  7739. "data": {
  7740. "type": "array",
  7741. "items": {
  7742. "$ref": "#/definitions/controller.OpenAIModels"
  7743. }
  7744. },
  7745. "object": {
  7746. "type": "string"
  7747. }
  7748. }
  7749. }
  7750. }
  7751. }
  7752. }
  7753. },
  7754. "/v1/models/{model}": {
  7755. "get": {
  7756. "security": [
  7757. {
  7758. "ApiKeyAuth": []
  7759. }
  7760. ],
  7761. "description": "Retrieve a model",
  7762. "produces": [
  7763. "application/json"
  7764. ],
  7765. "tags": [
  7766. "relay"
  7767. ],
  7768. "summary": "Retrieve model",
  7769. "responses": {
  7770. "200": {
  7771. "description": "OK",
  7772. "schema": {
  7773. "$ref": "#/definitions/controller.OpenAIModels"
  7774. }
  7775. }
  7776. }
  7777. }
  7778. },
  7779. "/v1/parse/pdf": {
  7780. "post": {
  7781. "security": [
  7782. {
  7783. "ApiKeyAuth": []
  7784. }
  7785. ],
  7786. "description": "ParsePdf",
  7787. "produces": [
  7788. "application/json"
  7789. ],
  7790. "tags": [
  7791. "relay"
  7792. ],
  7793. "summary": "ParsePdf",
  7794. "parameters": [
  7795. {
  7796. "type": "string",
  7797. "description": "Model",
  7798. "name": "model",
  7799. "in": "formData",
  7800. "required": true
  7801. },
  7802. {
  7803. "type": "file",
  7804. "description": "File",
  7805. "name": "file",
  7806. "in": "formData",
  7807. "required": true
  7808. },
  7809. {
  7810. "type": "string",
  7811. "description": "Optional Aiproxy-Channel header",
  7812. "name": "Aiproxy-Channel",
  7813. "in": "header"
  7814. }
  7815. ],
  7816. "responses": {
  7817. "200": {
  7818. "description": "OK",
  7819. "schema": {
  7820. "$ref": "#/definitions/model.ParsePdfResponse"
  7821. },
  7822. "headers": {
  7823. "X-RateLimit-Limit-Requests": {
  7824. "type": "integer",
  7825. "description": "X-RateLimit-Limit-Requests"
  7826. },
  7827. "X-RateLimit-Limit-Tokens": {
  7828. "type": "integer",
  7829. "description": "X-RateLimit-Limit-Tokens"
  7830. },
  7831. "X-RateLimit-Remaining-Requests": {
  7832. "type": "integer",
  7833. "description": "X-RateLimit-Remaining-Requests"
  7834. },
  7835. "X-RateLimit-Remaining-Tokens": {
  7836. "type": "integer",
  7837. "description": "X-RateLimit-Remaining-Tokens"
  7838. },
  7839. "X-RateLimit-Reset-Requests": {
  7840. "type": "string",
  7841. "description": "X-RateLimit-Reset-Requests"
  7842. },
  7843. "X-RateLimit-Reset-Tokens": {
  7844. "type": "string",
  7845. "description": "X-RateLimit-Reset-Tokens"
  7846. }
  7847. }
  7848. }
  7849. }
  7850. }
  7851. },
  7852. "/v1/rerank": {
  7853. "post": {
  7854. "security": [
  7855. {
  7856. "ApiKeyAuth": []
  7857. }
  7858. ],
  7859. "description": "Rerank",
  7860. "produces": [
  7861. "application/json"
  7862. ],
  7863. "tags": [
  7864. "relay"
  7865. ],
  7866. "summary": "Rerank",
  7867. "parameters": [
  7868. {
  7869. "description": "Request",
  7870. "name": "request",
  7871. "in": "body",
  7872. "required": true,
  7873. "schema": {
  7874. "$ref": "#/definitions/model.RerankRequest"
  7875. }
  7876. },
  7877. {
  7878. "type": "string",
  7879. "description": "Optional Aiproxy-Channel header",
  7880. "name": "Aiproxy-Channel",
  7881. "in": "header"
  7882. }
  7883. ],
  7884. "responses": {
  7885. "200": {
  7886. "description": "OK",
  7887. "schema": {
  7888. "$ref": "#/definitions/model.RerankResponse"
  7889. },
  7890. "headers": {
  7891. "X-RateLimit-Limit-Requests": {
  7892. "type": "integer",
  7893. "description": "X-RateLimit-Limit-Requests"
  7894. },
  7895. "X-RateLimit-Limit-Tokens": {
  7896. "type": "integer",
  7897. "description": "X-RateLimit-Limit-Tokens"
  7898. },
  7899. "X-RateLimit-Remaining-Requests": {
  7900. "type": "integer",
  7901. "description": "X-RateLimit-Remaining-Requests"
  7902. },
  7903. "X-RateLimit-Remaining-Tokens": {
  7904. "type": "integer",
  7905. "description": "X-RateLimit-Remaining-Tokens"
  7906. },
  7907. "X-RateLimit-Reset-Requests": {
  7908. "type": "string",
  7909. "description": "X-RateLimit-Reset-Requests"
  7910. },
  7911. "X-RateLimit-Reset-Tokens": {
  7912. "type": "string",
  7913. "description": "X-RateLimit-Reset-Tokens"
  7914. }
  7915. }
  7916. }
  7917. }
  7918. }
  7919. },
  7920. "/v1/responses": {
  7921. "post": {
  7922. "security": [
  7923. {
  7924. "ApiKeyAuth": []
  7925. }
  7926. ],
  7927. "description": "Create a new response",
  7928. "produces": [
  7929. "application/json"
  7930. ],
  7931. "tags": [
  7932. "relay"
  7933. ],
  7934. "summary": "Create response",
  7935. "parameters": [
  7936. {
  7937. "description": "Request",
  7938. "name": "request",
  7939. "in": "body",
  7940. "required": true,
  7941. "schema": {
  7942. "$ref": "#/definitions/model.CreateResponseRequest"
  7943. }
  7944. },
  7945. {
  7946. "type": "string",
  7947. "description": "Optional Aiproxy-Channel header",
  7948. "name": "Aiproxy-Channel",
  7949. "in": "header"
  7950. }
  7951. ],
  7952. "responses": {
  7953. "200": {
  7954. "description": "OK",
  7955. "schema": {
  7956. "$ref": "#/definitions/model.Response"
  7957. },
  7958. "headers": {
  7959. "X-RateLimit-Limit-Requests": {
  7960. "type": "integer",
  7961. "description": "X-RateLimit-Limit-Requests"
  7962. },
  7963. "X-RateLimit-Limit-Tokens": {
  7964. "type": "integer",
  7965. "description": "X-RateLimit-Limit-Tokens"
  7966. },
  7967. "X-RateLimit-Remaining-Requests": {
  7968. "type": "integer",
  7969. "description": "X-RateLimit-Remaining-Requests"
  7970. },
  7971. "X-RateLimit-Remaining-Tokens": {
  7972. "type": "integer",
  7973. "description": "X-RateLimit-Remaining-Tokens"
  7974. },
  7975. "X-RateLimit-Reset-Requests": {
  7976. "type": "string",
  7977. "description": "X-RateLimit-Reset-Requests"
  7978. },
  7979. "X-RateLimit-Reset-Tokens": {
  7980. "type": "string",
  7981. "description": "X-RateLimit-Reset-Tokens"
  7982. }
  7983. }
  7984. }
  7985. }
  7986. }
  7987. },
  7988. "/v1/responses/{response_id}": {
  7989. "get": {
  7990. "security": [
  7991. {
  7992. "ApiKeyAuth": []
  7993. }
  7994. ],
  7995. "description": "Get a response by ID",
  7996. "produces": [
  7997. "application/json"
  7998. ],
  7999. "tags": [
  8000. "relay"
  8001. ],
  8002. "summary": "Get response",
  8003. "parameters": [
  8004. {
  8005. "type": "string",
  8006. "description": "Response ID",
  8007. "name": "response_id",
  8008. "in": "path",
  8009. "required": true
  8010. },
  8011. {
  8012. "type": "string",
  8013. "description": "Optional Aiproxy-Channel header",
  8014. "name": "Aiproxy-Channel",
  8015. "in": "header"
  8016. }
  8017. ],
  8018. "responses": {
  8019. "200": {
  8020. "description": "OK",
  8021. "schema": {
  8022. "$ref": "#/definitions/model.Response"
  8023. }
  8024. }
  8025. }
  8026. },
  8027. "delete": {
  8028. "security": [
  8029. {
  8030. "ApiKeyAuth": []
  8031. }
  8032. ],
  8033. "description": "Delete a response by ID",
  8034. "produces": [
  8035. "application/json"
  8036. ],
  8037. "tags": [
  8038. "relay"
  8039. ],
  8040. "summary": "Delete response",
  8041. "parameters": [
  8042. {
  8043. "type": "string",
  8044. "description": "Response ID",
  8045. "name": "response_id",
  8046. "in": "path",
  8047. "required": true
  8048. },
  8049. {
  8050. "type": "string",
  8051. "description": "Optional Aiproxy-Channel header",
  8052. "name": "Aiproxy-Channel",
  8053. "in": "header"
  8054. }
  8055. ],
  8056. "responses": {
  8057. "204": {
  8058. "description": "No Content"
  8059. }
  8060. }
  8061. }
  8062. },
  8063. "/v1/responses/{response_id}/cancel": {
  8064. "post": {
  8065. "security": [
  8066. {
  8067. "ApiKeyAuth": []
  8068. }
  8069. ],
  8070. "description": "Cancel a response by ID",
  8071. "produces": [
  8072. "application/json"
  8073. ],
  8074. "tags": [
  8075. "relay"
  8076. ],
  8077. "summary": "Cancel response",
  8078. "parameters": [
  8079. {
  8080. "type": "string",
  8081. "description": "Response ID",
  8082. "name": "response_id",
  8083. "in": "path",
  8084. "required": true
  8085. },
  8086. {
  8087. "type": "string",
  8088. "description": "Optional Aiproxy-Channel header",
  8089. "name": "Aiproxy-Channel",
  8090. "in": "header"
  8091. }
  8092. ],
  8093. "responses": {
  8094. "200": {
  8095. "description": "OK",
  8096. "schema": {
  8097. "$ref": "#/definitions/model.Response"
  8098. }
  8099. }
  8100. }
  8101. }
  8102. },
  8103. "/v1/responses/{response_id}/input_items": {
  8104. "get": {
  8105. "security": [
  8106. {
  8107. "ApiKeyAuth": []
  8108. }
  8109. ],
  8110. "description": "Get input items for a response",
  8111. "produces": [
  8112. "application/json"
  8113. ],
  8114. "tags": [
  8115. "relay"
  8116. ],
  8117. "summary": "Get response input items",
  8118. "parameters": [
  8119. {
  8120. "type": "string",
  8121. "description": "Response ID",
  8122. "name": "response_id",
  8123. "in": "path",
  8124. "required": true
  8125. },
  8126. {
  8127. "type": "string",
  8128. "description": "Optional Aiproxy-Channel header",
  8129. "name": "Aiproxy-Channel",
  8130. "in": "header"
  8131. }
  8132. ],
  8133. "responses": {
  8134. "200": {
  8135. "description": "OK",
  8136. "schema": {
  8137. "$ref": "#/definitions/model.InputItemList"
  8138. }
  8139. }
  8140. }
  8141. }
  8142. },
  8143. "/v1/video/generations/jobs": {
  8144. "post": {
  8145. "security": [
  8146. {
  8147. "ApiKeyAuth": []
  8148. }
  8149. ],
  8150. "description": "VideoGenerationsJobs",
  8151. "produces": [
  8152. "application/json"
  8153. ],
  8154. "tags": [
  8155. "relay"
  8156. ],
  8157. "summary": "VideoGenerationsJobs",
  8158. "parameters": [
  8159. {
  8160. "description": "Request",
  8161. "name": "request",
  8162. "in": "body",
  8163. "required": true,
  8164. "schema": {
  8165. "$ref": "#/definitions/model.VideoGenerationJobRequest"
  8166. }
  8167. },
  8168. {
  8169. "type": "string",
  8170. "description": "Optional Aiproxy-Channel header",
  8171. "name": "Aiproxy-Channel",
  8172. "in": "header"
  8173. }
  8174. ],
  8175. "responses": {
  8176. "200": {
  8177. "description": "OK",
  8178. "schema": {
  8179. "$ref": "#/definitions/model.VideoGenerationJob"
  8180. },
  8181. "headers": {
  8182. "X-RateLimit-Limit-Requests": {
  8183. "type": "integer",
  8184. "description": "X-RateLimit-Limit-Requests"
  8185. },
  8186. "X-RateLimit-Limit-Tokens": {
  8187. "type": "integer",
  8188. "description": "X-RateLimit-Limit-Tokens"
  8189. },
  8190. "X-RateLimit-Remaining-Requests": {
  8191. "type": "integer",
  8192. "description": "X-RateLimit-Remaining-Requests"
  8193. },
  8194. "X-RateLimit-Remaining-Tokens": {
  8195. "type": "integer",
  8196. "description": "X-RateLimit-Remaining-Tokens"
  8197. },
  8198. "X-RateLimit-Reset-Requests": {
  8199. "type": "string",
  8200. "description": "X-RateLimit-Reset-Requests"
  8201. },
  8202. "X-RateLimit-Reset-Tokens": {
  8203. "type": "string",
  8204. "description": "X-RateLimit-Reset-Tokens"
  8205. }
  8206. }
  8207. }
  8208. }
  8209. }
  8210. },
  8211. "/v1/video/generations/jobs/{id}": {
  8212. "get": {
  8213. "security": [
  8214. {
  8215. "ApiKeyAuth": []
  8216. }
  8217. ],
  8218. "description": "VideoGenerationsGetJobs",
  8219. "produces": [
  8220. "application/json"
  8221. ],
  8222. "tags": [
  8223. "relay"
  8224. ],
  8225. "summary": "VideoGenerationsGetJobs",
  8226. "parameters": [
  8227. {
  8228. "description": "Request",
  8229. "name": "request",
  8230. "in": "body",
  8231. "required": true,
  8232. "schema": {
  8233. "$ref": "#/definitions/model.VideoGenerationJobRequest"
  8234. }
  8235. },
  8236. {
  8237. "type": "string",
  8238. "description": "Optional Aiproxy-Channel header",
  8239. "name": "Aiproxy-Channel",
  8240. "in": "header"
  8241. }
  8242. ],
  8243. "responses": {
  8244. "200": {
  8245. "description": "OK",
  8246. "schema": {
  8247. "$ref": "#/definitions/model.VideoGenerationJob"
  8248. },
  8249. "headers": {
  8250. "X-RateLimit-Limit-Requests": {
  8251. "type": "integer",
  8252. "description": "X-RateLimit-Limit-Requests"
  8253. },
  8254. "X-RateLimit-Limit-Tokens": {
  8255. "type": "integer",
  8256. "description": "X-RateLimit-Limit-Tokens"
  8257. },
  8258. "X-RateLimit-Remaining-Requests": {
  8259. "type": "integer",
  8260. "description": "X-RateLimit-Remaining-Requests"
  8261. },
  8262. "X-RateLimit-Remaining-Tokens": {
  8263. "type": "integer",
  8264. "description": "X-RateLimit-Remaining-Tokens"
  8265. },
  8266. "X-RateLimit-Reset-Requests": {
  8267. "type": "string",
  8268. "description": "X-RateLimit-Reset-Requests"
  8269. },
  8270. "X-RateLimit-Reset-Tokens": {
  8271. "type": "string",
  8272. "description": "X-RateLimit-Reset-Tokens"
  8273. }
  8274. }
  8275. }
  8276. }
  8277. }
  8278. },
  8279. "/v1/video/generations/{id}/content/video": {
  8280. "get": {
  8281. "security": [
  8282. {
  8283. "ApiKeyAuth": []
  8284. }
  8285. ],
  8286. "description": "VideoGenerationsContent",
  8287. "produces": [
  8288. "application/json"
  8289. ],
  8290. "tags": [
  8291. "relay"
  8292. ],
  8293. "summary": "VideoGenerationsContent",
  8294. "parameters": [
  8295. {
  8296. "description": "Request",
  8297. "name": "request",
  8298. "in": "body",
  8299. "required": true,
  8300. "schema": {
  8301. "$ref": "#/definitions/model.VideoGenerationJobRequest"
  8302. }
  8303. },
  8304. {
  8305. "type": "string",
  8306. "description": "Optional Aiproxy-Channel header",
  8307. "name": "Aiproxy-Channel",
  8308. "in": "header"
  8309. }
  8310. ],
  8311. "responses": {
  8312. "200": {
  8313. "description": "video binary",
  8314. "schema": {
  8315. "type": "file"
  8316. },
  8317. "headers": {
  8318. "X-RateLimit-Limit-Requests": {
  8319. "type": "integer",
  8320. "description": "X-RateLimit-Limit-Requests"
  8321. },
  8322. "X-RateLimit-Limit-Tokens": {
  8323. "type": "integer",
  8324. "description": "X-RateLimit-Limit-Tokens"
  8325. },
  8326. "X-RateLimit-Remaining-Requests": {
  8327. "type": "integer",
  8328. "description": "X-RateLimit-Remaining-Requests"
  8329. },
  8330. "X-RateLimit-Remaining-Tokens": {
  8331. "type": "integer",
  8332. "description": "X-RateLimit-Remaining-Tokens"
  8333. },
  8334. "X-RateLimit-Reset-Requests": {
  8335. "type": "string",
  8336. "description": "X-RateLimit-Reset-Requests"
  8337. },
  8338. "X-RateLimit-Reset-Tokens": {
  8339. "type": "string",
  8340. "description": "X-RateLimit-Reset-Tokens"
  8341. }
  8342. }
  8343. }
  8344. }
  8345. }
  8346. }
  8347. },
  8348. "definitions": {
  8349. "adaptor.ConfigTemplate": {
  8350. "type": "object",
  8351. "properties": {
  8352. "description": {
  8353. "type": "string"
  8354. },
  8355. "example": {},
  8356. "name": {
  8357. "type": "string"
  8358. },
  8359. "required": {
  8360. "type": "boolean"
  8361. },
  8362. "type": {
  8363. "$ref": "#/definitions/adaptor.ConfigType"
  8364. }
  8365. }
  8366. },
  8367. "adaptor.ConfigTemplates": {
  8368. "type": "object",
  8369. "additionalProperties": {
  8370. "$ref": "#/definitions/adaptor.ConfigTemplate"
  8371. }
  8372. },
  8373. "adaptor.ConfigType": {
  8374. "type": "string",
  8375. "enum": [
  8376. "string",
  8377. "number",
  8378. "bool",
  8379. "object"
  8380. ],
  8381. "x-enum-varnames": [
  8382. "ConfigTypeString",
  8383. "ConfigTypeNumber",
  8384. "ConfigTypeBool",
  8385. "ConfigTypeObject"
  8386. ]
  8387. },
  8388. "adaptors.AdaptorMeta": {
  8389. "type": "object",
  8390. "properties": {
  8391. "config": {
  8392. "$ref": "#/definitions/adaptor.ConfigTemplates"
  8393. },
  8394. "defaultBaseUrl": {
  8395. "type": "string"
  8396. },
  8397. "fetures": {
  8398. "type": "array",
  8399. "items": {
  8400. "type": "string"
  8401. }
  8402. },
  8403. "keyHelp": {
  8404. "type": "string"
  8405. },
  8406. "name": {
  8407. "type": "string"
  8408. }
  8409. }
  8410. },
  8411. "controller.AddChannelRequest": {
  8412. "type": "object",
  8413. "properties": {
  8414. "base_url": {
  8415. "type": "string"
  8416. },
  8417. "config": {
  8418. "$ref": "#/definitions/model.ChannelConfig"
  8419. },
  8420. "key": {
  8421. "type": "string"
  8422. },
  8423. "model_mapping": {
  8424. "type": "object",
  8425. "additionalProperties": {
  8426. "type": "string"
  8427. }
  8428. },
  8429. "models": {
  8430. "type": "array",
  8431. "items": {
  8432. "type": "string"
  8433. }
  8434. },
  8435. "name": {
  8436. "type": "string"
  8437. },
  8438. "priority": {
  8439. "type": "integer"
  8440. },
  8441. "sets": {
  8442. "type": "array",
  8443. "items": {
  8444. "type": "string"
  8445. }
  8446. },
  8447. "status": {
  8448. "type": "integer"
  8449. },
  8450. "type": {
  8451. "$ref": "#/definitions/model.ChannelType"
  8452. }
  8453. }
  8454. },
  8455. "controller.AddTokenRequest": {
  8456. "type": "object",
  8457. "properties": {
  8458. "expiredAt": {
  8459. "type": "integer"
  8460. },
  8461. "models": {
  8462. "type": "array",
  8463. "items": {
  8464. "type": "string"
  8465. }
  8466. },
  8467. "name": {
  8468. "type": "string"
  8469. },
  8470. "quota": {
  8471. "type": "number"
  8472. },
  8473. "subnets": {
  8474. "type": "array",
  8475. "items": {
  8476. "type": "string"
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "controller.BuiltinModelConfig": {
  8482. "type": "object",
  8483. "properties": {
  8484. "config": {
  8485. "type": "object",
  8486. "additionalProperties": {}
  8487. },
  8488. "created_at": {
  8489. "type": "string"
  8490. },
  8491. "exclude_from_tests": {
  8492. "type": "boolean"
  8493. },
  8494. "force_save_detail": {
  8495. "type": "boolean"
  8496. },
  8497. "image_prices": {
  8498. "description": "map[size]price_per_image",
  8499. "type": "object",
  8500. "additionalProperties": {
  8501. "type": "number",
  8502. "format": "float64"
  8503. }
  8504. },
  8505. "image_quality_prices": {
  8506. "description": "map[size]map[quality]price_per_image",
  8507. "type": "object",
  8508. "additionalProperties": {
  8509. "type": "object",
  8510. "additionalProperties": {
  8511. "type": "number",
  8512. "format": "float64"
  8513. }
  8514. }
  8515. },
  8516. "max_error_rate": {
  8517. "type": "number"
  8518. },
  8519. "model": {
  8520. "type": "string"
  8521. },
  8522. "owner": {
  8523. "$ref": "#/definitions/model.ModelOwner"
  8524. },
  8525. "plugin": {
  8526. "type": "object",
  8527. "additionalProperties": {
  8528. "type": "array",
  8529. "items": {
  8530. "type": "integer"
  8531. }
  8532. }
  8533. },
  8534. "price": {
  8535. "$ref": "#/definitions/model.Price"
  8536. },
  8537. "retry_times": {
  8538. "type": "integer"
  8539. },
  8540. "rpm": {
  8541. "type": "integer"
  8542. },
  8543. "timeout": {
  8544. "type": "integer"
  8545. },
  8546. "tpm": {
  8547. "type": "integer"
  8548. },
  8549. "type": {
  8550. "$ref": "#/definitions/mode.Mode"
  8551. },
  8552. "updated_at": {
  8553. "type": "string"
  8554. }
  8555. }
  8556. },
  8557. "controller.CreateGroupRequest": {
  8558. "type": "object",
  8559. "properties": {
  8560. "available_sets": {
  8561. "type": "array",
  8562. "items": {
  8563. "type": "string"
  8564. }
  8565. },
  8566. "balance_alert_enabled": {
  8567. "type": "boolean"
  8568. },
  8569. "balance_alert_threshold": {
  8570. "type": "number"
  8571. },
  8572. "rpm_ratio": {
  8573. "type": "number"
  8574. },
  8575. "tpm_ratio": {
  8576. "type": "number"
  8577. }
  8578. }
  8579. },
  8580. "controller.EmbedMCP": {
  8581. "type": "object",
  8582. "properties": {
  8583. "config_templates": {
  8584. "$ref": "#/definitions/controller.EmbedMCPConfigTemplates"
  8585. },
  8586. "embed_config": {
  8587. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  8588. },
  8589. "enabled": {
  8590. "type": "boolean"
  8591. },
  8592. "github_url": {
  8593. "type": "string"
  8594. },
  8595. "id": {
  8596. "type": "string"
  8597. },
  8598. "name": {
  8599. "type": "string"
  8600. },
  8601. "name_cn": {
  8602. "type": "string"
  8603. },
  8604. "readme": {
  8605. "type": "string"
  8606. },
  8607. "readme_cn": {
  8608. "type": "string"
  8609. },
  8610. "readme_cn_url": {
  8611. "type": "string"
  8612. },
  8613. "readme_url": {
  8614. "type": "string"
  8615. },
  8616. "tags": {
  8617. "type": "array",
  8618. "items": {
  8619. "type": "string"
  8620. }
  8621. }
  8622. }
  8623. },
  8624. "controller.EmbedMCPConfigTemplate": {
  8625. "type": "object",
  8626. "properties": {
  8627. "description": {
  8628. "type": "string"
  8629. },
  8630. "example": {
  8631. "type": "string"
  8632. },
  8633. "name": {
  8634. "type": "string"
  8635. },
  8636. "required": {
  8637. "type": "boolean"
  8638. }
  8639. }
  8640. },
  8641. "controller.EmbedMCPConfigTemplates": {
  8642. "type": "object",
  8643. "additionalProperties": {
  8644. "$ref": "#/definitions/controller.EmbedMCPConfigTemplate"
  8645. }
  8646. },
  8647. "controller.EnabledModelChannel": {
  8648. "type": "object",
  8649. "properties": {
  8650. "id": {
  8651. "type": "integer"
  8652. },
  8653. "name": {
  8654. "type": "string"
  8655. },
  8656. "type": {
  8657. "$ref": "#/definitions/model.ChannelType"
  8658. }
  8659. }
  8660. },
  8661. "controller.GetModelConfigsByModelsContainsRequest": {
  8662. "type": "object",
  8663. "properties": {
  8664. "models": {
  8665. "type": "array",
  8666. "items": {
  8667. "type": "string"
  8668. }
  8669. }
  8670. }
  8671. },
  8672. "controller.GroupMCPResponse": {
  8673. "type": "object",
  8674. "properties": {
  8675. "created_at": {
  8676. "type": "string"
  8677. },
  8678. "description": {
  8679. "type": "string"
  8680. },
  8681. "endpoints": {
  8682. "$ref": "#/definitions/controller.MCPEndpoint"
  8683. },
  8684. "group_id": {
  8685. "type": "string"
  8686. },
  8687. "id": {
  8688. "type": "string"
  8689. },
  8690. "name": {
  8691. "type": "string"
  8692. },
  8693. "openapi_config": {
  8694. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  8695. },
  8696. "proxy_config": {
  8697. "$ref": "#/definitions/model.GroupMCPProxyConfig"
  8698. },
  8699. "status": {
  8700. "$ref": "#/definitions/model.GroupMCPStatus"
  8701. },
  8702. "type": {
  8703. "$ref": "#/definitions/model.GroupMCPType"
  8704. },
  8705. "update_at": {
  8706. "type": "string"
  8707. }
  8708. }
  8709. },
  8710. "controller.GroupModel": {
  8711. "type": "object",
  8712. "properties": {
  8713. "config": {
  8714. "type": "object",
  8715. "additionalProperties": {}
  8716. },
  8717. "created_at": {
  8718. "type": "integer"
  8719. },
  8720. "enabled_plugins": {
  8721. "type": "array",
  8722. "items": {
  8723. "type": "string"
  8724. }
  8725. },
  8726. "image_prices": {
  8727. "description": "map[size]price_per_image",
  8728. "type": "object",
  8729. "additionalProperties": {
  8730. "type": "number",
  8731. "format": "float64"
  8732. }
  8733. },
  8734. "image_quality_prices": {
  8735. "description": "map[size]map[quality]price_per_image",
  8736. "type": "object",
  8737. "additionalProperties": {
  8738. "type": "object",
  8739. "additionalProperties": {
  8740. "type": "number",
  8741. "format": "float64"
  8742. }
  8743. }
  8744. },
  8745. "model": {
  8746. "type": "string"
  8747. },
  8748. "owner": {
  8749. "$ref": "#/definitions/model.ModelOwner"
  8750. },
  8751. "price": {
  8752. "$ref": "#/definitions/model.Price"
  8753. },
  8754. "rpm": {
  8755. "type": "integer"
  8756. },
  8757. "tpm": {
  8758. "type": "integer"
  8759. },
  8760. "type": {
  8761. "$ref": "#/definitions/mode.Mode"
  8762. },
  8763. "updated_at": {
  8764. "type": "integer"
  8765. }
  8766. }
  8767. },
  8768. "controller.GroupPublicMCPDetailResponse": {
  8769. "type": "object",
  8770. "properties": {
  8771. "created_at": {
  8772. "type": "string"
  8773. },
  8774. "description": {
  8775. "type": "string"
  8776. },
  8777. "description_cn": {
  8778. "type": "string"
  8779. },
  8780. "embed_config": {
  8781. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  8782. },
  8783. "endpoints": {
  8784. "$ref": "#/definitions/controller.MCPEndpoint"
  8785. },
  8786. "github_url": {
  8787. "type": "string"
  8788. },
  8789. "hosted": {
  8790. "type": "boolean"
  8791. },
  8792. "id": {
  8793. "type": "string"
  8794. },
  8795. "logo_url": {
  8796. "type": "string"
  8797. },
  8798. "name": {
  8799. "type": "string"
  8800. },
  8801. "name_cn": {
  8802. "type": "string"
  8803. },
  8804. "openapi_config": {
  8805. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  8806. },
  8807. "params": {
  8808. "type": "object",
  8809. "additionalProperties": {
  8810. "type": "string"
  8811. }
  8812. },
  8813. "price": {
  8814. "$ref": "#/definitions/model.MCPPrice"
  8815. },
  8816. "proxy_config": {
  8817. "$ref": "#/definitions/model.PublicMCPProxyConfig"
  8818. },
  8819. "readme": {
  8820. "type": "string"
  8821. },
  8822. "readme_cn": {
  8823. "type": "string"
  8824. },
  8825. "readme_cn_url": {
  8826. "type": "string"
  8827. },
  8828. "readme_url": {
  8829. "type": "string"
  8830. },
  8831. "reusing": {
  8832. "type": "object",
  8833. "additionalProperties": {
  8834. "$ref": "#/definitions/model.ReusingParam"
  8835. }
  8836. },
  8837. "status": {
  8838. "$ref": "#/definitions/model.PublicMCPStatus"
  8839. },
  8840. "tags": {
  8841. "type": "array",
  8842. "items": {
  8843. "type": "string"
  8844. }
  8845. },
  8846. "test_config": {
  8847. "description": "only used by list tools",
  8848. "allOf": [
  8849. {
  8850. "$ref": "#/definitions/model.TestConfig"
  8851. }
  8852. ]
  8853. },
  8854. "tools": {
  8855. "type": "array",
  8856. "items": {
  8857. "$ref": "#/definitions/mcp.Tool"
  8858. }
  8859. },
  8860. "type": {
  8861. "$ref": "#/definitions/model.PublicMCPType"
  8862. },
  8863. "update_at": {
  8864. "type": "string"
  8865. }
  8866. }
  8867. },
  8868. "controller.GroupPublicMCPResponse": {
  8869. "type": "object",
  8870. "properties": {
  8871. "created_at": {
  8872. "type": "string"
  8873. },
  8874. "description": {
  8875. "type": "string"
  8876. },
  8877. "description_cn": {
  8878. "type": "string"
  8879. },
  8880. "embed_config": {
  8881. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  8882. },
  8883. "github_url": {
  8884. "type": "string"
  8885. },
  8886. "hosted": {
  8887. "type": "boolean"
  8888. },
  8889. "id": {
  8890. "type": "string"
  8891. },
  8892. "logo_url": {
  8893. "type": "string"
  8894. },
  8895. "name": {
  8896. "type": "string"
  8897. },
  8898. "name_cn": {
  8899. "type": "string"
  8900. },
  8901. "openapi_config": {
  8902. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  8903. },
  8904. "price": {
  8905. "$ref": "#/definitions/model.MCPPrice"
  8906. },
  8907. "proxy_config": {
  8908. "$ref": "#/definitions/model.PublicMCPProxyConfig"
  8909. },
  8910. "readme": {
  8911. "type": "string"
  8912. },
  8913. "readme_cn": {
  8914. "type": "string"
  8915. },
  8916. "readme_cn_url": {
  8917. "type": "string"
  8918. },
  8919. "readme_url": {
  8920. "type": "string"
  8921. },
  8922. "status": {
  8923. "$ref": "#/definitions/model.PublicMCPStatus"
  8924. },
  8925. "tags": {
  8926. "type": "array",
  8927. "items": {
  8928. "type": "string"
  8929. }
  8930. },
  8931. "test_config": {
  8932. "description": "only used by list tools",
  8933. "allOf": [
  8934. {
  8935. "$ref": "#/definitions/model.TestConfig"
  8936. }
  8937. ]
  8938. },
  8939. "type": {
  8940. "$ref": "#/definitions/model.PublicMCPType"
  8941. },
  8942. "update_at": {
  8943. "type": "string"
  8944. }
  8945. }
  8946. },
  8947. "controller.GroupResponse": {
  8948. "type": "object",
  8949. "properties": {
  8950. "accessed_at": {
  8951. "type": "string"
  8952. },
  8953. "available_sets": {
  8954. "type": "array",
  8955. "items": {
  8956. "type": "string"
  8957. }
  8958. },
  8959. "balance_alert_enabled": {
  8960. "type": "boolean"
  8961. },
  8962. "balance_alert_threshold": {
  8963. "type": "number"
  8964. },
  8965. "created_at": {
  8966. "type": "string"
  8967. },
  8968. "id": {
  8969. "type": "string"
  8970. },
  8971. "request_count": {
  8972. "type": "integer"
  8973. },
  8974. "rpm_ratio": {
  8975. "type": "number"
  8976. },
  8977. "status": {
  8978. "type": "integer"
  8979. },
  8980. "tpm_ratio": {
  8981. "type": "number"
  8982. },
  8983. "used_amount": {
  8984. "type": "number"
  8985. }
  8986. }
  8987. },
  8988. "controller.ImportChannelFromOneAPIRequest": {
  8989. "type": "object",
  8990. "properties": {
  8991. "dsn": {
  8992. "type": "string"
  8993. }
  8994. }
  8995. },
  8996. "controller.MCPEndpoint": {
  8997. "type": "object",
  8998. "properties": {
  8999. "host": {
  9000. "type": "string"
  9001. },
  9002. "sse": {
  9003. "type": "string"
  9004. },
  9005. "streamable_http": {
  9006. "type": "string"
  9007. }
  9008. }
  9009. },
  9010. "controller.OpenAIModelPermission": {
  9011. "type": "object",
  9012. "properties": {
  9013. "allow_create_engine": {
  9014. "type": "boolean"
  9015. },
  9016. "allow_fine_tuning": {
  9017. "type": "boolean"
  9018. },
  9019. "allow_logprobs": {
  9020. "type": "boolean"
  9021. },
  9022. "allow_sampling": {
  9023. "type": "boolean"
  9024. },
  9025. "allow_search_indices": {
  9026. "type": "boolean"
  9027. },
  9028. "allow_view": {
  9029. "type": "boolean"
  9030. },
  9031. "created": {
  9032. "type": "integer"
  9033. },
  9034. "group": {
  9035. "type": "string"
  9036. },
  9037. "id": {
  9038. "type": "string"
  9039. },
  9040. "is_blocking": {
  9041. "type": "boolean"
  9042. },
  9043. "object": {
  9044. "type": "string"
  9045. },
  9046. "organization": {
  9047. "type": "string"
  9048. }
  9049. }
  9050. },
  9051. "controller.OpenAIModels": {
  9052. "type": "object",
  9053. "properties": {
  9054. "created": {
  9055. "type": "integer"
  9056. },
  9057. "id": {
  9058. "type": "string"
  9059. },
  9060. "object": {
  9061. "type": "string"
  9062. },
  9063. "owned_by": {
  9064. "type": "string"
  9065. },
  9066. "parent": {
  9067. "type": "string"
  9068. },
  9069. "permission": {
  9070. "type": "array",
  9071. "items": {
  9072. "$ref": "#/definitions/controller.OpenAIModelPermission"
  9073. }
  9074. },
  9075. "root": {
  9076. "type": "string"
  9077. }
  9078. }
  9079. },
  9080. "controller.PublicMCPResponse": {
  9081. "type": "object",
  9082. "properties": {
  9083. "created_at": {
  9084. "type": "string"
  9085. },
  9086. "description": {
  9087. "type": "string"
  9088. },
  9089. "description_cn": {
  9090. "type": "string"
  9091. },
  9092. "embed_config": {
  9093. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  9094. },
  9095. "endpoints": {
  9096. "$ref": "#/definitions/controller.MCPEndpoint"
  9097. },
  9098. "github_url": {
  9099. "type": "string"
  9100. },
  9101. "id": {
  9102. "type": "string"
  9103. },
  9104. "logo_url": {
  9105. "type": "string"
  9106. },
  9107. "name": {
  9108. "type": "string"
  9109. },
  9110. "name_cn": {
  9111. "type": "string"
  9112. },
  9113. "openapi_config": {
  9114. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  9115. },
  9116. "price": {
  9117. "$ref": "#/definitions/model.MCPPrice"
  9118. },
  9119. "proxy_config": {
  9120. "$ref": "#/definitions/model.PublicMCPProxyConfig"
  9121. },
  9122. "readme": {
  9123. "type": "string"
  9124. },
  9125. "readme_cn": {
  9126. "type": "string"
  9127. },
  9128. "readme_cn_url": {
  9129. "type": "string"
  9130. },
  9131. "readme_url": {
  9132. "type": "string"
  9133. },
  9134. "status": {
  9135. "$ref": "#/definitions/model.PublicMCPStatus"
  9136. },
  9137. "tags": {
  9138. "type": "array",
  9139. "items": {
  9140. "type": "string"
  9141. }
  9142. },
  9143. "test_config": {
  9144. "description": "only used by list tools",
  9145. "allOf": [
  9146. {
  9147. "$ref": "#/definitions/model.TestConfig"
  9148. }
  9149. ]
  9150. },
  9151. "type": {
  9152. "$ref": "#/definitions/model.PublicMCPType"
  9153. },
  9154. "update_at": {
  9155. "type": "string"
  9156. }
  9157. }
  9158. },
  9159. "controller.SaveEmbedMCPRequest": {
  9160. "type": "object",
  9161. "properties": {
  9162. "enabled": {
  9163. "type": "boolean"
  9164. },
  9165. "id": {
  9166. "type": "string"
  9167. },
  9168. "init_config": {
  9169. "type": "object",
  9170. "additionalProperties": {
  9171. "type": "string"
  9172. }
  9173. }
  9174. }
  9175. },
  9176. "controller.SaveGroupModelConfigRequest": {
  9177. "type": "object",
  9178. "properties": {
  9179. "force_save_detail": {
  9180. "type": "boolean"
  9181. },
  9182. "image_prices": {
  9183. "type": "object",
  9184. "additionalProperties": {
  9185. "type": "number",
  9186. "format": "float64"
  9187. }
  9188. },
  9189. "model": {
  9190. "type": "string"
  9191. },
  9192. "override_force_save_detail": {
  9193. "type": "boolean"
  9194. },
  9195. "override_limit": {
  9196. "type": "boolean"
  9197. },
  9198. "override_price": {
  9199. "type": "boolean"
  9200. },
  9201. "override_retry_times": {
  9202. "type": "boolean"
  9203. },
  9204. "price": {
  9205. "$ref": "#/definitions/model.Price"
  9206. },
  9207. "retry_times": {
  9208. "type": "integer"
  9209. },
  9210. "rpm": {
  9211. "type": "integer"
  9212. },
  9213. "tpm": {
  9214. "type": "integer"
  9215. }
  9216. }
  9217. },
  9218. "controller.SaveModelConfigsRequest": {
  9219. "type": "object",
  9220. "properties": {
  9221. "config": {
  9222. "type": "object",
  9223. "additionalProperties": {}
  9224. },
  9225. "created_at": {
  9226. "type": "string"
  9227. },
  9228. "exclude_from_tests": {
  9229. "type": "boolean"
  9230. },
  9231. "force_save_detail": {
  9232. "type": "boolean"
  9233. },
  9234. "image_prices": {
  9235. "description": "map[size]price_per_image",
  9236. "type": "object",
  9237. "additionalProperties": {
  9238. "type": "number",
  9239. "format": "float64"
  9240. }
  9241. },
  9242. "image_quality_prices": {
  9243. "description": "map[size]map[quality]price_per_image",
  9244. "type": "object",
  9245. "additionalProperties": {
  9246. "type": "object",
  9247. "additionalProperties": {
  9248. "type": "number",
  9249. "format": "float64"
  9250. }
  9251. }
  9252. },
  9253. "max_error_rate": {
  9254. "type": "number"
  9255. },
  9256. "model": {
  9257. "type": "string"
  9258. },
  9259. "owner": {
  9260. "$ref": "#/definitions/model.ModelOwner"
  9261. },
  9262. "plugin": {
  9263. "type": "object",
  9264. "additionalProperties": {
  9265. "type": "array",
  9266. "items": {
  9267. "type": "integer"
  9268. }
  9269. }
  9270. },
  9271. "price": {
  9272. "$ref": "#/definitions/model.Price"
  9273. },
  9274. "retry_times": {
  9275. "type": "integer"
  9276. },
  9277. "rpm": {
  9278. "type": "integer"
  9279. },
  9280. "timeout": {
  9281. "type": "integer"
  9282. },
  9283. "tpm": {
  9284. "type": "integer"
  9285. },
  9286. "type": {
  9287. "$ref": "#/definitions/mode.Mode"
  9288. },
  9289. "updated_at": {
  9290. "type": "string"
  9291. }
  9292. }
  9293. },
  9294. "controller.StatusData": {
  9295. "type": "object",
  9296. "properties": {
  9297. "startTime": {
  9298. "type": "integer"
  9299. }
  9300. }
  9301. },
  9302. "controller.TestResult": {
  9303. "type": "object",
  9304. "properties": {
  9305. "data": {
  9306. "$ref": "#/definitions/model.ChannelTest"
  9307. },
  9308. "message": {
  9309. "type": "string"
  9310. },
  9311. "success": {
  9312. "type": "boolean"
  9313. }
  9314. }
  9315. },
  9316. "controller.TokenResponse": {
  9317. "type": "object",
  9318. "properties": {
  9319. "accessed_at": {
  9320. "type": "string"
  9321. },
  9322. "created_at": {
  9323. "type": "string"
  9324. },
  9325. "expired_at": {
  9326. "type": "string"
  9327. },
  9328. "group": {
  9329. "type": "string"
  9330. },
  9331. "id": {
  9332. "type": "integer"
  9333. },
  9334. "key": {
  9335. "type": "string"
  9336. },
  9337. "models": {
  9338. "type": "array",
  9339. "items": {
  9340. "type": "string"
  9341. }
  9342. },
  9343. "name": {
  9344. "type": "string"
  9345. },
  9346. "quota": {
  9347. "type": "number"
  9348. },
  9349. "request_count": {
  9350. "type": "integer"
  9351. },
  9352. "status": {
  9353. "type": "integer"
  9354. },
  9355. "subnets": {
  9356. "type": "array",
  9357. "items": {
  9358. "type": "string"
  9359. }
  9360. },
  9361. "used_amount": {
  9362. "type": "number"
  9363. }
  9364. }
  9365. },
  9366. "controller.UpdateChannelStatusRequest": {
  9367. "type": "object",
  9368. "properties": {
  9369. "status": {
  9370. "type": "integer"
  9371. }
  9372. }
  9373. },
  9374. "controller.UpdateGroupMCPStatusRequest": {
  9375. "type": "object",
  9376. "properties": {
  9377. "status": {
  9378. "$ref": "#/definitions/model.GroupMCPStatus"
  9379. }
  9380. }
  9381. },
  9382. "controller.UpdateGroupRPMRatioRequest": {
  9383. "type": "object",
  9384. "properties": {
  9385. "rpm_ratio": {
  9386. "type": "number"
  9387. }
  9388. }
  9389. },
  9390. "controller.UpdateGroupStatusRequest": {
  9391. "type": "object",
  9392. "properties": {
  9393. "status": {
  9394. "type": "integer"
  9395. }
  9396. }
  9397. },
  9398. "controller.UpdateGroupTPMRatioRequest": {
  9399. "type": "object",
  9400. "properties": {
  9401. "tpm_ratio": {
  9402. "type": "number"
  9403. }
  9404. }
  9405. },
  9406. "controller.UpdateGroupsStatusRequest": {
  9407. "type": "object",
  9408. "properties": {
  9409. "groups": {
  9410. "type": "array",
  9411. "items": {
  9412. "type": "string"
  9413. }
  9414. },
  9415. "status": {
  9416. "type": "integer"
  9417. }
  9418. }
  9419. },
  9420. "controller.UpdatePublicMCPStatusRequest": {
  9421. "type": "object",
  9422. "properties": {
  9423. "status": {
  9424. "$ref": "#/definitions/model.PublicMCPStatus"
  9425. }
  9426. }
  9427. },
  9428. "controller.UpdateTokenNameRequest": {
  9429. "type": "object",
  9430. "properties": {
  9431. "name": {
  9432. "type": "string"
  9433. }
  9434. }
  9435. },
  9436. "controller.UpdateTokenStatusRequest": {
  9437. "type": "object",
  9438. "properties": {
  9439. "status": {
  9440. "type": "integer"
  9441. }
  9442. }
  9443. },
  9444. "mcp.Tool": {
  9445. "type": "object",
  9446. "properties": {
  9447. "annotations": {
  9448. "description": "Optional properties describing tool behavior",
  9449. "allOf": [
  9450. {
  9451. "$ref": "#/definitions/mcp.ToolAnnotation"
  9452. }
  9453. ]
  9454. },
  9455. "description": {
  9456. "description": "A human-readable description of the tool.",
  9457. "type": "string"
  9458. },
  9459. "inputSchema": {
  9460. "description": "A JSON Schema object defining the expected parameters for the tool.",
  9461. "allOf": [
  9462. {
  9463. "$ref": "#/definitions/mcp.ToolInputSchema"
  9464. }
  9465. ]
  9466. },
  9467. "name": {
  9468. "description": "The name of the tool.",
  9469. "type": "string"
  9470. }
  9471. }
  9472. },
  9473. "mcp.ToolAnnotation": {
  9474. "type": "object",
  9475. "properties": {
  9476. "destructiveHint": {
  9477. "description": "If true, the tool may perform destructive updates",
  9478. "type": "boolean"
  9479. },
  9480. "idempotentHint": {
  9481. "description": "If true, repeated calls with same args have no additional effect",
  9482. "type": "boolean"
  9483. },
  9484. "openWorldHint": {
  9485. "description": "If true, tool interacts with external entities",
  9486. "type": "boolean"
  9487. },
  9488. "readOnlyHint": {
  9489. "description": "If true, the tool does not modify its environment",
  9490. "type": "boolean"
  9491. },
  9492. "title": {
  9493. "description": "Human-readable title for the tool",
  9494. "type": "string"
  9495. }
  9496. }
  9497. },
  9498. "mcp.ToolInputSchema": {
  9499. "type": "object",
  9500. "properties": {
  9501. "properties": {
  9502. "type": "object",
  9503. "additionalProperties": {}
  9504. },
  9505. "required": {
  9506. "type": "array",
  9507. "items": {
  9508. "type": "string"
  9509. }
  9510. },
  9511. "type": {
  9512. "type": "string"
  9513. }
  9514. }
  9515. },
  9516. "middleware.APIResponse": {
  9517. "type": "object",
  9518. "properties": {
  9519. "data": {},
  9520. "message": {
  9521. "type": "string"
  9522. },
  9523. "success": {
  9524. "type": "boolean"
  9525. }
  9526. }
  9527. },
  9528. "mode.Mode": {
  9529. "type": "integer",
  9530. "enum": [
  9531. 0,
  9532. 1,
  9533. 2,
  9534. 3,
  9535. 4,
  9536. 5,
  9537. 6,
  9538. 7,
  9539. 8,
  9540. 9,
  9541. 10,
  9542. 11,
  9543. 12,
  9544. 13,
  9545. 14,
  9546. 15,
  9547. 16,
  9548. 17,
  9549. 18,
  9550. 19,
  9551. 20
  9552. ],
  9553. "x-enum-varnames": [
  9554. "Unknown",
  9555. "ChatCompletions",
  9556. "Completions",
  9557. "Embeddings",
  9558. "Moderations",
  9559. "ImagesGenerations",
  9560. "ImagesEdits",
  9561. "AudioSpeech",
  9562. "AudioTranscription",
  9563. "AudioTranslation",
  9564. "Rerank",
  9565. "ParsePdf",
  9566. "Anthropic",
  9567. "VideoGenerationsJobs",
  9568. "VideoGenerationsGetJobs",
  9569. "VideoGenerationsContent",
  9570. "Responses",
  9571. "ResponsesGet",
  9572. "ResponsesDelete",
  9573. "ResponsesCancel",
  9574. "ResponsesInputItems"
  9575. ]
  9576. },
  9577. "model.AnthropicMessageRequest": {
  9578. "type": "object",
  9579. "properties": {
  9580. "messages": {
  9581. "type": "array",
  9582. "items": {
  9583. "$ref": "#/definitions/model.Message"
  9584. }
  9585. },
  9586. "model": {
  9587. "type": "string"
  9588. }
  9589. }
  9590. },
  9591. "model.Channel": {
  9592. "type": "object",
  9593. "properties": {
  9594. "balance": {
  9595. "type": "number"
  9596. },
  9597. "balance_threshold": {
  9598. "type": "number"
  9599. },
  9600. "balance_updated_at": {
  9601. "type": "string"
  9602. },
  9603. "base_url": {
  9604. "type": "string"
  9605. },
  9606. "channel_tests": {
  9607. "type": "array",
  9608. "items": {
  9609. "$ref": "#/definitions/model.ChannelTest"
  9610. }
  9611. },
  9612. "config": {
  9613. "$ref": "#/definitions/model.ChannelConfig"
  9614. },
  9615. "created_at": {
  9616. "type": "string"
  9617. },
  9618. "enabled_auto_balance_check": {
  9619. "type": "boolean"
  9620. },
  9621. "id": {
  9622. "type": "integer"
  9623. },
  9624. "key": {
  9625. "type": "string"
  9626. },
  9627. "last_test_error_at": {
  9628. "type": "string"
  9629. },
  9630. "model_mapping": {
  9631. "type": "object",
  9632. "additionalProperties": {
  9633. "type": "string"
  9634. }
  9635. },
  9636. "models": {
  9637. "type": "array",
  9638. "items": {
  9639. "type": "string"
  9640. }
  9641. },
  9642. "name": {
  9643. "type": "string"
  9644. },
  9645. "priority": {
  9646. "type": "integer"
  9647. },
  9648. "request_count": {
  9649. "type": "integer"
  9650. },
  9651. "retry_count": {
  9652. "type": "integer"
  9653. },
  9654. "sets": {
  9655. "type": "array",
  9656. "items": {
  9657. "type": "string"
  9658. }
  9659. },
  9660. "status": {
  9661. "type": "integer"
  9662. },
  9663. "type": {
  9664. "$ref": "#/definitions/model.ChannelType"
  9665. },
  9666. "used_amount": {
  9667. "type": "number"
  9668. }
  9669. }
  9670. },
  9671. "model.ChannelConfig": {
  9672. "type": "object",
  9673. "properties": {
  9674. "spec": {
  9675. "type": "array",
  9676. "items": {
  9677. "type": "integer"
  9678. }
  9679. }
  9680. }
  9681. },
  9682. "model.ChannelTest": {
  9683. "type": "object",
  9684. "properties": {
  9685. "actual_model": {
  9686. "type": "string"
  9687. },
  9688. "channel_id": {
  9689. "type": "integer"
  9690. },
  9691. "channel_name": {
  9692. "type": "string"
  9693. },
  9694. "channel_type": {
  9695. "$ref": "#/definitions/model.ChannelType"
  9696. },
  9697. "code": {
  9698. "type": "integer"
  9699. },
  9700. "mode": {
  9701. "$ref": "#/definitions/mode.Mode"
  9702. },
  9703. "model": {
  9704. "type": "string"
  9705. },
  9706. "response": {
  9707. "type": "string"
  9708. },
  9709. "success": {
  9710. "type": "boolean"
  9711. },
  9712. "test_at": {
  9713. "type": "string"
  9714. },
  9715. "took": {
  9716. "type": "number"
  9717. }
  9718. }
  9719. },
  9720. "model.ChannelType": {
  9721. "type": "integer",
  9722. "enum": [
  9723. 1,
  9724. 3,
  9725. 4,
  9726. 12,
  9727. 13,
  9728. 14,
  9729. 15,
  9730. 16,
  9731. 17,
  9732. 18,
  9733. 19,
  9734. 20,
  9735. 23,
  9736. 24,
  9737. 25,
  9738. 26,
  9739. 27,
  9740. 28,
  9741. 29,
  9742. 30,
  9743. 31,
  9744. 32,
  9745. 33,
  9746. 34,
  9747. 35,
  9748. 36,
  9749. 37,
  9750. 40,
  9751. 41,
  9752. 42,
  9753. 43,
  9754. 44,
  9755. 45,
  9756. 46,
  9757. 47,
  9758. 48,
  9759. 49
  9760. ],
  9761. "x-enum-varnames": [
  9762. "ChannelTypeOpenAI",
  9763. "ChannelTypeAzure",
  9764. "ChannelTypeAzure2",
  9765. "ChannelTypeGoogleGeminiOpenAI",
  9766. "ChannelTypeBaiduV2",
  9767. "ChannelTypeAnthropic",
  9768. "ChannelTypeBaidu",
  9769. "ChannelTypeZhipu",
  9770. "ChannelTypeAli",
  9771. "ChannelTypeXunfei",
  9772. "ChannelTypeAI360",
  9773. "ChannelTypeOpenRouter",
  9774. "ChannelTypeTencent",
  9775. "ChannelTypeGoogleGemini",
  9776. "ChannelTypeMoonshot",
  9777. "ChannelTypeBaichuan",
  9778. "ChannelTypeMinimax",
  9779. "ChannelTypeMistral",
  9780. "ChannelTypeGroq",
  9781. "ChannelTypeOllama",
  9782. "ChannelTypeLingyiwanwu",
  9783. "ChannelTypeStepfun",
  9784. "ChannelTypeAWS",
  9785. "ChannelTypeCoze",
  9786. "ChannelTypeCohere",
  9787. "ChannelTypeDeepseek",
  9788. "ChannelTypeCloudflare",
  9789. "ChannelTypeDoubao",
  9790. "ChannelTypeNovita",
  9791. "ChannelTypeVertexAI",
  9792. "ChannelTypeSiliconflow",
  9793. "ChannelTypeDoubaoAudio",
  9794. "ChannelTypeXAI",
  9795. "ChannelTypeDoc2x",
  9796. "ChannelTypeJina",
  9797. "ChannelTypeTextEmbeddingsInference",
  9798. "ChannelTypeQianfan"
  9799. ]
  9800. },
  9801. "model.ChartData": {
  9802. "type": "object",
  9803. "properties": {
  9804. "audio_input_tokens": {
  9805. "type": "integer"
  9806. },
  9807. "cache_creation_tokens": {
  9808. "type": "integer"
  9809. },
  9810. "cached_tokens": {
  9811. "type": "integer"
  9812. },
  9813. "exception_count": {
  9814. "type": "integer"
  9815. },
  9816. "image_input_tokens": {
  9817. "type": "integer"
  9818. },
  9819. "input_tokens": {
  9820. "type": "integer"
  9821. },
  9822. "output_tokens": {
  9823. "type": "integer"
  9824. },
  9825. "reasoning_tokens": {
  9826. "type": "integer"
  9827. },
  9828. "request_count": {
  9829. "type": "integer"
  9830. },
  9831. "retry_count": {
  9832. "type": "integer"
  9833. },
  9834. "status_400_count": {
  9835. "type": "integer"
  9836. },
  9837. "status_429_count": {
  9838. "type": "integer"
  9839. },
  9840. "status_4xx_count": {
  9841. "type": "integer"
  9842. },
  9843. "status_500_count": {
  9844. "type": "integer"
  9845. },
  9846. "status_5xx_count": {
  9847. "type": "integer"
  9848. },
  9849. "timestamp": {
  9850. "type": "integer"
  9851. },
  9852. "total_time_milliseconds": {
  9853. "type": "integer"
  9854. },
  9855. "total_tokens": {
  9856. "type": "integer"
  9857. },
  9858. "total_ttfb_milliseconds": {
  9859. "type": "integer"
  9860. },
  9861. "used_amount": {
  9862. "type": "number"
  9863. },
  9864. "web_search_count": {
  9865. "type": "integer"
  9866. }
  9867. }
  9868. },
  9869. "model.ChatUsage": {
  9870. "type": "object",
  9871. "properties": {
  9872. "completion_tokens": {
  9873. "type": "integer"
  9874. },
  9875. "completion_tokens_details": {
  9876. "$ref": "#/definitions/model.CompletionTokensDetails"
  9877. },
  9878. "prompt_tokens": {
  9879. "type": "integer"
  9880. },
  9881. "prompt_tokens_details": {
  9882. "$ref": "#/definitions/model.PromptTokensDetails"
  9883. },
  9884. "total_tokens": {
  9885. "type": "integer"
  9886. },
  9887. "web_search_count": {
  9888. "type": "integer"
  9889. }
  9890. }
  9891. },
  9892. "model.ClaudeThinkingType": {
  9893. "type": "string",
  9894. "enum": [
  9895. "enabled",
  9896. "disabled"
  9897. ],
  9898. "x-enum-varnames": [
  9899. "ClaudeThinkingTypeEnabled",
  9900. "ClaudeThinkingTypeDisabled"
  9901. ]
  9902. },
  9903. "model.CompletionTokensDetails": {
  9904. "type": "object",
  9905. "properties": {
  9906. "accepted_prediction_tokens": {
  9907. "type": "integer"
  9908. },
  9909. "audio_tokens": {
  9910. "type": "integer"
  9911. },
  9912. "reasoning_tokens": {
  9913. "type": "integer"
  9914. },
  9915. "rejected_prediction_tokens": {
  9916. "type": "integer"
  9917. }
  9918. }
  9919. },
  9920. "model.ConditionalPrice": {
  9921. "type": "object",
  9922. "properties": {
  9923. "condition": {
  9924. "$ref": "#/definitions/model.PriceCondition"
  9925. },
  9926. "price": {
  9927. "$ref": "#/definitions/model.Price"
  9928. }
  9929. }
  9930. },
  9931. "model.CreateResponseRequest": {
  9932. "type": "object",
  9933. "properties": {
  9934. "instructions": {
  9935. "type": "string"
  9936. },
  9937. "max_output_tokens": {
  9938. "type": "integer"
  9939. },
  9940. "messages": {
  9941. "type": "array",
  9942. "items": {
  9943. "$ref": "#/definitions/model.Message"
  9944. }
  9945. },
  9946. "metadata": {
  9947. "type": "object",
  9948. "additionalProperties": {}
  9949. },
  9950. "model": {
  9951. "type": "string"
  9952. },
  9953. "parallel_tool_calls": {
  9954. "type": "boolean"
  9955. },
  9956. "previous_response_id": {
  9957. "type": "string"
  9958. },
  9959. "store": {
  9960. "type": "boolean"
  9961. },
  9962. "stream": {
  9963. "type": "boolean"
  9964. },
  9965. "temperature": {
  9966. "type": "number"
  9967. },
  9968. "tool_choice": {},
  9969. "tools": {
  9970. "type": "array",
  9971. "items": {
  9972. "$ref": "#/definitions/model.Tool"
  9973. }
  9974. },
  9975. "top_p": {
  9976. "type": "number"
  9977. },
  9978. "truncation": {
  9979. "type": "string"
  9980. },
  9981. "user": {
  9982. "type": "string"
  9983. }
  9984. }
  9985. },
  9986. "model.DashboardResponse": {
  9987. "type": "object",
  9988. "properties": {
  9989. "audio_input_tokens": {
  9990. "type": "integer"
  9991. },
  9992. "cache_creation_tokens": {
  9993. "type": "integer"
  9994. },
  9995. "cached_tokens": {
  9996. "type": "integer"
  9997. },
  9998. "channels": {
  9999. "type": "array",
  10000. "items": {
  10001. "type": "integer"
  10002. }
  10003. },
  10004. "chart_data": {
  10005. "type": "array",
  10006. "items": {
  10007. "$ref": "#/definitions/model.ChartData"
  10008. }
  10009. },
  10010. "exception_count": {
  10011. "type": "integer"
  10012. },
  10013. "image_input_tokens": {
  10014. "type": "integer"
  10015. },
  10016. "input_tokens": {
  10017. "type": "integer"
  10018. },
  10019. "max_rpm": {
  10020. "type": "integer"
  10021. },
  10022. "max_tpm": {
  10023. "type": "integer"
  10024. },
  10025. "models": {
  10026. "type": "array",
  10027. "items": {
  10028. "type": "string"
  10029. }
  10030. },
  10031. "output_tokens": {
  10032. "type": "integer"
  10033. },
  10034. "reasoning_tokens": {
  10035. "type": "integer"
  10036. },
  10037. "request_count": {
  10038. "type": "integer"
  10039. },
  10040. "retry_count": {
  10041. "type": "integer"
  10042. },
  10043. "rpm": {
  10044. "type": "integer"
  10045. },
  10046. "status_400_count": {
  10047. "type": "integer"
  10048. },
  10049. "status_429_count": {
  10050. "type": "integer"
  10051. },
  10052. "status_4xx_count": {
  10053. "type": "integer"
  10054. },
  10055. "status_500_count": {
  10056. "type": "integer"
  10057. },
  10058. "status_5xx_count": {
  10059. "type": "integer"
  10060. },
  10061. "total_count": {
  10062. "description": "use Count.RequestCount instead",
  10063. "type": "integer"
  10064. },
  10065. "total_time_milliseconds": {
  10066. "type": "integer"
  10067. },
  10068. "total_tokens": {
  10069. "type": "integer"
  10070. },
  10071. "total_ttfb_milliseconds": {
  10072. "type": "integer"
  10073. },
  10074. "tpm": {
  10075. "type": "integer"
  10076. },
  10077. "used_amount": {
  10078. "type": "number"
  10079. },
  10080. "web_search_count": {
  10081. "type": "integer"
  10082. }
  10083. }
  10084. },
  10085. "model.Document": {
  10086. "type": "object",
  10087. "properties": {
  10088. "text": {
  10089. "type": "string"
  10090. }
  10091. }
  10092. },
  10093. "model.EmbeddingPromptTokensDetails": {
  10094. "type": "object",
  10095. "properties": {
  10096. "image_tokens": {
  10097. "type": "integer"
  10098. },
  10099. "text_tokens": {
  10100. "type": "integer"
  10101. }
  10102. }
  10103. },
  10104. "model.EmbeddingRequest": {
  10105. "type": "object",
  10106. "properties": {
  10107. "dimensions": {
  10108. "type": "integer"
  10109. },
  10110. "encoding_format": {
  10111. "type": "string"
  10112. },
  10113. "input": {
  10114. "type": "string"
  10115. },
  10116. "model": {
  10117. "type": "string"
  10118. }
  10119. }
  10120. },
  10121. "model.EmbeddingResponse": {
  10122. "type": "object",
  10123. "properties": {
  10124. "data": {
  10125. "type": "array",
  10126. "items": {
  10127. "$ref": "#/definitions/model.EmbeddingResponseItem"
  10128. }
  10129. },
  10130. "model": {
  10131. "type": "string"
  10132. },
  10133. "object": {
  10134. "type": "string"
  10135. },
  10136. "usage": {
  10137. "$ref": "#/definitions/model.EmbeddingUsage"
  10138. }
  10139. }
  10140. },
  10141. "model.EmbeddingResponseItem": {
  10142. "type": "object",
  10143. "properties": {
  10144. "embedding": {
  10145. "type": "array",
  10146. "items": {
  10147. "type": "number"
  10148. }
  10149. },
  10150. "index": {
  10151. "type": "integer"
  10152. },
  10153. "object": {
  10154. "type": "string"
  10155. }
  10156. }
  10157. },
  10158. "model.EmbeddingUsage": {
  10159. "type": "object",
  10160. "properties": {
  10161. "prompt_tokens": {
  10162. "type": "integer"
  10163. },
  10164. "prompt_tokens_details": {
  10165. "$ref": "#/definitions/model.EmbeddingPromptTokensDetails"
  10166. },
  10167. "total_tokens": {
  10168. "type": "integer"
  10169. }
  10170. }
  10171. },
  10172. "model.FinishReason": {
  10173. "type": "string",
  10174. "enum": [
  10175. "stop",
  10176. "length",
  10177. "content_filter",
  10178. "tool_calls",
  10179. "function_call"
  10180. ],
  10181. "x-enum-varnames": [
  10182. "FinishReasonStop",
  10183. "FinishReasonLength",
  10184. "FinishReasonContentFilter",
  10185. "FinishReasonToolCalls",
  10186. "FinishReasonFunctionCall"
  10187. ]
  10188. },
  10189. "model.Function": {
  10190. "type": "object",
  10191. "properties": {
  10192. "arguments": {
  10193. "type": "string"
  10194. },
  10195. "description": {
  10196. "type": "string"
  10197. },
  10198. "name": {
  10199. "type": "string"
  10200. },
  10201. "parameters": {}
  10202. }
  10203. },
  10204. "model.GeneralOpenAIRequest": {
  10205. "type": "object",
  10206. "properties": {
  10207. "frequency_penalty": {
  10208. "type": "number"
  10209. },
  10210. "function_call": {},
  10211. "functions": {},
  10212. "input": {},
  10213. "logit_bias": {},
  10214. "logprobs": {
  10215. "type": "boolean"
  10216. },
  10217. "max_completion_tokens": {
  10218. "type": "integer"
  10219. },
  10220. "max_tokens": {
  10221. "type": "integer"
  10222. },
  10223. "messages": {
  10224. "type": "array",
  10225. "items": {
  10226. "$ref": "#/definitions/model.Message"
  10227. }
  10228. },
  10229. "metadata": {},
  10230. "model": {
  10231. "type": "string"
  10232. },
  10233. "num_ctx": {
  10234. "type": "integer"
  10235. },
  10236. "presence_penalty": {
  10237. "type": "number"
  10238. },
  10239. "prompt": {},
  10240. "response_format": {
  10241. "$ref": "#/definitions/model.ResponseFormat"
  10242. },
  10243. "seed": {
  10244. "type": "number"
  10245. },
  10246. "size": {
  10247. "type": "string"
  10248. },
  10249. "stop": {},
  10250. "stream": {
  10251. "type": "boolean"
  10252. },
  10253. "stream_options": {
  10254. "$ref": "#/definitions/model.StreamOptions"
  10255. },
  10256. "temperature": {
  10257. "type": "number"
  10258. },
  10259. "thinking": {
  10260. "description": "aiproxy control field",
  10261. "allOf": [
  10262. {
  10263. "$ref": "#/definitions/model.GeneralThinking"
  10264. }
  10265. ]
  10266. },
  10267. "tool_choice": {},
  10268. "tools": {
  10269. "type": "array",
  10270. "items": {
  10271. "$ref": "#/definitions/model.Tool"
  10272. }
  10273. },
  10274. "top_k": {
  10275. "type": "integer"
  10276. },
  10277. "top_logprobs": {
  10278. "type": "integer"
  10279. },
  10280. "top_p": {
  10281. "type": "number"
  10282. },
  10283. "user": {
  10284. "type": "string"
  10285. }
  10286. }
  10287. },
  10288. "model.GeneralThinking": {
  10289. "type": "object",
  10290. "properties": {
  10291. "budget_tokens": {
  10292. "description": "when type is \"disabled\", this field must be 0",
  10293. "type": "integer"
  10294. },
  10295. "type": {
  10296. "$ref": "#/definitions/model.ClaudeThinkingType"
  10297. }
  10298. }
  10299. },
  10300. "model.GetGroupLogsResult": {
  10301. "type": "object",
  10302. "properties": {
  10303. "channels": {
  10304. "type": "array",
  10305. "items": {
  10306. "type": "integer"
  10307. }
  10308. },
  10309. "logs": {
  10310. "type": "array",
  10311. "items": {
  10312. "$ref": "#/definitions/model.Log"
  10313. }
  10314. },
  10315. "models": {
  10316. "type": "array",
  10317. "items": {
  10318. "type": "string"
  10319. }
  10320. },
  10321. "token_names": {
  10322. "type": "array",
  10323. "items": {
  10324. "type": "string"
  10325. }
  10326. },
  10327. "total": {
  10328. "type": "integer"
  10329. }
  10330. }
  10331. },
  10332. "model.GetLogsResult": {
  10333. "type": "object",
  10334. "properties": {
  10335. "channels": {
  10336. "type": "array",
  10337. "items": {
  10338. "type": "integer"
  10339. }
  10340. },
  10341. "logs": {
  10342. "type": "array",
  10343. "items": {
  10344. "$ref": "#/definitions/model.Log"
  10345. }
  10346. },
  10347. "total": {
  10348. "type": "integer"
  10349. }
  10350. }
  10351. },
  10352. "model.Group": {
  10353. "type": "object",
  10354. "properties": {
  10355. "available_sets": {
  10356. "type": "array",
  10357. "items": {
  10358. "type": "string"
  10359. }
  10360. },
  10361. "balance_alert_enabled": {
  10362. "type": "boolean"
  10363. },
  10364. "balance_alert_threshold": {
  10365. "type": "number"
  10366. },
  10367. "created_at": {
  10368. "type": "string"
  10369. },
  10370. "id": {
  10371. "type": "string"
  10372. },
  10373. "request_count": {
  10374. "type": "integer"
  10375. },
  10376. "rpm_ratio": {
  10377. "type": "number"
  10378. },
  10379. "status": {
  10380. "type": "integer"
  10381. },
  10382. "tpm_ratio": {
  10383. "type": "number"
  10384. },
  10385. "used_amount": {
  10386. "type": "number"
  10387. }
  10388. }
  10389. },
  10390. "model.GroupDashboardResponse": {
  10391. "type": "object",
  10392. "properties": {
  10393. "audio_input_tokens": {
  10394. "type": "integer"
  10395. },
  10396. "cache_creation_tokens": {
  10397. "type": "integer"
  10398. },
  10399. "cached_tokens": {
  10400. "type": "integer"
  10401. },
  10402. "channels": {
  10403. "type": "array",
  10404. "items": {
  10405. "type": "integer"
  10406. }
  10407. },
  10408. "chart_data": {
  10409. "type": "array",
  10410. "items": {
  10411. "$ref": "#/definitions/model.ChartData"
  10412. }
  10413. },
  10414. "exception_count": {
  10415. "type": "integer"
  10416. },
  10417. "image_input_tokens": {
  10418. "type": "integer"
  10419. },
  10420. "input_tokens": {
  10421. "type": "integer"
  10422. },
  10423. "max_rpm": {
  10424. "type": "integer"
  10425. },
  10426. "max_tpm": {
  10427. "type": "integer"
  10428. },
  10429. "models": {
  10430. "type": "array",
  10431. "items": {
  10432. "type": "string"
  10433. }
  10434. },
  10435. "output_tokens": {
  10436. "type": "integer"
  10437. },
  10438. "reasoning_tokens": {
  10439. "type": "integer"
  10440. },
  10441. "request_count": {
  10442. "type": "integer"
  10443. },
  10444. "retry_count": {
  10445. "type": "integer"
  10446. },
  10447. "rpm": {
  10448. "type": "integer"
  10449. },
  10450. "status_400_count": {
  10451. "type": "integer"
  10452. },
  10453. "status_429_count": {
  10454. "type": "integer"
  10455. },
  10456. "status_4xx_count": {
  10457. "type": "integer"
  10458. },
  10459. "status_500_count": {
  10460. "type": "integer"
  10461. },
  10462. "status_5xx_count": {
  10463. "type": "integer"
  10464. },
  10465. "token_names": {
  10466. "type": "array",
  10467. "items": {
  10468. "type": "string"
  10469. }
  10470. },
  10471. "total_count": {
  10472. "description": "use Count.RequestCount instead",
  10473. "type": "integer"
  10474. },
  10475. "total_time_milliseconds": {
  10476. "type": "integer"
  10477. },
  10478. "total_tokens": {
  10479. "type": "integer"
  10480. },
  10481. "total_ttfb_milliseconds": {
  10482. "type": "integer"
  10483. },
  10484. "tpm": {
  10485. "type": "integer"
  10486. },
  10487. "used_amount": {
  10488. "type": "number"
  10489. },
  10490. "web_search_count": {
  10491. "type": "integer"
  10492. }
  10493. }
  10494. },
  10495. "model.GroupMCP": {
  10496. "type": "object",
  10497. "properties": {
  10498. "created_at": {
  10499. "type": "string"
  10500. },
  10501. "description": {
  10502. "type": "string"
  10503. },
  10504. "group_id": {
  10505. "type": "string"
  10506. },
  10507. "id": {
  10508. "type": "string"
  10509. },
  10510. "name": {
  10511. "type": "string"
  10512. },
  10513. "openapi_config": {
  10514. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  10515. },
  10516. "proxy_config": {
  10517. "$ref": "#/definitions/model.GroupMCPProxyConfig"
  10518. },
  10519. "status": {
  10520. "$ref": "#/definitions/model.GroupMCPStatus"
  10521. },
  10522. "type": {
  10523. "$ref": "#/definitions/model.GroupMCPType"
  10524. },
  10525. "update_at": {
  10526. "type": "string"
  10527. }
  10528. }
  10529. },
  10530. "model.GroupMCPProxyConfig": {
  10531. "type": "object",
  10532. "properties": {
  10533. "headers": {
  10534. "type": "object",
  10535. "additionalProperties": {
  10536. "type": "string"
  10537. }
  10538. },
  10539. "querys": {
  10540. "type": "object",
  10541. "additionalProperties": {
  10542. "type": "string"
  10543. }
  10544. },
  10545. "url": {
  10546. "type": "string"
  10547. }
  10548. }
  10549. },
  10550. "model.GroupMCPStatus": {
  10551. "type": "integer",
  10552. "enum": [
  10553. 1,
  10554. 2
  10555. ],
  10556. "x-enum-varnames": [
  10557. "GroupMCPStatusEnabled",
  10558. "GroupMCPStatusDisabled"
  10559. ]
  10560. },
  10561. "model.GroupMCPType": {
  10562. "type": "string",
  10563. "enum": [
  10564. "mcp_proxy_sse",
  10565. "mcp_proxy_streamable",
  10566. "mcp_openapi"
  10567. ],
  10568. "x-enum-varnames": [
  10569. "GroupMCPTypeProxySSE",
  10570. "GroupMCPTypeProxyStreamable",
  10571. "GroupMCPTypeOpenAPI"
  10572. ]
  10573. },
  10574. "model.GroupModelConfig": {
  10575. "type": "object",
  10576. "properties": {
  10577. "force_save_detail": {
  10578. "type": "boolean"
  10579. },
  10580. "group_id": {
  10581. "type": "string"
  10582. },
  10583. "image_prices": {
  10584. "type": "object",
  10585. "additionalProperties": {
  10586. "type": "number",
  10587. "format": "float64"
  10588. }
  10589. },
  10590. "model": {
  10591. "type": "string"
  10592. },
  10593. "override_force_save_detail": {
  10594. "type": "boolean"
  10595. },
  10596. "override_limit": {
  10597. "type": "boolean"
  10598. },
  10599. "override_price": {
  10600. "type": "boolean"
  10601. },
  10602. "override_retry_times": {
  10603. "type": "boolean"
  10604. },
  10605. "price": {
  10606. "$ref": "#/definitions/model.Price"
  10607. },
  10608. "retry_times": {
  10609. "type": "integer"
  10610. },
  10611. "rpm": {
  10612. "type": "integer"
  10613. },
  10614. "tpm": {
  10615. "type": "integer"
  10616. }
  10617. }
  10618. },
  10619. "model.ImageData": {
  10620. "type": "object",
  10621. "properties": {
  10622. "b64_json": {
  10623. "type": "string"
  10624. },
  10625. "revised_prompt": {
  10626. "type": "string"
  10627. },
  10628. "url": {
  10629. "type": "string"
  10630. }
  10631. }
  10632. },
  10633. "model.ImageInputTokensDetails": {
  10634. "type": "object",
  10635. "properties": {
  10636. "image_tokens": {
  10637. "description": "The number of image tokens in the input prompt.",
  10638. "type": "integer"
  10639. },
  10640. "text_tokens": {
  10641. "description": "The number of text tokens in the input prompt.",
  10642. "type": "integer"
  10643. }
  10644. }
  10645. },
  10646. "model.ImageRequest": {
  10647. "type": "object",
  10648. "properties": {
  10649. "background": {
  10650. "type": "string"
  10651. },
  10652. "model": {
  10653. "type": "string"
  10654. },
  10655. "moderation": {
  10656. "type": "string"
  10657. },
  10658. "n": {
  10659. "type": "integer"
  10660. },
  10661. "output_compression": {
  10662. "type": "integer"
  10663. },
  10664. "output_format": {
  10665. "description": "png, jpeg, webp",
  10666. "type": "string"
  10667. },
  10668. "prompt": {
  10669. "type": "string"
  10670. },
  10671. "quality": {
  10672. "description": "auto, high, medium, low, hd, standard",
  10673. "type": "string"
  10674. },
  10675. "response_format": {
  10676. "description": "url, b64_json",
  10677. "type": "string"
  10678. },
  10679. "size": {
  10680. "description": "1024x1024, 1536x1024, 1024x1536, auto, 256x256, 512x512, 1792x1024, 1024x1792",
  10681. "type": "string"
  10682. },
  10683. "style": {
  10684. "description": "vivid, natural",
  10685. "type": "string"
  10686. },
  10687. "user": {
  10688. "type": "string"
  10689. }
  10690. }
  10691. },
  10692. "model.ImageResponse": {
  10693. "type": "object",
  10694. "properties": {
  10695. "created": {
  10696. "type": "integer"
  10697. },
  10698. "data": {
  10699. "type": "array",
  10700. "items": {
  10701. "$ref": "#/definitions/model.ImageData"
  10702. }
  10703. },
  10704. "usage": {
  10705. "description": "For gpt-image-1 only, the token usage information for the image generation.",
  10706. "allOf": [
  10707. {
  10708. "$ref": "#/definitions/model.ImageUsage"
  10709. }
  10710. ]
  10711. }
  10712. }
  10713. },
  10714. "model.ImageUsage": {
  10715. "type": "object",
  10716. "properties": {
  10717. "input_tokens": {
  10718. "description": "The number of tokens (images and text) in the input prompt.",
  10719. "type": "integer"
  10720. },
  10721. "input_tokens_details": {
  10722. "description": "The input tokens detailed information for the image generation.",
  10723. "allOf": [
  10724. {
  10725. "$ref": "#/definitions/model.ImageInputTokensDetails"
  10726. }
  10727. ]
  10728. },
  10729. "output_tokens": {
  10730. "description": "The number of image tokens in the output image.",
  10731. "type": "integer"
  10732. },
  10733. "total_tokens": {
  10734. "description": "The total number of tokens (images and text) used for the image generation.",
  10735. "type": "integer"
  10736. }
  10737. }
  10738. },
  10739. "model.IncompleteDetails": {
  10740. "type": "object",
  10741. "properties": {
  10742. "reason": {
  10743. "type": "string"
  10744. }
  10745. }
  10746. },
  10747. "model.InputContent": {
  10748. "type": "object",
  10749. "properties": {
  10750. "text": {
  10751. "type": "string"
  10752. },
  10753. "type": {
  10754. "type": "string"
  10755. }
  10756. }
  10757. },
  10758. "model.InputItem": {
  10759. "type": "object",
  10760. "properties": {
  10761. "content": {
  10762. "type": "array",
  10763. "items": {
  10764. "$ref": "#/definitions/model.InputContent"
  10765. }
  10766. },
  10767. "id": {
  10768. "type": "string"
  10769. },
  10770. "role": {
  10771. "type": "string"
  10772. },
  10773. "type": {
  10774. "type": "string"
  10775. }
  10776. }
  10777. },
  10778. "model.InputItemList": {
  10779. "type": "object",
  10780. "properties": {
  10781. "data": {
  10782. "type": "array",
  10783. "items": {
  10784. "$ref": "#/definitions/model.InputItem"
  10785. }
  10786. },
  10787. "first_id": {
  10788. "type": "string"
  10789. },
  10790. "has_more": {
  10791. "type": "boolean"
  10792. },
  10793. "last_id": {
  10794. "type": "string"
  10795. },
  10796. "object": {
  10797. "type": "string"
  10798. }
  10799. }
  10800. },
  10801. "model.JSONSchema": {
  10802. "type": "object",
  10803. "properties": {
  10804. "description": {
  10805. "type": "string"
  10806. },
  10807. "name": {
  10808. "type": "string"
  10809. },
  10810. "schema": {
  10811. "type": "object",
  10812. "additionalProperties": {}
  10813. },
  10814. "strict": {
  10815. "type": "boolean"
  10816. }
  10817. }
  10818. },
  10819. "model.Log": {
  10820. "type": "object",
  10821. "properties": {
  10822. "channel": {
  10823. "type": "integer"
  10824. },
  10825. "code": {
  10826. "type": "integer"
  10827. },
  10828. "content": {
  10829. "type": "string"
  10830. },
  10831. "created_at": {
  10832. "type": "string"
  10833. },
  10834. "endpoint": {
  10835. "type": "string"
  10836. },
  10837. "group": {
  10838. "type": "string"
  10839. },
  10840. "id": {
  10841. "type": "integer"
  10842. },
  10843. "ip": {
  10844. "type": "string"
  10845. },
  10846. "metadata": {
  10847. "type": "object",
  10848. "additionalProperties": {
  10849. "type": "string"
  10850. }
  10851. },
  10852. "mode": {
  10853. "type": "integer"
  10854. },
  10855. "model": {
  10856. "type": "string"
  10857. },
  10858. "price": {
  10859. "$ref": "#/definitions/model.Price"
  10860. },
  10861. "request_at": {
  10862. "type": "string"
  10863. },
  10864. "request_detail": {
  10865. "$ref": "#/definitions/model.RequestDetail"
  10866. },
  10867. "request_id": {
  10868. "type": "string"
  10869. },
  10870. "retry_at": {
  10871. "type": "string"
  10872. },
  10873. "retry_times": {
  10874. "type": "integer"
  10875. },
  10876. "token_id": {
  10877. "type": "integer"
  10878. },
  10879. "token_name": {
  10880. "type": "string"
  10881. },
  10882. "ttfb_milliseconds": {
  10883. "type": "integer"
  10884. },
  10885. "usage": {
  10886. "$ref": "#/definitions/model.Usage"
  10887. },
  10888. "used_amount": {
  10889. "type": "number"
  10890. },
  10891. "user": {
  10892. "description": "https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids",
  10893. "type": "string"
  10894. }
  10895. }
  10896. },
  10897. "model.MCPEmbeddingConfig": {
  10898. "type": "object",
  10899. "properties": {
  10900. "init": {
  10901. "type": "object",
  10902. "additionalProperties": {
  10903. "type": "string"
  10904. }
  10905. },
  10906. "reusing": {
  10907. "type": "object",
  10908. "additionalProperties": {
  10909. "$ref": "#/definitions/model.ReusingParam"
  10910. }
  10911. }
  10912. }
  10913. },
  10914. "model.MCPOpenAPIConfig": {
  10915. "type": "object",
  10916. "properties": {
  10917. "authorization": {
  10918. "type": "string"
  10919. },
  10920. "openapi_content": {
  10921. "type": "string"
  10922. },
  10923. "openapi_spec": {
  10924. "type": "string"
  10925. },
  10926. "server_addr": {
  10927. "type": "string"
  10928. },
  10929. "v2": {
  10930. "type": "boolean"
  10931. }
  10932. }
  10933. },
  10934. "model.MCPPrice": {
  10935. "type": "object",
  10936. "properties": {
  10937. "default_tools_call_price": {
  10938. "type": "number"
  10939. },
  10940. "tools_call_prices": {
  10941. "type": "object",
  10942. "additionalProperties": {
  10943. "type": "number",
  10944. "format": "float64"
  10945. }
  10946. }
  10947. }
  10948. },
  10949. "model.Message": {
  10950. "type": "object",
  10951. "properties": {
  10952. "content": {},
  10953. "name": {
  10954. "type": "string"
  10955. },
  10956. "reasoning_content": {
  10957. "type": "string"
  10958. },
  10959. "role": {
  10960. "type": "string"
  10961. },
  10962. "tool_call_id": {
  10963. "type": "string"
  10964. },
  10965. "tool_calls": {
  10966. "type": "array",
  10967. "items": {
  10968. "$ref": "#/definitions/model.ToolCall"
  10969. }
  10970. }
  10971. }
  10972. },
  10973. "model.ModelConfig": {
  10974. "type": "object",
  10975. "properties": {
  10976. "config": {
  10977. "type": "object",
  10978. "additionalProperties": {}
  10979. },
  10980. "created_at": {
  10981. "type": "string"
  10982. },
  10983. "exclude_from_tests": {
  10984. "type": "boolean"
  10985. },
  10986. "force_save_detail": {
  10987. "type": "boolean"
  10988. },
  10989. "image_prices": {
  10990. "description": "map[size]price_per_image",
  10991. "type": "object",
  10992. "additionalProperties": {
  10993. "type": "number",
  10994. "format": "float64"
  10995. }
  10996. },
  10997. "image_quality_prices": {
  10998. "description": "map[size]map[quality]price_per_image",
  10999. "type": "object",
  11000. "additionalProperties": {
  11001. "type": "object",
  11002. "additionalProperties": {
  11003. "type": "number",
  11004. "format": "float64"
  11005. }
  11006. }
  11007. },
  11008. "max_error_rate": {
  11009. "type": "number"
  11010. },
  11011. "model": {
  11012. "type": "string"
  11013. },
  11014. "owner": {
  11015. "$ref": "#/definitions/model.ModelOwner"
  11016. },
  11017. "plugin": {
  11018. "type": "object",
  11019. "additionalProperties": {
  11020. "type": "array",
  11021. "items": {
  11022. "type": "integer"
  11023. }
  11024. }
  11025. },
  11026. "price": {
  11027. "$ref": "#/definitions/model.Price"
  11028. },
  11029. "retry_times": {
  11030. "type": "integer"
  11031. },
  11032. "rpm": {
  11033. "type": "integer"
  11034. },
  11035. "timeout": {
  11036. "type": "integer"
  11037. },
  11038. "tpm": {
  11039. "type": "integer"
  11040. },
  11041. "type": {
  11042. "$ref": "#/definitions/mode.Mode"
  11043. },
  11044. "updated_at": {
  11045. "type": "string"
  11046. }
  11047. }
  11048. },
  11049. "model.ModelOwner": {
  11050. "type": "string",
  11051. "enum": [
  11052. "openai",
  11053. "alibaba",
  11054. "tencent",
  11055. "xunfei",
  11056. "deepseek",
  11057. "moonshot",
  11058. "minimax",
  11059. "baidu",
  11060. "google",
  11061. "baai",
  11062. "funaudiollm",
  11063. "doubao",
  11064. "fishaudio",
  11065. "chatglm",
  11066. "stabilityai",
  11067. "netease",
  11068. "ai360",
  11069. "anthropic",
  11070. "meta",
  11071. "baichuan",
  11072. "mistral",
  11073. "openchat",
  11074. "microsoft",
  11075. "defog",
  11076. "nexusflow",
  11077. "cohere",
  11078. "huggingface",
  11079. "lingyiwanwu",
  11080. "stepfun",
  11081. "xai",
  11082. "doc2x",
  11083. "jina"
  11084. ],
  11085. "x-enum-varnames": [
  11086. "ModelOwnerOpenAI",
  11087. "ModelOwnerAlibaba",
  11088. "ModelOwnerTencent",
  11089. "ModelOwnerXunfei",
  11090. "ModelOwnerDeepSeek",
  11091. "ModelOwnerMoonshot",
  11092. "ModelOwnerMiniMax",
  11093. "ModelOwnerBaidu",
  11094. "ModelOwnerGoogle",
  11095. "ModelOwnerBAAI",
  11096. "ModelOwnerFunAudioLLM",
  11097. "ModelOwnerDoubao",
  11098. "ModelOwnerFishAudio",
  11099. "ModelOwnerChatGLM",
  11100. "ModelOwnerStabilityAI",
  11101. "ModelOwnerNetease",
  11102. "ModelOwnerAI360",
  11103. "ModelOwnerAnthropic",
  11104. "ModelOwnerMeta",
  11105. "ModelOwnerBaichuan",
  11106. "ModelOwnerMistral",
  11107. "ModelOwnerOpenChat",
  11108. "ModelOwnerMicrosoft",
  11109. "ModelOwnerDefog",
  11110. "ModelOwnerNexusFlow",
  11111. "ModelOwnerCohere",
  11112. "ModelOwnerHuggingFace",
  11113. "ModelOwnerLingyiWanwu",
  11114. "ModelOwnerStepFun",
  11115. "ModelOwnerXAI",
  11116. "ModelOwnerDoc2x",
  11117. "ModelOwnerJina"
  11118. ]
  11119. },
  11120. "model.Option": {
  11121. "type": "object",
  11122. "properties": {
  11123. "key": {
  11124. "type": "string"
  11125. },
  11126. "value": {
  11127. "type": "string"
  11128. }
  11129. }
  11130. },
  11131. "model.OutputContent": {
  11132. "type": "object",
  11133. "properties": {
  11134. "annotations": {
  11135. "type": "array",
  11136. "items": {}
  11137. },
  11138. "text": {
  11139. "type": "string"
  11140. },
  11141. "type": {
  11142. "type": "string"
  11143. }
  11144. }
  11145. },
  11146. "model.OutputItem": {
  11147. "type": "object",
  11148. "properties": {
  11149. "content": {
  11150. "type": "array",
  11151. "items": {
  11152. "$ref": "#/definitions/model.OutputContent"
  11153. }
  11154. },
  11155. "id": {
  11156. "type": "string"
  11157. },
  11158. "role": {
  11159. "type": "string"
  11160. },
  11161. "status": {
  11162. "$ref": "#/definitions/model.ResponseStatus"
  11163. },
  11164. "type": {
  11165. "type": "string"
  11166. }
  11167. }
  11168. },
  11169. "model.Params": {
  11170. "type": "object",
  11171. "additionalProperties": {
  11172. "type": "string"
  11173. }
  11174. },
  11175. "model.ParsePdfResponse": {
  11176. "type": "object",
  11177. "properties": {
  11178. "markdown": {
  11179. "type": "string"
  11180. },
  11181. "pages": {
  11182. "type": "integer"
  11183. }
  11184. }
  11185. },
  11186. "model.Price": {
  11187. "type": "object",
  11188. "properties": {
  11189. "audio_input_price": {
  11190. "type": "number"
  11191. },
  11192. "audio_input_price_unit": {
  11193. "type": "integer"
  11194. },
  11195. "cache_creation_price": {
  11196. "type": "number"
  11197. },
  11198. "cache_creation_price_unit": {
  11199. "type": "integer"
  11200. },
  11201. "cached_price": {
  11202. "type": "number"
  11203. },
  11204. "cached_price_unit": {
  11205. "type": "integer"
  11206. },
  11207. "conditional_prices": {
  11208. "type": "array",
  11209. "items": {
  11210. "$ref": "#/definitions/model.ConditionalPrice"
  11211. }
  11212. },
  11213. "image_input_price": {
  11214. "type": "number"
  11215. },
  11216. "image_input_price_unit": {
  11217. "type": "integer"
  11218. },
  11219. "input_price": {
  11220. "type": "number"
  11221. },
  11222. "input_price_unit": {
  11223. "type": "integer"
  11224. },
  11225. "output_price": {
  11226. "type": "number"
  11227. },
  11228. "output_price_unit": {
  11229. "type": "integer"
  11230. },
  11231. "per_request_price": {
  11232. "type": "number"
  11233. },
  11234. "thinking_mode_output_price": {
  11235. "description": "when ThinkingModeOutputPrice and ReasoningTokens are not 0, OutputPrice and OutputPriceUnit\nwill be overwritten",
  11236. "type": "number"
  11237. },
  11238. "thinking_mode_output_price_unit": {
  11239. "type": "integer"
  11240. },
  11241. "web_search_price": {
  11242. "type": "number"
  11243. },
  11244. "web_search_price_unit": {
  11245. "type": "integer"
  11246. }
  11247. }
  11248. },
  11249. "model.PriceCondition": {
  11250. "type": "object",
  11251. "properties": {
  11252. "input_token_max": {
  11253. "type": "integer"
  11254. },
  11255. "input_token_min": {
  11256. "type": "integer"
  11257. },
  11258. "output_token_max": {
  11259. "type": "integer"
  11260. },
  11261. "output_token_min": {
  11262. "type": "integer"
  11263. }
  11264. }
  11265. },
  11266. "model.PromptTokensDetails": {
  11267. "type": "object",
  11268. "properties": {
  11269. "audio_tokens": {
  11270. "type": "integer"
  11271. },
  11272. "cache_creation_tokens": {
  11273. "type": "integer"
  11274. },
  11275. "cached_tokens": {
  11276. "type": "integer"
  11277. }
  11278. }
  11279. },
  11280. "model.ProxyParamType": {
  11281. "type": "string",
  11282. "enum": [
  11283. "url",
  11284. "header",
  11285. "query"
  11286. ],
  11287. "x-enum-varnames": [
  11288. "ParamTypeURL",
  11289. "ParamTypeHeader",
  11290. "ParamTypeQuery"
  11291. ]
  11292. },
  11293. "model.PublicMCP": {
  11294. "type": "object",
  11295. "properties": {
  11296. "created_at": {
  11297. "type": "string"
  11298. },
  11299. "description": {
  11300. "type": "string"
  11301. },
  11302. "description_cn": {
  11303. "type": "string"
  11304. },
  11305. "embed_config": {
  11306. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  11307. },
  11308. "github_url": {
  11309. "type": "string"
  11310. },
  11311. "id": {
  11312. "type": "string"
  11313. },
  11314. "logo_url": {
  11315. "type": "string"
  11316. },
  11317. "name": {
  11318. "type": "string"
  11319. },
  11320. "name_cn": {
  11321. "type": "string"
  11322. },
  11323. "openapi_config": {
  11324. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  11325. },
  11326. "price": {
  11327. "$ref": "#/definitions/model.MCPPrice"
  11328. },
  11329. "proxy_config": {
  11330. "$ref": "#/definitions/model.PublicMCPProxyConfig"
  11331. },
  11332. "readme": {
  11333. "type": "string"
  11334. },
  11335. "readme_cn": {
  11336. "type": "string"
  11337. },
  11338. "readme_cn_url": {
  11339. "type": "string"
  11340. },
  11341. "readme_url": {
  11342. "type": "string"
  11343. },
  11344. "status": {
  11345. "$ref": "#/definitions/model.PublicMCPStatus"
  11346. },
  11347. "tags": {
  11348. "type": "array",
  11349. "items": {
  11350. "type": "string"
  11351. }
  11352. },
  11353. "test_config": {
  11354. "description": "only used by list tools",
  11355. "allOf": [
  11356. {
  11357. "$ref": "#/definitions/model.TestConfig"
  11358. }
  11359. ]
  11360. },
  11361. "type": {
  11362. "$ref": "#/definitions/model.PublicMCPType"
  11363. },
  11364. "update_at": {
  11365. "type": "string"
  11366. }
  11367. }
  11368. },
  11369. "model.PublicMCPProxyConfig": {
  11370. "type": "object",
  11371. "properties": {
  11372. "headers": {
  11373. "type": "object",
  11374. "additionalProperties": {
  11375. "type": "string"
  11376. }
  11377. },
  11378. "querys": {
  11379. "type": "object",
  11380. "additionalProperties": {
  11381. "type": "string"
  11382. }
  11383. },
  11384. "reusing": {
  11385. "type": "object",
  11386. "additionalProperties": {
  11387. "$ref": "#/definitions/model.PublicMCPProxyReusingParam"
  11388. }
  11389. },
  11390. "url": {
  11391. "type": "string"
  11392. }
  11393. }
  11394. },
  11395. "model.PublicMCPProxyReusingParam": {
  11396. "type": "object",
  11397. "properties": {
  11398. "description": {
  11399. "type": "string"
  11400. },
  11401. "name": {
  11402. "type": "string"
  11403. },
  11404. "required": {
  11405. "type": "boolean"
  11406. },
  11407. "type": {
  11408. "$ref": "#/definitions/model.ProxyParamType"
  11409. }
  11410. }
  11411. },
  11412. "model.PublicMCPReusingParam": {
  11413. "type": "object",
  11414. "properties": {
  11415. "created_at": {
  11416. "type": "string"
  11417. },
  11418. "group_id": {
  11419. "type": "string"
  11420. },
  11421. "mcp_id": {
  11422. "type": "string"
  11423. },
  11424. "params": {
  11425. "$ref": "#/definitions/model.Params"
  11426. },
  11427. "update_at": {
  11428. "type": "string"
  11429. }
  11430. }
  11431. },
  11432. "model.PublicMCPStatus": {
  11433. "type": "integer",
  11434. "enum": [
  11435. 1,
  11436. 2
  11437. ],
  11438. "x-enum-varnames": [
  11439. "PublicMCPStatusEnabled",
  11440. "PublicMCPStatusDisabled"
  11441. ]
  11442. },
  11443. "model.PublicMCPType": {
  11444. "type": "string",
  11445. "enum": [
  11446. "mcp_proxy_sse",
  11447. "mcp_proxy_streamable",
  11448. "mcp_docs",
  11449. "mcp_openapi",
  11450. "mcp_embed"
  11451. ],
  11452. "x-enum-comments": {
  11453. "PublicMCPTypeDocs": "read only"
  11454. },
  11455. "x-enum-descriptions": [
  11456. "",
  11457. "",
  11458. "read only",
  11459. "",
  11460. ""
  11461. ],
  11462. "x-enum-varnames": [
  11463. "PublicMCPTypeProxySSE",
  11464. "PublicMCPTypeProxyStreamable",
  11465. "PublicMCPTypeDocs",
  11466. "PublicMCPTypeOpenAPI",
  11467. "PublicMCPTypeEmbed"
  11468. ]
  11469. },
  11470. "model.RequestDetail": {
  11471. "type": "object",
  11472. "properties": {
  11473. "id": {
  11474. "type": "integer"
  11475. },
  11476. "log_id": {
  11477. "type": "integer"
  11478. },
  11479. "request_body": {
  11480. "type": "string"
  11481. },
  11482. "request_body_truncated": {
  11483. "type": "boolean"
  11484. },
  11485. "response_body": {
  11486. "type": "string"
  11487. },
  11488. "response_body_truncated": {
  11489. "type": "boolean"
  11490. }
  11491. }
  11492. },
  11493. "model.RerankMeta": {
  11494. "type": "object",
  11495. "properties": {
  11496. "model": {
  11497. "type": "string"
  11498. },
  11499. "tokens": {
  11500. "$ref": "#/definitions/model.RerankMetaTokens"
  11501. }
  11502. }
  11503. },
  11504. "model.RerankMetaTokens": {
  11505. "type": "object",
  11506. "properties": {
  11507. "input_tokens": {
  11508. "type": "integer"
  11509. },
  11510. "output_tokens": {
  11511. "type": "integer"
  11512. }
  11513. }
  11514. },
  11515. "model.RerankRequest": {
  11516. "type": "object",
  11517. "properties": {
  11518. "documents": {
  11519. "type": "array",
  11520. "items": {
  11521. "type": "string"
  11522. }
  11523. },
  11524. "max_chunks_per_doc": {
  11525. "type": "integer"
  11526. },
  11527. "model": {
  11528. "type": "string"
  11529. },
  11530. "overlap_tokens": {
  11531. "type": "integer"
  11532. },
  11533. "query": {
  11534. "type": "string"
  11535. },
  11536. "return_documents": {
  11537. "type": "boolean"
  11538. },
  11539. "top_n": {
  11540. "type": "integer"
  11541. }
  11542. }
  11543. },
  11544. "model.RerankResponse": {
  11545. "type": "object",
  11546. "properties": {
  11547. "id": {
  11548. "type": "string"
  11549. },
  11550. "meta": {
  11551. "$ref": "#/definitions/model.RerankMeta"
  11552. },
  11553. "results": {
  11554. "type": "array",
  11555. "items": {
  11556. "$ref": "#/definitions/model.RerankResult"
  11557. }
  11558. }
  11559. }
  11560. },
  11561. "model.RerankResult": {
  11562. "type": "object",
  11563. "properties": {
  11564. "document": {
  11565. "$ref": "#/definitions/model.Document"
  11566. },
  11567. "index": {
  11568. "type": "integer"
  11569. },
  11570. "relevance_score": {
  11571. "type": "number"
  11572. }
  11573. }
  11574. },
  11575. "model.Response": {
  11576. "type": "object",
  11577. "properties": {
  11578. "created_at": {
  11579. "type": "integer"
  11580. },
  11581. "error": {
  11582. "$ref": "#/definitions/model.ResponseError"
  11583. },
  11584. "id": {
  11585. "type": "string"
  11586. },
  11587. "incomplete_details": {
  11588. "$ref": "#/definitions/model.IncompleteDetails"
  11589. },
  11590. "instructions": {
  11591. "type": "string"
  11592. },
  11593. "max_output_tokens": {
  11594. "type": "integer"
  11595. },
  11596. "metadata": {
  11597. "type": "object",
  11598. "additionalProperties": {}
  11599. },
  11600. "model": {
  11601. "type": "string"
  11602. },
  11603. "object": {
  11604. "type": "string"
  11605. },
  11606. "output": {
  11607. "type": "array",
  11608. "items": {
  11609. "$ref": "#/definitions/model.OutputItem"
  11610. }
  11611. },
  11612. "parallel_tool_calls": {
  11613. "type": "boolean"
  11614. },
  11615. "previous_response_id": {
  11616. "type": "string"
  11617. },
  11618. "reasoning": {
  11619. "$ref": "#/definitions/model.ResponseReasoning"
  11620. },
  11621. "status": {
  11622. "$ref": "#/definitions/model.ResponseStatus"
  11623. },
  11624. "store": {
  11625. "type": "boolean"
  11626. },
  11627. "temperature": {
  11628. "type": "number"
  11629. },
  11630. "text": {
  11631. "$ref": "#/definitions/model.ResponseText"
  11632. },
  11633. "tool_choice": {},
  11634. "tools": {
  11635. "type": "array",
  11636. "items": {
  11637. "$ref": "#/definitions/model.Tool"
  11638. }
  11639. },
  11640. "top_p": {
  11641. "type": "number"
  11642. },
  11643. "truncation": {
  11644. "type": "string"
  11645. },
  11646. "usage": {
  11647. "$ref": "#/definitions/model.ResponseUsage"
  11648. },
  11649. "user": {
  11650. "type": "string"
  11651. }
  11652. }
  11653. },
  11654. "model.ResponseError": {
  11655. "type": "object",
  11656. "properties": {
  11657. "code": {
  11658. "type": "string"
  11659. },
  11660. "message": {
  11661. "type": "string"
  11662. }
  11663. }
  11664. },
  11665. "model.ResponseFormat": {
  11666. "type": "object",
  11667. "properties": {
  11668. "json_schema": {
  11669. "$ref": "#/definitions/model.JSONSchema"
  11670. },
  11671. "type": {
  11672. "type": "string"
  11673. }
  11674. }
  11675. },
  11676. "model.ResponseReasoning": {
  11677. "type": "object",
  11678. "properties": {
  11679. "effort": {
  11680. "type": "string"
  11681. },
  11682. "summary": {
  11683. "type": "string"
  11684. }
  11685. }
  11686. },
  11687. "model.ResponseStatus": {
  11688. "type": "string",
  11689. "enum": [
  11690. "in_progress",
  11691. "completed",
  11692. "failed",
  11693. "incomplete",
  11694. "cancelled"
  11695. ],
  11696. "x-enum-varnames": [
  11697. "ResponseStatusInProgress",
  11698. "ResponseStatusCompleted",
  11699. "ResponseStatusFailed",
  11700. "ResponseStatusIncomplete",
  11701. "ResponseStatusCancelled"
  11702. ]
  11703. },
  11704. "model.ResponseText": {
  11705. "type": "object",
  11706. "properties": {
  11707. "format": {
  11708. "$ref": "#/definitions/model.ResponseTextFormat"
  11709. }
  11710. }
  11711. },
  11712. "model.ResponseTextFormat": {
  11713. "type": "object",
  11714. "properties": {
  11715. "type": {
  11716. "type": "string"
  11717. }
  11718. }
  11719. },
  11720. "model.ResponseUsage": {
  11721. "type": "object",
  11722. "properties": {
  11723. "input_tokens": {
  11724. "type": "integer"
  11725. },
  11726. "input_tokens_details": {
  11727. "$ref": "#/definitions/model.ResponseUsageDetails"
  11728. },
  11729. "output_tokens": {
  11730. "type": "integer"
  11731. },
  11732. "output_tokens_details": {
  11733. "$ref": "#/definitions/model.ResponseUsageDetails"
  11734. },
  11735. "total_tokens": {
  11736. "type": "integer"
  11737. }
  11738. }
  11739. },
  11740. "model.ResponseUsageDetails": {
  11741. "type": "object",
  11742. "properties": {
  11743. "cached_tokens": {
  11744. "type": "integer"
  11745. },
  11746. "reasoning_tokens": {
  11747. "type": "integer"
  11748. }
  11749. }
  11750. },
  11751. "model.ReusingParam": {
  11752. "type": "object",
  11753. "properties": {
  11754. "description": {
  11755. "type": "string"
  11756. },
  11757. "name": {
  11758. "type": "string"
  11759. },
  11760. "required": {
  11761. "type": "boolean"
  11762. }
  11763. }
  11764. },
  11765. "model.StreamOptions": {
  11766. "type": "object",
  11767. "properties": {
  11768. "include_usage": {
  11769. "type": "boolean"
  11770. }
  11771. }
  11772. },
  11773. "model.SttJSONResponse": {
  11774. "type": "object",
  11775. "properties": {
  11776. "text": {
  11777. "type": "string"
  11778. }
  11779. }
  11780. },
  11781. "model.SummaryDataV2": {
  11782. "type": "object",
  11783. "properties": {
  11784. "audio_input_tokens": {
  11785. "type": "integer"
  11786. },
  11787. "cache_creation_tokens": {
  11788. "type": "integer"
  11789. },
  11790. "cached_tokens": {
  11791. "type": "integer"
  11792. },
  11793. "channel_id": {
  11794. "type": "integer"
  11795. },
  11796. "exception_count": {
  11797. "type": "integer"
  11798. },
  11799. "group_id": {
  11800. "type": "string"
  11801. },
  11802. "image_input_tokens": {
  11803. "type": "integer"
  11804. },
  11805. "input_tokens": {
  11806. "type": "integer"
  11807. },
  11808. "max_rpm": {
  11809. "type": "integer"
  11810. },
  11811. "max_tpm": {
  11812. "type": "integer"
  11813. },
  11814. "model": {
  11815. "type": "string"
  11816. },
  11817. "output_tokens": {
  11818. "type": "integer"
  11819. },
  11820. "reasoning_tokens": {
  11821. "type": "integer"
  11822. },
  11823. "request_count": {
  11824. "type": "integer"
  11825. },
  11826. "retry_count": {
  11827. "type": "integer"
  11828. },
  11829. "status_400_count": {
  11830. "type": "integer"
  11831. },
  11832. "status_429_count": {
  11833. "type": "integer"
  11834. },
  11835. "status_4xx_count": {
  11836. "type": "integer"
  11837. },
  11838. "status_500_count": {
  11839. "type": "integer"
  11840. },
  11841. "status_5xx_count": {
  11842. "type": "integer"
  11843. },
  11844. "timestamp": {
  11845. "type": "integer"
  11846. },
  11847. "token_name": {
  11848. "type": "string"
  11849. },
  11850. "total_time_milliseconds": {
  11851. "type": "integer"
  11852. },
  11853. "total_tokens": {
  11854. "type": "integer"
  11855. },
  11856. "total_ttfb_milliseconds": {
  11857. "type": "integer"
  11858. },
  11859. "used_amount": {
  11860. "type": "number"
  11861. },
  11862. "web_search_count": {
  11863. "type": "integer"
  11864. }
  11865. }
  11866. },
  11867. "model.TestConfig": {
  11868. "type": "object",
  11869. "properties": {
  11870. "enabled": {
  11871. "type": "boolean"
  11872. },
  11873. "params": {
  11874. "$ref": "#/definitions/model.Params"
  11875. }
  11876. }
  11877. },
  11878. "model.TextResponse": {
  11879. "type": "object",
  11880. "properties": {
  11881. "choices": {
  11882. "type": "array",
  11883. "items": {
  11884. "$ref": "#/definitions/model.TextResponseChoice"
  11885. }
  11886. },
  11887. "created": {
  11888. "type": "integer"
  11889. },
  11890. "id": {
  11891. "type": "string"
  11892. },
  11893. "model": {
  11894. "type": "string"
  11895. },
  11896. "object": {
  11897. "type": "string"
  11898. },
  11899. "usage": {
  11900. "$ref": "#/definitions/model.ChatUsage"
  11901. }
  11902. }
  11903. },
  11904. "model.TextResponseChoice": {
  11905. "type": "object",
  11906. "properties": {
  11907. "finish_reason": {
  11908. "$ref": "#/definitions/model.FinishReason"
  11909. },
  11910. "index": {
  11911. "type": "integer"
  11912. },
  11913. "message": {
  11914. "$ref": "#/definitions/model.Message"
  11915. },
  11916. "text": {
  11917. "type": "string"
  11918. }
  11919. }
  11920. },
  11921. "model.TextToSpeechRequest": {
  11922. "type": "object",
  11923. "required": [
  11924. "input",
  11925. "model",
  11926. "voice"
  11927. ],
  11928. "properties": {
  11929. "input": {
  11930. "type": "string"
  11931. },
  11932. "model": {
  11933. "type": "string"
  11934. },
  11935. "response_format": {
  11936. "type": "string"
  11937. },
  11938. "speed": {
  11939. "type": "number"
  11940. },
  11941. "stream_format": {
  11942. "type": "string"
  11943. },
  11944. "voice": {
  11945. "type": "string"
  11946. }
  11947. }
  11948. },
  11949. "model.TimeSummaryDataV2": {
  11950. "type": "object",
  11951. "properties": {
  11952. "summary": {
  11953. "type": "array",
  11954. "items": {
  11955. "$ref": "#/definitions/model.SummaryDataV2"
  11956. }
  11957. },
  11958. "timestamp": {
  11959. "type": "integer"
  11960. }
  11961. }
  11962. },
  11963. "model.Tool": {
  11964. "type": "object",
  11965. "properties": {
  11966. "function": {
  11967. "$ref": "#/definitions/model.Function"
  11968. },
  11969. "type": {
  11970. "type": "string"
  11971. }
  11972. }
  11973. },
  11974. "model.ToolCall": {
  11975. "type": "object",
  11976. "properties": {
  11977. "function": {
  11978. "$ref": "#/definitions/model.Function"
  11979. },
  11980. "id": {
  11981. "type": "string"
  11982. },
  11983. "index": {
  11984. "type": "integer"
  11985. },
  11986. "type": {
  11987. "type": "string"
  11988. }
  11989. }
  11990. },
  11991. "model.Usage": {
  11992. "type": "object",
  11993. "properties": {
  11994. "audio_input_tokens": {
  11995. "type": "integer"
  11996. },
  11997. "cache_creation_tokens": {
  11998. "type": "integer"
  11999. },
  12000. "cached_tokens": {
  12001. "type": "integer"
  12002. },
  12003. "image_input_tokens": {
  12004. "type": "integer"
  12005. },
  12006. "input_tokens": {
  12007. "type": "integer"
  12008. },
  12009. "output_tokens": {
  12010. "type": "integer"
  12011. },
  12012. "reasoning_tokens": {
  12013. "type": "integer"
  12014. },
  12015. "total_tokens": {
  12016. "type": "integer"
  12017. },
  12018. "web_search_count": {
  12019. "type": "integer"
  12020. }
  12021. }
  12022. },
  12023. "model.VideoGenerationJob": {
  12024. "type": "object",
  12025. "properties": {
  12026. "created_at": {
  12027. "type": "integer"
  12028. },
  12029. "expires_at": {
  12030. "type": "integer"
  12031. },
  12032. "finish_reason": {
  12033. "type": "string"
  12034. },
  12035. "finished_at": {
  12036. "type": "integer"
  12037. },
  12038. "generations": {
  12039. "type": "array",
  12040. "items": {
  12041. "$ref": "#/definitions/model.VideoGenerations"
  12042. }
  12043. },
  12044. "height": {
  12045. "type": "integer"
  12046. },
  12047. "id": {
  12048. "type": "string"
  12049. },
  12050. "model": {
  12051. "type": "string"
  12052. },
  12053. "n_seconds": {
  12054. "type": "integer"
  12055. },
  12056. "n_variants": {
  12057. "type": "integer"
  12058. },
  12059. "object": {
  12060. "type": "string"
  12061. },
  12062. "prompt": {
  12063. "type": "string"
  12064. },
  12065. "status": {
  12066. "$ref": "#/definitions/model.VideoGenerationJobStatus"
  12067. },
  12068. "width": {
  12069. "type": "integer"
  12070. }
  12071. }
  12072. },
  12073. "model.VideoGenerationJobRequest": {
  12074. "type": "object",
  12075. "properties": {
  12076. "height": {
  12077. "type": "integer"
  12078. },
  12079. "model": {
  12080. "type": "string"
  12081. },
  12082. "n_seconds": {
  12083. "type": "integer"
  12084. },
  12085. "n_variants": {
  12086. "type": "integer"
  12087. },
  12088. "prompt": {
  12089. "type": "string"
  12090. },
  12091. "width": {
  12092. "type": "integer"
  12093. }
  12094. }
  12095. },
  12096. "model.VideoGenerationJobStatus": {
  12097. "type": "string",
  12098. "enum": [
  12099. "queued",
  12100. "processing",
  12101. "running",
  12102. "succeeded"
  12103. ],
  12104. "x-enum-varnames": [
  12105. "VideoGenerationJobStatusQueued",
  12106. "VideoGenerationJobStatusProcessing",
  12107. "VideoGenerationJobStatusRunning",
  12108. "VideoGenerationJobStatusSucceeded"
  12109. ]
  12110. },
  12111. "model.VideoGenerations": {
  12112. "type": "object",
  12113. "properties": {
  12114. "created_at": {
  12115. "type": "integer"
  12116. },
  12117. "height": {
  12118. "type": "integer"
  12119. },
  12120. "id": {
  12121. "type": "string"
  12122. },
  12123. "job_id": {
  12124. "type": "string"
  12125. },
  12126. "n_seconds": {
  12127. "type": "integer"
  12128. },
  12129. "object": {
  12130. "type": "string"
  12131. },
  12132. "prompt": {
  12133. "type": "string"
  12134. },
  12135. "width": {
  12136. "type": "integer"
  12137. }
  12138. }
  12139. },
  12140. "openai.SubscriptionResponse": {
  12141. "type": "object",
  12142. "properties": {
  12143. "access_until": {
  12144. "type": "integer"
  12145. },
  12146. "hard_limit_usd": {
  12147. "type": "number"
  12148. },
  12149. "has_payment_method": {
  12150. "type": "boolean"
  12151. },
  12152. "object": {
  12153. "type": "string"
  12154. },
  12155. "soft_limit_usd": {
  12156. "type": "number"
  12157. },
  12158. "system_hard_limit_usd": {
  12159. "type": "number"
  12160. }
  12161. }
  12162. },
  12163. "openai.UsageResponse": {
  12164. "type": "object",
  12165. "properties": {
  12166. "object": {
  12167. "type": "string"
  12168. },
  12169. "total_usage": {
  12170. "description": "DailyCosts []OpenAIUsageDailyCost ` + "`" + `json:\"daily_costs\"` + "`" + `",
  12171. "type": "number"
  12172. }
  12173. }
  12174. }
  12175. },
  12176. "securityDefinitions": {
  12177. "ApiKeyAuth": {
  12178. "type": "apiKey",
  12179. "name": "Authorization",
  12180. "in": "header"
  12181. }
  12182. }
  12183. }`
  12184. // SwaggerInfo holds exported Swagger Info so clients can modify it
  12185. var SwaggerInfo = &swag.Spec{
  12186. Version: "1.0",
  12187. Host: "",
  12188. BasePath: "",
  12189. Schemes: []string{},
  12190. Title: "AI Proxy Swagger API",
  12191. Description: "",
  12192. InfoInstanceName: "swagger",
  12193. SwaggerTemplate: docTemplate,
  12194. LeftDelim: "{{",
  12195. RightDelim: "}}",
  12196. }
  12197. func init() {
  12198. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  12199. }