We are building an Art Direction Agent that turns a rough creative idea into a structured brief with color palettes, composition notes, and production-ready image prompts. It is for illustrators, graphic designers, and creative directors who want to get from concept to execution without staring at a blank page. Oxlo.ai's flat per-request pricing makes it cheap to iterate, even when you feed the model long style guides or reference documents.
What you'll need
- Python 3.10 or newer
- The OpenAI SDK:
pip install openai - An Oxlo.ai API key from https://portal.oxlo.ai
Step 1: Scaffold the agent and system prompt
First I import the OpenAI SDK and point it at Oxlo.ai. I keep the system prompt in a constant so I can tune it without touching the logic. The prompt tells the model to act as a senior art director and to output structured briefs.
from openai import OpenAI
# Initialize the Oxlo.ai client
client = OpenAI(base_url="https://api.oxlo.ai/v1", api_key="YOUR_OXLO_API_KEY")
SYSTEM_PROMPT = """You are a senior art director with 15 years of experience in brand, digital, and illustration. Your job is to take a rough creative concept and expand it into a structured art direction brief.
Follow this exact format for every response:
Concept Summary: One sentence that captures the core idea.
Mood & Tone: Two sentences describing the emotional quality.
Color Palette: Five hex codes with a one-sentence rationale for each.
Composition Notes: Three concrete guidelines for layout or spatial organization.
Typography Direction: One sentence on type style and one recommended font family.
Reference Artists/Movements: Three specific names or movements with a one-sentence note on what to borrow from each.
Image Prompts: Two detailed text-to-image prompts suitable for Flux.1 or Stable Diffusion. Include medium, subject, lighting, and color treatment.
Be specific. Do not use vague words like "nice" or "clean"."""
Step 2: Generate the structured brief
Next I write a function that sends the user's raw concept to the agent. I use Llama 3.3 70B because it follows long system instructions reliably and handles creative writing well. Since Oxlo.ai charges per request, not per token, I can stuff the system prompt with detailed constraints without worrying about ballooning costs.
def generate_brief(concept: str) -> str:
"""Send a raw concept to the art director agent and return the brief."""
response = client.chat.completions.create(
model="llama-3.3-70b",
messages=[
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": f"Create an art direction brief for: {concept}"},
],
)
return response.choices[0].message.content
Step 3: Extract image prompts for production
The brief contains image prompts, but I like to pull them out into a separate list so I can feed them directly into an image generation pipeline. This function asks the model to parse its own brief and return only the prompts as a Python list. I could parse this with regex, but letting the model do it handles variations in formatting.
import ast
def extract_prompts(brief: str) -> list[str]:
"""Parse the brief and return a Python list of image generation prompts."""
extraction_prompt = (
"Below is an art direction brief. Extract only the two image generation prompts "
"and return them as a valid Python list of strings. Do not include markdown formatting, "
"code blocks, or explanation.\n\n" + brief
)
response = client.chat.completions.create(
model="llama-3.3-70b",
messages=[
{"role": "system", "content": "You are a helpful parser. Return only valid Python syntax."},
{"role": "user", "content": extraction_prompt},
],
temperature=0.2,
)
raw = response.choices[0].message.content.strip()
# Remove accidental markdown fences
raw = raw.replace("
```python", "").replace("```
", "")
return ast.literal_eval(raw)
Step 4: Assemble the final deliverable
Now I wire the two functions together. The art_direct function takes a concept, prints the full brief, and prints the isolated prompts. I add a small CLI guard so I can run this as a script.
def art_direct(concept: str):
"""Run the full art direction pipeline."""
print("=" * 60)
print("GENERATING ART DIRECTION BRIEF")
print("=" * 60)
brief = generate_brief(concept)
print(brief)
print("\n" + "=" * 60)
print("EXTRACTED IMAGE PROMPTS")
print("=" * 60)
prompts = extract_prompts(brief)
for i, prompt in enumerate(prompts, 1):
print(f"\nPrompt {i}: {prompt}")
if __name__ == "__main__":
concept = (
"A cyberpunk street market in the rain at night, "
"selling bioluminescent plants instead of food"
)
art_direct(concept)
Run it
Save the full script as art_director.py, replace YOUR_OXLO_API_KEY, and run python art_director.py. Here is what the output looks like when I ran it against Oxlo.ai:
============================================================
GENERATING ART DIRECTION BRIEF
============================================================
Concept Summary: A nocturnal cyberpunk marketplace where biotechnology and street commerce merge through living, glowing flora.
Mood & Tone: The scene feels simultaneously alien and intimate, evoking wonder tinged with dystopian unease. Neon reflections on wet concrete create a sense of contained chaos.
Color Palette:
- #0A0A0F: Deep void black for negative space and shadows.
- #00F0FF: Electric cyan for primary neon signage and water reflections.
- #1B1B3A: Midnight navy for atmospheric haze.
- #39FF14: Acid green for bioluminescent plant cores.
- #FF006E: Hot magenta for secondary light sources and vendor awnings.
Composition Notes:
- Frame the scene with a low-angle perspective looking down a narrow alley to force depth.
- Place the brightest plant cluster at the golden-ratio intersection in the lower right.
- Use overhead tarpaulins and cables to create leading lines toward a vanishing point.
Typography Direction: Utilitarian sans-serif with horizontal compression, similar to DIN or Neue Haas Grotesk, all caps for vendor signage.
Reference Artists/Movements:
- Syd Mead: Borrow his layered cityscapes and controlled density of detail.
- Bioluminescent deep-sea photography: Reference the internal glow and subsurface scattering of organic light sources.
- Blade Runner 2049 production art: Use the wet, reflective ground planes and volumetric fog.
Image Prompts:
- A highly detailed digital painting of a cyberpunk alley market at night during heavy rain, vendors selling potted bioluminescent plants that emit cyan and magenta light, wet asphalt reflecting neon signs, low angle shot, cinematic lighting, volumetric fog, 8k, artstation trending.
- Close-up of a bioluminescent plant vendor's stall in a dystopian night market, glowing green and pink flora in terracotta pots, steam rising, cyberpunk city background out of focus, shallow depth of field, photorealistic, octane render.
============================================================
EXTRACTED IMAGE PROMPTS
============================================================
Prompt 1: A highly detailed digital painting of a cyberpunk alley market at night during heavy rain, vendors selling potted bioluminescent plants that emit cyan and magenta light, wet asphalt reflecting neon signs, low angle shot, cinematic lighting, volumetric fog, 8k, artstation trending.
Prompt 2: Close-up of a bioluminescent plant vendor's stall in a dystopian night market, glowing green and pink flora in terracotta pots, steam rising, cyberpunk city background out of focus, shallow depth of field, photorealistic, octane render.
Next steps
Swap in kimi-k2.6 or qwen-3-32b if you need stronger multilingual reasoning or vision analysis for reference images. To close the loop from text to asset, pipe the extracted prompts into Oxlo.ai's image generation endpoints using flux.1 or oxlo.ai-image-pro. If you want to scale this for a team, wrap the functions in a FastAPI service and store generated briefs in a shared database so designers can build on past directions.
Top comments (0)