VOICE / override-instructions-per-response

Voice

Override Speech to Speech instructions for one turn

Override Speech to Speech instructions for one turn

Put instructions on response.create to replace the session system prompt for that response only. The next turn goes back to session instructions.

One-turn override

import json

await ws.send(json.dumps({
    "type": "response.create",
    "response": {
        "instructions": "Respond in Spanish for this turn only."
    }
}))

Use this for caller-specific context (CRM record, account status, a temporary language) without rewriting the whole session.

Session prompt stays the default

session.update still owns the standing prompt:

await ws.send(json.dumps({
    "type": "session.update",
    "session": {
        "voice": "eve",
        "instructions": "You are a helpful assistant.",
        "turn_detection": {"type": "server_vad"}
    }
}))

A later response.create with no response.instructions uses that session prompt again.

Write instructions in second person. The Speech to Speech prompting guide on docs.x.ai has the recommended section order.

Pitfalls

  • The override does not persist. Repeat it on every response.create that needs it.
  • A later session.update that changes instructions applies to turns after that update, not the in-flight response.
  • Console API credits are separate from SuperGrok's weekly pool on grok.com.