Skip to main content

Get your API key

Generate an API key on our API page.

Add Balance

If you haven’t deposited yet, add some funds to your balance. Minimum deposit is just $1, or $0.10 when using crypto.

API usage examples

Here’s a simple example using our OpenAI-compatible chat completions endpoint:

Routing preferences

For supported open-source models, you can request routing preferences with model suffixes:
Use :fast for fastest estimated completion, :cheap for lowest provider price, and :caching to require a cache-capable provider. These are pay-as-you-go provider-selection requests. See Model Suffixes for the full list.For more detailed examples and other text generation endpoints, check out our Text Generation Guide.

OpenAI-Compatible Endpoint (v1/images/generations)

You can also generate images using our OpenAI-compatible endpoint:
Here’s an example using the OpenAI-compatible endpoint in Python:
For more detailed examples and other image generation options, check out our Image Generation Guide.
Submit a video generation job, then poll the status endpoint until the video is ready:
For more detailed examples and model-specific options, check out our Video Generation Guide.