Generate Content
Gemini generateContent is called, the path is {model}:{action}, such as gemini-2.0-flash:generateContent.
POST
/v1alpha/models/*pathBody Parametersapplication/json
contents* array
List of content (multi-turn / multi-modal)
items object object
generationConfig object
Generation configuration
properties maxOutputTokens integer
Maximum number of output tokens
temperature number
Sampling temperature; higher is more random
Responses
200 OK application/json
response-200 object
400 Bad request or validation failed application/json
response-400 object
properties error* object
401 Missing or invalid API Key application/json
response-401 object
1{
2"contents": [
3{
4"parts": [
5{
6"text": "Hello"
7}
8],
9"role": "user"
10}
11]
12}
1curl -X POST "https://api.digislash.com/v1alpha/models/*path" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"contents": [
6{
7"parts": [
8{
9"text": "Hello"
10}
11],
12"role": "user"
13}
14]
15}'
1▼{
2"id": "resp_example",
3"object": "response",
4"status": "completed"
5}
