docs.go 377 KB

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