mô hình

Gemini Embedding 001 Batch

Markdown · JSON

Gemini Embedding 001 Batch

google/gemini-embedding-001:batch
GoogleBiểu diễn nhúngAuto · Ultra

Chuyển văn bản thành vectơ bằng các tác vụ theo lô bất đồng bộ.

Ultra BatchPOST /v1/batches
Đầu vào
text
Đầu ra
embedding
Ngữ cảnh
Không nêu trong danh mục
Độ dài câu trả lời tối đa
Không nêu trong danh mục
Đầu vào
0,00015 US$ / 1K
Đầu ra
0,00 US$ / 1K
Tham số phương thức và vòng đời
Tham sốHợp đồng
Tham sốendpointHợp đồng/v1/embeddings
Tham sốmodelHợp đồnggoogle/gemini-embedding-001:batch
Tham sốrequestsHợp đồngcustom_id + body.input

Vòng đời: asynchronous

GET /v1/batches/{request_id} · response.id

POST /v1/batches

curl --silent --show-error https://api.ailoot.ai/v1/batches \
  -H "Authorization: Bearer $AILOOT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Ailoot-Routing-Mode: ultra" \
  --data '{"model":"google/gemini-embedding-001:batch","endpoint":"/v1/embeddings","requests":[{"custom_id":"text-1","body":{"input":"First document"}}]}'

GET /v1/batches/{request_id}

curl --silent --show-error "https://api.ailoot.ai/v1/batches/$BATCH_ID" \
  -H "Authorization: Bearer $AILOOT_API_KEY" \
  -H "X-Ailoot-Routing-Mode: ultra"
JSON
{"about":"Chuyển văn bản thành vectơ bằng các tác vụ theo lô bất đồng bộ.","alias_of":null,"aliases":[],"author":"Google","available":true,"canonical_model":"google/gemini-embedding-001:batch","card_routes":[{"label":"Ultra","rates":[{"amount":0.15,"amount_unit":"usd_per_million_tokens","key":"in","label":"Input","side":"in"}]}],"ctx":null,"formats":["batches"],"id":"google/gemini-embedding-001:batch","input":["text"],"kind":"embedding","max_out":null,"methods":[{"contract":{"data":{"example_body":{"endpoint":"/v1/embeddings","model":"google/gemini-embedding-001:batch","requests":[{"body":{"input":"First document"},"custom_id":"text-1"}]},"outputs":{"family":"embedding","fields":[{"name":"id","type":"string"},{"name":"status","type":"string"},{"name":"results[].custom_id","type":"string"},{"name":"results[].response.body.data[].embedding","type":"number[]"},{"name":"results[].error","type":"object|null"}],"format":"JSON","vector_dimensions":3072},"parameters":[{"enum":["google/gemini-embedding-001:batch"],"name":"model","required":true,"type":"string"},{"enum":["/v1/embeddings"],"name":"endpoint","required":true,"type":"string"},{"min_items":1,"name":"requests","required":true,"type":"batch_item[]"},{"name":"requests[].custom_id","required":true,"type":"string","unique_within_batch":true},{"name":"requests[].body.input","required":true,"type":"string"}]},"hints":[],"input":{"endpoint":"/v1/embeddings","model":"google/gemini-embedding-001:batch","requests":"custom_id + body.input"},"lifecycle":{"create":{"accepted_status":202,"http":"POST","path":"/v1/batches"},"mode":"asynchronous","status":{"http":"GET","id_source":"response.id","path":"/v1/batches/{request_id}"}},"method":{"http":"POST","path":"/v1/batches"},"output":{"family":"embedding","fields":[{"name":"id","type":"string"},{"name":"status","type":"string"},{"name":"results[].custom_id","type":"string"},{"name":"results[].response.body.data[].embedding","type":"number[]"},{"name":"results[].error","type":"object|null"}],"format":"JSON","vector_dimensions":3072}},"ctx":null,"examples":[{"code":"curl --silent --show-error https://api.ailoot.ai/v1/batches \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-Ailoot-Routing-Mode: ultra\" \\\n  --data '{\"model\":\"google/gemini-embedding-001:batch\",\"endpoint\":\"/v1/embeddings\",\"requests\":[{\"custom_id\":\"text-1\",\"body\":{\"input\":\"First document\"}}]}'","label":"curl · POST /v1/batches","language":"bash"},{"code":"curl --silent --show-error \"https://api.ailoot.ai/v1/batches/$BATCH_ID\" \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" \\\n  -H \"X-Ailoot-Routing-Mode: ultra\"","label":"curl · GET /v1/batches/{request_id}","language":"bash"}],"family":"batch","fmt":"batches","hints":[],"http":"POST","img_in":null,"img_out":null,"in":0.15,"input":["text"],"label":"Batch","max_out":null,"native_endpoint":"batches","out":0,"output":["embedding"],"path":"/v1/batches","pricing":{"billing_mode":"token","cache_write_1h_usd_per_token":null,"cache_write_5m_usd_per_token":null,"currency":"USD","input_usd_per_token":1.5e-07,"output_usd_per_token":0,"price_policy":"native_accepted_retail_card","provenance":"native_group_model_pricing","status":"configured","tiers":[{"cache_write_1h_usd_per_token":null,"cache_write_5m_usd_per_token":null,"input_usd_per_token":1.5e-07,"interval_boundary":"min_exclusive_max_inclusive","label":"","min_tokens":0,"null_rate_policy":"inherit_base_rate","output_usd_per_token":0}]},"request_model_id":"google/gemini-embedding-001:batch","route_label":"Ultra","route_tier":"ultra","status_reads":["GET /v1/batches/{request_id}"],"tiers":[],"unit":"token","units":[]}],"model_aliases":[],"name":"Gemini Embedding 001 Batch","price":{"in":0.15,"in_label":null,"out":0,"out_label":null,"sort_in":0.15,"sort_out":0,"varies":false},"public_id":"google/gemini-embedding-001:batch","short":"Chuyển văn bản thành vectơ bằng các tác vụ theo lô bất đồng bộ."}

Câu hỏi

Làm sao chọn mô hình cho tác vụ của tôi?

Trước tiên xác định đầu vào và đầu ra cần thiết: văn bản, hình ảnh, âm thanh hay video. Sau đó so sánh phương thức API tương thích, ID mô hình chính xác hoặc mô hình đích hiện tại của bí danh, giá và đơn vị tính phí. GET /v1/models miễn phí và liệt kê các mô hình mà khóa của bạn có thể truy cập.

Mỗi mô hình có hỗ trợ mọi phương thức API và loại nội dung không?

Dùng các phương thức API và loại đầu vào, đầu ra được liệt kê trên thẻ mô hình. Việc hỗ trợ văn bản, hình ảnh, âm thanh hay video phụ thuộc vào mô hình và phương thức đã chọn; xem ví dụ yêu cầu trước khi gửi dữ liệu.

ID mô hình khác bí danh như thế nào?

ID chính xác chỉ một mô hình cụ thể. Bí danh trỏ đến một mô hình và mô hình đích có thể thay đổi. Kiểm tra mô hình đích hiện tại của bí danh trong danh mục; dùng ID chính xác khi tích hợp cần một mô hình cụ thể.

Làm sao so sánh giá trước khi gửi yêu cầu?

Xem giá và đơn vị tính phí của phương thức API đã chọn trên thẻ mô hình. So sánh cùng đơn vị và loại đầu vào, đầu ra; lịch sử yêu cầu hiển thị mức sử dụng thực tế và số tiền đã trừ.

Thuê bao mang lại gì?

Giảm giá mua token cho nhu cầu thường xuyên. Chọn gói theo khối lượng yêu cầu; điều khoản và giá thuê bao hiển thị khi đăng ký.

Làm sao áp dụng mã giảm đến 50%?

Nhập mã khuyến mãi khi mua token. Tổng tiền được tính lại theo điều kiện chương trình; mức giảm hiển thị trước khi thanh toán.