swagger.json 376 KB

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