docs.go 370 KB

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