Skip to main content
POST
/
v1beta
/
models
/
{model}
:generateContent
curl --request POST \
  --url https://api.foxapi.cc/v1beta/models/{model}:generateContent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Generate a watercolor painting of a lighthouse by the sea at sunset"
        }
      ]
    }
  ],
  "generationConfig": {
    "responseModalities": [
      "TEXT",
      "IMAGE"
    ]
  }
}
'
{
  "candidates": [
    {
      "content": {
        "parts": [
          {
            "text": "Here is a watercolor painting of a lighthouse by the sea at sunset.",
            "inlineData": {
              "mimeType": "image/png",
              "data": "iVBORw0KGgoAAAANSUhEUgAA..."
            }
          }
        ],
        "role": "model"
      },
      "finishReason": "STOP",
      "safetyRatings": [
        {
          "category": "<string>",
          "probability": "<string>"
        }
      ]
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 15,
    "candidatesTokenCount": 1120,
    "totalTokenCount": 1135
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.foxapi.cc/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

All endpoints require Bearer Token authentication

Add the following to your request headers:

Authorization: Bearer YOUR_API_KEY

Path Parameters

model
enum<string>
required

Model name. Supports gemini-3-pro-image-preview (professional asset creation, advanced reasoning) and gemini-3.1-flash-image-preview (high efficiency, optimized for speed)

Available options:
gemini-3-pro-image-preview,
gemini-3.1-flash-image-preview
Example:

"gemini-3.1-flash-image-preview"

Body

application/json
contents
object[]
required

List of conversation contents

generationConfig
object
required

Generation config (responseModalities must be set for image generation)

systemInstruction
object

System instruction

safetySettings
object[]

Safety settings

Response

Image generation response

candidates
object[]

List of candidate results

usageMetadata
object

Usage statistics