The Giotto API lets applications send prompts to Giotto models through an OpenAI-compatible endpoint. Python applications can use the standard openai package with a Giotto base URL and API credential.
To make your first call, see Make your first API request with Python.
What you can build
- Question-answering and developer-assistance features
- Content generation and transformation workflows
- Chat interfaces that display generated text as it arrives
- Applications that select from models available to their API credential
See Giotto API use cases for examples.
How requests work
- Create a Giotto API credential and store its client ID and client secret securely.
- Set the OpenAI client's
base_urlto the Giotto/v1endpoint. Setapi_keytoCLIENT_ID:CLIENT_SECRET. - Choose a model available to that credential and call
client.chat.completions.create(). - Read the returned message or request a streaming response to display text as it arrives.
The OpenAI client sends the combined credential as an HTTP bearer token. Use a Giotto credential for this endpoint; an OpenAI platform API key is not a Giotto credential.
Before you begin
- a Giotto account with API access and an active API offering;
- a Giotto client ID and client secret from API management;
- Python and the standard
openaipackage if using the Python examples; and - a model enabled for your credential. Use
client.models.list()to check the available models.
For by-token access, keep a positive API credit balance. See API billing, credits, and usage.
If you are connecting an editor or another OpenAI-compatible application, see Connect OpenAI-Compatible Tools to Giotto. For a self-hosted Giotto deployment, see the Giotto on-prem documentation.
API surfaces
Chat Completions
POST /v1/chat/completions is the primary path in these guides. It accepts a model and a messages array. Set stream=True for server-sent text deltas. Tool-call support depends on the selected model and its deployment.
Models
GET /v1/models lists models available through the gateway to your credential. Use a returned model ID in requests. Availability can change by account and deployment.
Responses and other OpenAI-compatible routes
The gateway also forwards POST /v1/responses and other /v1 routes to the selected model backend. Support for each parameter and response feature depends on that backend. Do not assume that every feature of OpenAI's hosted API is available through Giotto. See the OpenAI Python client reference for Giotto for a basic Responses example and feature boundaries.
Credentials and security
Create credentials in the API management tab. Store the client secret in environment variables or a secrets manager. Do not put it in browser code, commit it to a repository, or share a full Authorization header. Rotate a secret if it is exposed.
Limits and errors
Requests are subject to configured per-minute and concurrency limits. Inspect the X-RateLimit-* and Retry-After response headers when managing request volume. See API errors, rate limits, and retries for error codes and retry guidance.