docs.go 396 KB

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