docs.go 383 KB

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