Skip to main content

Embed

This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents. To learn more about embeddings, see here.

Usage#

curl --location --request POST 'https://api.cohere.ai/{model}/embed' \
--header 'Authorization: BEARER {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{
"texts": [{texts}]
}'

Sample Response#

{
"embeddings":[
[1.2872775,-0.21995986,-0.75568336,-1.6177926,-1.6809494,-0.23657027,0.57613766,0.11195055,1.195615,-0.74924934,0.98328674,-0.9943332,-0.099883094,0.4033572,0.17916778,-2.1689208,0.7023862,1.3350685,-1.2388109,0.5968321,2.2065802,0.045549236,-1.1664792,-1.0000416,-1.1349005,0.45134586,-0.95438355,-0.87525976,-2.2115796,0.5149078,1.5924885,0.9206012,1.0767705,0.7703879,-0.2144709,-0.90926784,-0.3051581,0.17932855,-0.9309519,-2.2167735,-0.086879306,1.0246621,-0.21188152,-1.5202162,1.3164939,-1.3616266,0.79299295,-0.5824965,-0.5927407,-1.4639233,-0.38048184,0.65665746,-1.7563776,1.1463287,1.1204059,-0.3185141,-0.63259375,1.3907279,-0.3268506,-0.207613,0.8899546,-0.07427408,0.54649925,-0.4071441,-0.24767914,-0.10795687,-0.3615996,0.36663333,-0.13173488,0.19833492,1.0918279,-0.25380298,0.58541214,-0.74822414,-0.7364877,0.3435367,0.96531415,-3.472297,-1.4132843,0.4568786,-0.4759302,-0.6531753,0.24721935,0.7323044,-2.0044408,-2.1408138,-1.0387964,3.2545636,-2.3550057,-0.20725478,0.45917118,0.54716355,-1.7612412,-1.2646183,-0.96513313,-2.047284,1.0392547,0.73122,-0.005590845,-0.9987074,-1.281156,0.17315045,0.71824104,-2.1559372,2.7467446,1.4307523,0.6880793,2.7773573,-0.9491819,0.45992833,0.49732086,3.964705,1.4624952,-0.9747246,-0.7106686,0.73515683,-2.1106734,-0.27518278,-1.8664304,0.09177457,-0.5853742,2.2962182,-0.44728398,0.46655196,1.7306511,-0.6112423,-3.8205013,3.0484924,-1.7969505,0.42447448,1.8821063,0.73311406,-0.33652586,-0.12320638,-0.37689307,0.37506247,2.7968223,-1.8523463,1.1951554,-0.18438351,1.3863616,-0.00026191026,-0.035288423,1.3594358,-2.1946342,0.10412076,-0.35403734,0.012690499,-1.3080236,-2.4633963,1.314045,2.0129075,0.5766191,1.5551444,-1.0017867,-1.0334259,1.8303887,2.2184443,-0.3474279,-0.31614387,1.2856389,0.11697054,-2.1623828,0.27325717,-2.1861627,0.1371462,0.20625587,-0.10096106,-0.21564072,-0.0408253,-1.4573636,-1.1900529,-0.60911304,-1.5524361,1.6406788,-1.5024067,-1.8475732,-0.35258824,0.91884476,1.0246044,1.2595369,1.5297859,1.7495648,-1.0265977,-0.7479866,0.29562178,-1.0308912,0.12779889,-0.42264605,-0.30890816,-0.5211064,-1.1649269,-0.91217625,-0.94047004,-0.22128274,0.37540886,-0.7058077,-0.11014341,-2.5774348,1.1189905,-1.167958,0.7735093,-0.069416046,-2.7638597,0.17462683,-0.07713395,0.19148746,-0.93473583,0.6217357,0.2872132,0.3969062,0.50000197,0.84690356,0.018630411,0.8976025,-0.872014,-0.67716146,-0.59274983,0.6460773,-0.51674557,0.20431945,1.6893975,2.267362,0.93909824,0.20747,-0.19629255,0.9254784,0.88584125,0.22786842,-0.13812211,1.7197338,1.8128273,0.07870337,0.19885953,-1.1679116,-0.6700828,0.45064554,0.041481376,-0.5652879,1.3774394,-1.4652522,-0.68904644,-1.8769364,0.3977441,0.26686046,0.17934816,-1.4226091,0.019540586,0.22740291,0.90041053,-0.6425436,0.17831403,0.3671075,-2.1177757,-0.9174192,-3.3585835,0.61948454,0.44272268,-1.1413991,0.6895903,-1.3756769,-0.9553435,-1.3060011,1.6650664,-0.29781845,-0.42291516,1.7761991,1.378355,2.2906933,0.2496573,2.435312,0.24308547,-1.8985586,-0.30345473,0.35940522,0.6691062,-0.7682505,4.082838,0.5507741,1.6243782,1.8057342,1.6147985,-1.7850083,-1.1148152,0.45080757,-2.1259487,-0.5875899,-0.08266975,1.7734183,-1.1764784,-0.61957085,-0.8142449,-0.18765466,-0.7848642,0.45648676,-0.77246433,-0.449918,-0.15659413,0.6440882,1.2356111,-1.6677829,2.864164,-0.1952228,-1.4950367,1.5344142,-0.70509726,0.0054566637,0.06557991,0.19171976,-2.5802107,-1.0615822,0.049778394,-0.71434844,0.98920536,0.38636127,-1.6818585,-0.8651153,0.103329934,1.0240843,-0.6625408,0.3677741,0.73919296,-1.1497867,-1.230461,0.35172376,-0.6655025,-1.0162541,0.88862836,1.4666804,-0.6488521,-1.0249202,0.3007873,1.3019875,0.08671403,0.8775791,1.5358934,-1.3893038,-3.9286397,0.34000054,-1.6287713,0.10638921,-1.595564,-2.0970078,-0.69565594,0.15505916,0.6863818,1.6296506,0.78653085,-0.09904973,-2.139895,-1.1065335,-0.2698847,0.5891297,-0.029813051,1.3004799,0.6512887,-0.3945145,-0.012866467,-4.6211224,-0.76886433,0.6064209,1.6735384,0.63025117,-0.083808176,1.6738777,0.7401427,-1.6126891,0.4143479,-0.42467725,-0.28835943,0.6877598,-1.2275479,0.97556543,-1.8408741,0.36469457,-2.1210458,0.9260177,-1.0832888,-0.3450563,-1.0398133,-1.1174471,0.10499336,2.2639906,1.63718,-2.3493102,-0.7536708,-0.6392883,0.7482142,-1.7857102,2.0142045,-0.8782706,0.20063013,-1.6072458,0.4480431,-1.9355819,-2.5583138,-0.32284284,-1.734148,1.6976998,-1.2586669,1.3178242,0.10807459,0.35536736,2.2691565,0.35632047,1.2578282,0.4221057,0.2684919,0.5410639,-0.6832549,-1.0554035,-0.98447096,1.6208924,0.29316765,-0.7603875,0.36683157,-2.0366704,1.7478434,-1.0650918,0.6701587,-0.13622995,0.76165694,0.0016327798,-1.2333037,-0.32296872,1.6820656,-1.5529152,-0.53522396,0.10779811,1.4510596,-1.3353578,0.922625,-1.8455904,0.24000409,2.378017,0.7492754,-0.36519712,-0.065788865,-2.525391,0.34455213,-1.1170539,1.0396707,-0.9709403,-1.4774475,-0.5351524,0.21027175,2.7248836,-0.68949807,-1.231648,1.2952963,0.29832897,-0.2762692,-1.5274678,-0.05824668,-2.3433523,-2.408275,-0.1884794,-0.69998777,-0.21828763,0.5726756,1.1200215,-1.1242158,0.7634123,-2.8698192,-0.423413,0.98649263,0.08663355,-1.0623844,0.5862608,1.7342649,-1.4570942,1.6370302,1.2224392,1.1281861,-1.3593972,-0.47248158,0.5293284,0.4808992,1.1631849,-2.1183176,-2.219265,0.6030213,0.26943794,0.08971575,0.85851544,1.4162629,-2.6531,0.09855762,0.18219738,-0.6515808,1.0810095,0.030547474,1.6331837,0.8576097,1.7211556,2.808666,2.2216213,0.17915711,-0.8118196,-1.8726518,-1.038261,-1.0814229,1.0716481,1.5612015,0.8525946,-1.4106437,-0.33178702,-0.40122536,0.5313284,0.14545433,-1.3878148,1.2756989,1.003941,1.8485249,0.21880682,-0.871185,0.24291113,0.1868633,-1.2565708,1.0171131,-0.90609974,-0.8513911,-1.4435085,-1.4975823,-0.20393595,0.3020013,-1.2020167,2.139324,0.7813737,1.5689688,1.2104846,-1.6102966,1.0401644,-0.49317008,0.2900198,-1.066572,-4.7841263,-0.42438987,-0.02698642,0.8082509,-2.2103412,-0.07919972,0.69626427,-0.39211112,-0.82139826,0.21947029,0.5942923,-1.7074324,-2.4415128,-0.25517938,1.9789242,-0.7015449,-2.022856,-1.0410656,-0.3347443,0.95458543,1.0860718,0.64839953,1.2004799,-0.17763022,-1.6892425,-0.5054443,0.78278154,-0.4854684,0.80949557,0.6669558,1.3238182,-0.21360905,-1.115956,-0.9211643,-1.3482106,-1.5951258,0.5131328,-0.092274815,-0.37382293,0.40874958,0.014615133,2.5163457,0.8272879,-0.1517321,-0.08559666,-0.38967395,-0.118919805,-0.64811385,0.23568696,1.4745321,1.280161,-0.39010167,0.56492907,-1.4882752,0.4444381,1.2269901,0.095492184,0.05647631,1.3865824,-0.27038553,0.045991074,-0.07464345,-1.6104636,0.85389286,-0.88040775,0.79043263,0.35107535,-0.5812594,1.6701379,0.8107873,-0.33508483,0.099985495,-0.5080615,-1.2822071,0.67347383,1.624882,1.3508053,-1.802538,-0.17353094,0.093888015,0.57529867,-0.524753,0.5480756,-0.109515406,-1.7274344,-0.052849703,0.97736406,1.2754185,-0.7540525,0.4095949,-0.7222157,1.2098897,0.17246497,1.0411041,0.7683661,-1.1385982,0.6442806,-0.8302098,-0.25535494,1.5635391,-1.0351971,0.8069352,-0.023278944,0.3484161,-0.0104004,-0.09514522,-1.0265574,-0.8734637,0.27459738,-0.25431135,-0.49361455,0.6062096,-1.338797,0.8180391,0.6187567,-1.1593772,1.138995,0.7397215,0.61556613,-1.4267691,-0.06571737,-0.2161541,-0.1784221,0.5529617,-0.5542938,-0.89874256,1.5243979,0.3850321,-0.30708694,0.87867045,-0.08147879,0.066290036,1.1022547,-1.1861688,1.2008305,-0.85197014,2.0593598,0.5722216,0.30944836,-0.55415726,1.5240297,-0.9339429,1.3880875,-0.86930037,-1.786395,-0.38484186,1.5248845,-0.6950495,-0.20337808,-2.0015287,1.9663688,0.036752917,0.3972813,-1.1427912,2.1157882,0.04434094,0.14598551,-1.4616404,-0.96168125,1.9609648,-1.4954941,0.7683166,-1.0548527,-0.28871825,-0.10536627,2.2064788,1.1346729,2.0992582,0.37891755,-1.3486384,0.1309189,-0.12314828,0.3841529,0.9234828,0.21971595,0.6325204,0.22955886,-0.7581996,-0.9715527,2.3572955,0.020417407,0.46536556,0.47897545,0.732933,-0.81136817,-0.8062438,0.5423877,-0.2968652,-0.9668054,0.39366928,0.12941195,0.553593,-0.83410835,-0.844558,-0.42832288,-0.040766686,1.3018744,0.20839475,-0.60369956,-0.025012383,0.6244128,-1.2324299,-1.2799727,-0.7650944,-1.9984647,-0.09769124,0.3630639,1.3059385,-1.0518394,0.7561585,-0.40376988,-0.524517,2.251144,1.6888949,1.3253152,-2.0090203,-0.022348564,0.43495768,-0.26698056,-1.3512403,0.76935613,-1.3714662,0.052728385,-0.36904943,0.16192211,-0.80383104,1.1778181,-1.238922,-0.433594,0.3873083,-1.5837045,-0.49923956],
[-0.8298537,1.1854314,-0.045892846,0.32350296,-0.4653942,-1.8368284,-0.19149935,-0.14702135,0.855392,-1.687496,1.2476423,0.28719276,-0.75887287,0.61052,-0.5161861,-0.7331147,-0.7754632,0.5382837,0.57579213,1.4689088,0.19242294,-1.2312368,-1.6331775,-0.73550284,-0.33362588,1.0271983,0.15982798,-0.7021587,-1.2663679,0.44950232,1.2961576,0.60046256,0.7863698,0.59509975,0.13139723,-1.9086536,-1.4466546,0.14468914,-2.5370376,-2.5570488,-0.35521019,-0.34245735,-0.8409202,0.1329616,2.2908325,-2.4153004,-0.77903885,-0.78824604,-0.2993426,-2.2208545,-0.3339453,-0.75704604,-1.010086,2.5072944,0.99714255,-0.43033507,-1.6603091,1.9226425,1.7761989,-0.06639027,1.3876566,-0.04126522,1.1488194,-2.725194,-0.4255552,-1.0556467,-0.9735529,1.9706403,1.0177596,0.31068322,0.2902826,0.18772075,-0.7199768,-1.8735068,-1.1609163,0.21458603,0.3774581,-1.3576775,-1.6344504,-0.064333186,-0.54512936,0.11814436,1.4938684,2.0757637,-1.7267596,-1.690439,0.019388348,4.0689836,-2.6228242,-1.2451696,0.29963562,1.0430472,0.9683659,0.71204376,-2.012012,-1.7320422,-0.2587936,1.5479028,2.2638528,-0.14122659,-0.6298021,-0.21886835,0.41447663,-2.100167,1.1916952,1.4141915,2.2663736,0.90739465,0.80471015,-1.2650594,0.19572768,2.8164926,-0.37430716,-2.6502151,-0.23767701,-0.6246376,-0.014173657,-0.22512239,-1.6289974,0.68445754,0.967367,0.42515266,-0.67933154,-0.10704705,2.8656065,-0.5740899,-3.1992369,0.7893142,-2.3453546,2.5679615,1.4528434,-2.0337915,-1.4964416,-0.30906147,-0.6262529,0.12727702,0.9521204,-2.2812567,-0.19929738,0.30046076,1.1616006,-0.46357575,-0.78224224,0.9951006,-1.0282834,-1.6666982,-1.73686,-0.044535756,-0.46469247,-2.018179,1.1232203,1.1274246,-0.32191366,0.18969736,-2.627283,-1.5162704,1.4399805,0.50975734,0.005271673,1.1472682,1.1676646,0.1203441,-2.184376,-1.7446029,-1.1444309,-1.866221,1.1524678,0.20985588,-2.7918777,0.55040765,-0.23081699,-0.21462172,1.2681231,-0.39363277,0.28258967,-1.2157226,-2.2276778,-0.9524197,2.2608957,-0.114063084,0.37056497,1.2973492,1.9077846,0.57621336,0.30924284,-0.3315528,-2.2269516,-0.679044,0.23194021,-1.0060017,0.54326457,-1.0196702,-1.197309,0.30677766,1.7410717,0.60882163,-0.29185998,-0.5988697,-0.13947734,0.94013554,-1.6911267,0.4747274,-0.733045,-2.0137956,-0.02174786,-0.68517905,-0.8031018,-0.6467238,1.061741,-0.31271875,-2.044827,-0.5129385,0.8728482,-0.27058607,1.9565588,-3.0804358,-0.23496652,0.69965625,-1.3971264,-1.828449,1.4111329,2.0635917,1.1673863,2.1161423,0.55488205,0.331662,1.5334299,0.087384604,1.5144372,-0.35741222,1.1113975,3.0557299,0.7036513,-1.8617979,-0.2601368,-0.46765,0.90363365,-1.207938,0.5376816,1.0552846,-0.53093135,0.16127633,-0.39359054,0.2737984,0.8424977,0.15241487,-1.6703786,1.1512663,0.84007144,0.64276296,1.6881549,2.7014318,-0.37142485,-1.8382638,-0.8143919,-1.524207,0.06032452,1.1632086,0.19569126,1.1069692,-2.9017634,-0.78043723,-2.3924654,1.3625014,0.6182051,0.9812653,2.3958511,-0.28446192,-0.07104023,-1.2070957,0.24058464,2.20287,-1.2629532,1.6735668,-0.65880114,0.8841344,-0.3239696,3.609075,1.0319886,1.5206712,2.542347,0.04058393,-1.2949278,1.0782126,0.49382827,-2.4572382,1.04228,0.8902134,1.2485836,-1.6186138,-0.028111085,-1.0340692,-0.7842214,0.24935117,1.6876602,0.11223487,0.05017464,0.33057618,-1.6308612,0.33004868,-0.9322713,3.4388967,-0.28274974,-0.71915203,-1.523773,0.26108864,-0.7683748,-0.74241906,0.14597493,-0.13625959,-0.50232697,0.7215519,-1.3437334,0.39741492,0.43835002,-2.8540745,1.661639,0.051610783,1.1449288,-0.38728958,2.2152295,-0.77364194,0.4975978,0.92654335,0.026021019,-0.092283934,-0.03996706,0.889521,-0.008937851,-0.3405668,-1.8843136,-0.6526698,2.2667632,0.1846968,-0.69620466,2.8230329,-1.906559,-2.6549506,1.2162035,-2.1126444,0.91209173,-1.4848675,-0.15706955,1.3522737,1.4252427,0.28341237,1.4796968,1.5544407,-0.3776216,-1.3191223,-2.186189,-1.131195,1.2390956,-1.4145448,2.0399117,0.73359877,1.003351,-1.6786126,-3.8549454,-1.1923993,1.2815351,0.19992988,-1.2962508,0.9595442,1.192194,1.6463802,-1.2310177,0.32532495,-0.5847341,-1.7943814,2.0295272,-2.373769,0.7264241,-1.2994175,0.6172698,-1.3796617,-1.0963737,-2.0393248,-0.035240885,-0.54330504,-1.615953,1.2884004,1.750308,0.5610077,-2.105227,-1.8831719,0.7893237,0.5302362,-1.1469886,2.3756385,0.408638,2.4852152,-0.096753776,0.1179778,-2.0794606,-3.1288934,-0.32930917,0.7370144,1.6159086,-0.17126471,1.7483718,-1.8408191,-0.49451867,-0.017998561,0.24506344,2.3376546,-0.55958414,0.9079343,0.03941968,-2.0620155,-0.8530891,-3.6862307,0.96650994,1.4616251,0.1985425,0.19291297,0.44111696,2.6346326,0.42050385,0.99315083,-1.0431232,0.33521235,0.4092862,-0.38645276,0.8165339,0.026375417,-0.7358864,0.7936207,-2.9558988,1.5848522,-2.0754566,1.2510358,-2.198058,2.0920532,2.5027595,1.1507888,-0.35977912,0.3424636,0.8375877,-1.374231,-2.1021018,-0.45465058,-1.5080146,-0.7494525,-0.1795859,-1.1195537,1.7954901,-0.75407517,-1.3822656,-0.21986756,1.2266952,0.26165614,-1.0032732,-1.281422,-0.34135196,-1.6486214,-0.03935109,-0.54976,0.3991786,0.71003866,-0.56964993,1.2192258,1.1317328,-2.060541,-0.29246655,0.63281643,0.8394189,-1.1440526,0.3363575,1.0061774,-0.4681171,1.3889859,1.6019754,0.92345417,-0.70673597,0.7825944,-0.22087051,0.23500444,1.8495554,-1.7820716,0.3720929,-0.28759393,0.07315235,0.0690857,0.12023803,0.97760355,-1.2464907,1.2275418,0.24670255,-0.5723804,-0.6123347,-0.7044772,0.55848384,-0.2190129,0.26219413,3.2375832,0.9813129,-1.8129246,-0.05759848,-1.0374578,-0.13479601,-0.46503648,0.65398794,2.2253633,1.7629143,1.3909013,-0.4419278,-1.5199001,-0.59588224,0.6487811,-0.9751768,-1.7672685,1.4551373,2.6818104,-1.9940315,-1.0619819,1.0427871,-0.80769426,-1.6975818,1.1080829,-1.3659353,-2.2856748,-1.3678157,-0.7695315,-0.9499209,-0.6394936,-1.5747588,-0.6586236,-0.18154383,1.5527123,0.4700053,-1.846806,0.07684971,0.30276117,0.83241415,-1.1927979,-1.5731035,-1.1819973,0.556226,0.6655345,0.7111329,1.1520138,0.13947521,-0.9809942,-0.43800378,2.044598,0.5607463,-0.59677577,-1.6027633,-1.5062615,2.6061068,-2.7058964,-1.5799258,0.84124035,0.8386392,0.19549957,0.98031175,0.6170176,1.6906896,1.0649767,-2.38839,-0.1969409,-1.1155782,-0.22183408,0.8090101,0.22530174,1.305768,-0.40860525,-2.1753802,-1.704185,-0.84398115,-1.0078375,0.2531927,-1.0923712,-1.0843492,-0.14686099,1.3475493,1.3275607,0.83485985,-0.7015053,-1.0132312,0.10148357,-0.36001346,-0.6451429,-0.4801794,0.19772647,0.21048065,-0.8543908,-0.19994359,-1.7389464,0.98698676,-0.09777157,0.2990894,0.57603586,-1.8977473,0.5482708,0.5810126,0.26469225,0.82869834,2.072108,-0.14198092,1.6574244,-0.21454506,-0.5797373,2.0415442,0.76217544,-1.1938632,-0.3539971,-1.3339884,-1.0330497,0.8651197,1.5835816,0.04375907,-1.6204596,-0.17128015,-2.1092553,-0.82811177,0.13710865,-1.2133654,0.48674607,-0.53358567,-0.62085885,0.48672032,0.6684826,-0.42681295,-0.5515739,0.1515623,-0.21968204,0.14370254,0.5500617,-0.49477738,1.0269055,2.0826578,-2.0217428,-0.21942475,-0.023702666,-0.2875738,-0.8152149,0.5813686,1.4994555,-0.22543979,0.8323573,-0.8928472,0.59840226,-0.6890686,-0.59015334,0.68188334,1.6072087,-1.9776161,0.9787742,1.2435708,-0.7861384,-0.08166435,0.6032343,0.8588357,-0.16295877,-0.39645946,0.50216365,0.2891225,1.4377506,0.5661652,-1.6035186,2.033208,0.4550631,-0.26611057,0.7897371,0.7251594,-0.2790525,2.3623495,0.065682195,0.52795655,-0.29641792,1.1140182,0.9448104,1.9338841,0.37149563,0.79808795,1.8638818,0.3647973,-0.4599229,-0.6226165,-1.6970278,1.7225888,0.57281,1.1770377,-0.42607415,0.3498251,-0.10151447,-0.7517283,-0.86362946,1.9546689,-1.0809597,0.4146825,-1.8918601,-3.2175403,1.2768494,-0.49387294,1.9240096,-1.0673295,-1.3256278,-0.31230998,2.1192892,1.480721,0.88715965,0.42251936,-1.5236104,0.3958012,-0.92129624,0.019353416,0.90761864,0.3741567,1.7188337,0.080883846,-0.63898754,0.17239805,0.5080611,0.91718036,-0.22892271,0.24556226,1.3375577,-0.20871377,-0.4987074,-0.76771533,-0.67980087,0.42538962,-0.2513947,-0.30165878,-2.386416,-1.3146081,0.64972085,0.1961531,2.170484,-0.64750624,1.1954758,0.24454023,0.92725396,0.76082164,-1.5664343,-1.2816277,-1.392251,0.024036855,-1.1226478,1.4291855,-0.66915065,-1.2826198,0.12818058,-0.43931526,0.5870935,1.6491547,2.55786,1.9102744,-0.7095771,-1.8476894,-0.38034287,-0.40159282,0.12109491,-1.3208491,0.67067766,-1.8319559,-0.63518465,0.9097682,-2.024767,1.6936674,-0.9370773,-1.9591477,0.6351036,-0.6545246,-0.16005541]
]
}

Request#

texts#

array of strings
An array of strings for the model to embed.

Response#

embeddings#

array of embeddings

An array of embeddings, where each embedding is an array of floats. The length of the embeddings array will be the same as the length of the original texts array.

The embeddings have different lengths depending on the size of the model:

  • The shrimp embeddings have length 768.
  • The otter embeddings have length 1024.
  • The seal embeddings have length 1536.