API Reference

Images

Generate or edit images with the image models enabled on the instance.

Base https://api.lingapi.ai/v1/images/generations

Quick checklist

  1. Authenticate with your Ling.AI API key.
  2. Use the model id returned by /v1/models.
  3. Log request ids and response status for troubleshooting.

Compatibility

The endpoint follows the OpenAI-compatible shape where possible, while preserving provider-specific fields only when the upstream model requires them.

Production guidance

Start with a small request, verify usage and billing, then enable streaming, tools, or async polling according to the model capability.

Example

Example
from openai import OpenAI

client = OpenAI(base_url="https://api.lingapi.ai/v1", api_key="<YOUR_API_KEY>")
# Example call: images.generate